[Rev 01] RFR: 340: Infer master for repos in the same org for merge style PRs

Robin Westberg rwestberg at openjdk.java.net
Tue Mar 31 09:18:09 UTC 2020


On Tue, 31 Mar 2020 09:06:01 GMT, Erik Helin <ehelin at openjdk.org> wrote:

>> Robin Westberg has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix failing test
>
> bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 137:
> 
>> 136:                 // Assume the name refers to a sibling repository
>> 137:                 var repoName = Path.of(pr.repository().name()).resolveSibling(branchMatcher.group(1)).toString();
>> 138:                 return Optional.of(new MergeSource(repoName, "master"));
> 
> Perhaps check that the repo actually exists?

It will be checked a bit later (around line 193).

> bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 131:
> 
>> 130:
>> 131:             // Verify that the branch exists
>> 132:             var isValidBranch = prInstance.remoteBranches().stream()
> 
> Suggestion:
> 
>             // Check if name refers to branch or repository

So the check is only done partially here.. :)

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

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


More information about the skara-dev mailing list