Skip to content

Commit f455055

Browse files
authored
feat: support aweXpect repos (#11)
* Update PullRequestStatusCheckController.cs
1 parent 85c899e commit f455055

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Source/Testably.Server/Controllers/PullRequestStatusCheckController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Testably.Server.Controllers;
1212
[AllowAnonymous]
1313
public class PullRequestStatusCheckController : ControllerBase
1414
{
15-
private const string RepositoryOwner = "Testably";
15+
private static readonly string[] RepositoryOwners = ["Testably", "aweXpect"];
1616

1717
private const string SuccessMessage =
1818
"The PR title must conform to the conventional commits guideline.";
@@ -62,9 +62,9 @@ public async Task<IActionResult> OnPullRequestChanged(
6262
}
6363

6464
if (pullRequestModel.Repository.Private ||
65-
pullRequestModel.Repository.Owner.Login != RepositoryOwner)
65+
RepositoryOwners.All(repositoryOwner => pullRequestModel.Repository.Owner.Login != repositoryOwner))
6666
{
67-
return BadRequest($"Only public repositories from '{RepositoryOwner}' are supported!");
67+
return BadRequest($"Only public repositories from '{string.Join(", ", RepositoryOwners)}' are supported!");
6868
}
6969

7070
var bearerToken = _configuration.GetValue<string>("GithubBearerToken");

0 commit comments

Comments
 (0)