[Rev 01] RFR: Make it possible to only allow PRs against a select set of target branches

Erik Helin ehelin at openjdk.java.net
Fri Jan 24 11:22:18 UTC 2020


On Fri, 24 Jan 2020 11:22:17 GMT, Robin Westberg <rwestberg at openjdk.org> wrote:

>> Hi all,
>> 
>> Please review this change that makes it possible to only allow PRs to target a select set of branches.
>> 
>> Best regards,
>> Robin
> 
> The pull request has been updated with 1 additional commit.

Thanks, looks good! Just a small nit with regards to the method name ��

bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 73:

> 72: 
> 73:     private boolean checkTargetBranch() {
> 74:         var matcher = workItem.bot.allowedTargetBranches().matcher(pr.targetRef());

Suggestion:

    private boolean isTargetBranchAllowed() {

bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 127:

> 126: 
> 127:         if (!checkTargetBranch()) {
> 128:             var error = "The branch `" + pr.targetRef() + "` is not allowed as target branch. The allowed target branches are:\n" +

Suggestion:

        if (!isTargetBranchAllowed()) {

-------------

Marked as reviewed by ehelin (Reviewer).

PR: https://git.openjdk.java.net/skara/pull/377


More information about the skara-dev mailing list