RFR: pr: improve message for unexpected merge commits

Robin Westberg rwestberg at openjdk.java.net
Sat Jul 4 14:25:10 UTC 2020


On Sat, 4 Jul 2020 10:08:38 GMT, Erik Helin <ehelin at openjdk.org> wrote:

> Hi all,
> 
> please review this patch that improves the warning when a pull request contains a merge request that brings in commits
> not present in the target repository. This indicates that the user might wanted to do a "merge style" pull request, but
> can also arise in other scenarios.  Testing:
> - [x] `make test` passes on Linux x64
> 
> Thanks,
> Erik

Looks good, just one grammar suggestion. :)

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

> 705:         var message = "⚠️  @" + pr.author().userName() +
> 706:                       " This pull request contains merges that brings in commits not present in the target
> repository." + 707:                       " Since this is not a \"merge style\" pull request, these changes will be
> squashed when this pull request in integrated." +

Suggestion:

                      " This pull request contains merges that bring in commits not present in the target repository." +

bots/pr/src/test/java/org/openjdk/skara/bots/pr/MergeTests.java line 1067:

> 1066:             // There should be a warning
> 1067:             assertLastCommentContains(pr, "This pull request contains merges that brings in commits not present");
> 1068:         }

Suggestion:

            assertLastCommentContains(pr, "This pull request contains merges that bring in commits not present");

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

Marked as reviewed by rwestberg (Reviewer).

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


More information about the skara-dev mailing list