RFR: 282: Make the review requirements more explicit in the progress list
Guoxiong Li
gli at openjdk.java.net
Mon Apr 25 14:31:08 UTC 2022
On Sun, 24 Apr 2022 15:59:42 GMT, Guoxiong Li <gli at openjdk.org> wrote:
> Hi all,
>
> This patch adds the explicit review requirements, such as ` (2 reviews required, with at least 1 Reviewer).`, to the progress list and adds some test cases.
>
> Thanks for taking the time to review.
>
> Best Regards,
> -- Guoxiong
bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckablePullRequest.java line 229:
> 227: }
> 228: // Set the review requirements for using in CheckRun#getChecksList
> 229: setReviewRequirements(conf.get());
I don't think it is good to put such code in `CheckablePullRequest#executeChecks`. But I can't find a better way to do that because we need the complete `JCheckConfiguration` config information.
An alternative way is duplicating the following code in the `CheckRun` so that we can get the complete config information.
Optional<JCheckConfiguration> conf;
if (confOverride != null) {
conf = JCheck.parseConfiguration(confOverride, additionalConfiguration);
} else {
conf = JCheck.parseConfiguration(localRepo, targetHash(), additionalConfiguration);
}
if (conf.isEmpty()) {
throw new RuntimeException("Failed to parse jcheck configuration at: " + targetHash() + " with extra: " + additionalConfiguration);
}
-------------
PR: https://git.openjdk.java.net/skara/pull/1305
More information about the skara-dev
mailing list