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

Erik Joelsson erikj at openjdk.org
Tue Apr 4 13:30:09 UTC 2023

On Tue, 4 Apr 2023 00:30:00 GMT, Zhao Song <zsong 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. For the merge pull requests that not require review, the Reviewers check would be skipped.
>> The other way to run jcheck in using SKARA CLI. This patch is also compatible with it.
> Zhao Song has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:
>   SKARA-1858

bots/pr/src/main/java/org/openjdk/skara/bots/pr/PullRequestBotFactory.java line 119:

> 117:             var repository = configuration.repository(repo.name());
> 118:             var botBuilder = PullRequestBot.newBuilder()
> 119:                                            .repo(configuration.repository(repo.name()))

Why this change? The variable repository is defined on the line above.

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

> 209: 
> 210:             // Author and committer should updated in the merge commit
> 211:             var headCommit = pushedRepo.commits(headHash.hex() + "^.." + headHash.hex()).asList().get(0);

Does the commit message contain a "Reviewed-by" line?


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

More information about the skara-dev mailing list