RFR: 1860: Make it possible to configure PR bot to jcheck all commits in "Merge PR"

Erik Joelsson erikj at openjdk.org
Wed Apr 26 22:17:47 UTC 2023


On Wed, 26 Apr 2023 20:19:16 GMT, Zhao Song <zsong at openjdk.org> wrote:

> In this patch, PR bot has been added with the capability to control whether jcheck every commit in a merge PR.
> 
> By default, jcheckMerge is enabled.
> 
> However, if it is desired to enable jcheckMerge in a repo, the configuration can be added to the PR bot configuration as follows:
> 
> {
>   "pr": {
>       "repositories": {
>           "repo1": {
>                "jcheckMerge": true
>           }
>        }
>   }
> }
> 
> If jcheckMerge is true, then the pr bot would jcheck all the commits in the merge PR and if any jcheck doesn't pass, the error message will be treated as Integration blocker.

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

> 1157:                             mergeJCheckMessage.addAll(visitor.messages().stream()
> 1158:                                     .map(StringBuilder::new)
> 1159:                                     .map(e -> e.append(" (failed when running jcheck with commit " + hash.hex() + ")"))

Suggestion:

                                    .map(e -> e.append(" (in commit " + hash.hex() + ")"))

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

> 1160:                                     .map(StringBuilder::toString)
> 1161:                                     .toList());
> 1162:                         } catch (Exception e) {

I think instead of catching Exception here, let the outer try-catch take it as that will trigger a retry and a suitable message to be printed.

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

> 1782:             TestBotRunner.runPeriodicItems(mergeBot);
> 1783: 
> 1784:             // The bot should reply with an ok message

This looks like the opposite of "ok".  😄

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

PR Review Comment: https://git.openjdk.org/skara/pull/1510#discussion_r1178444514
PR Review Comment: https://git.openjdk.org/skara/pull/1510#discussion_r1178440472
PR Review Comment: https://git.openjdk.org/skara/pull/1510#discussion_r1178443228


More information about the skara-dev mailing list