Skip to content

Commit

Permalink
feat: support aweXpect repos (#11)
Browse files Browse the repository at this point in the history
* Update PullRequestStatusCheckController.cs
  • Loading branch information
vbreuss authored Nov 25, 2024
1 parent 85c899e commit f455055
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Testably.Server.Controllers;
[AllowAnonymous]
public class PullRequestStatusCheckController : ControllerBase
{
private const string RepositoryOwner = "Testably";
private static readonly string[] RepositoryOwners = ["Testably", "aweXpect"];

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

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

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

0 comments on commit f455055

Please sign in to comment.