RFR: 1858: Make it possible to configure to require reviewers for "Merge" PRs

Zhao Song zsong at openjdk.org
Mon Apr 3 18:25:36 UTC 2023

On Fri, 31 Mar 2023 22:04:41 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> In this patch, PR bot has been added with the capability to control the requirement of reviews for merge pull requests.
>> By default, review is not necessary for merge pull requests.
>> However, if it is desired to enable the requirement of reviews for merge requests in a repo, the configuration can be added to the PR bot configuration as follows:
>> {
>>   "pr": {
>>       "repositories": {
>>           "repo1": {
>>                "reviewMergePullRequest": true
>>           }
>>        }
>>   }
>> }
>> Currently, jcheck would run in two places in skara bot. One is in checkRun and one is in IntegrateCommand. The basic idea for us to ignore reviewersCheck for CleanBackport and Merge PullRequest is ignoring the error message.
> jcheck/src/main/java/org/openjdk/skara/jcheck/ReviewersCheck.java line 70:
>> 68:     @Override
>> 69:     Iterator<Issue> check(Commit commit, CommitMessage message, JCheckConfiguration conf, Census census) {
>> 70:         if (utils.addsHgTag(commit)) {
> We can't just remove this default behavior in jcheck itself. Then the cli version of jcheck would always require reviewers for a merge commit. We are going to need a new setting in `.jcheck/conf` for this and the PR bot would override it when creating the jcheck instance.

Ok, got it. If we have to make changes to `.jcheck/conf`. I will rework on this issue. It would be much easier than current solution.


PR Review Comment: https://git.openjdk.org/skara/pull/1495#discussion_r1156304627

More information about the skara-dev mailing list