RFR: 1949: Handle maintainer approval from pull request [v4]
Erik Joelsson
erikj at openjdk.org
Thu Aug 17 19:59:16 UTC 2023
On Thu, 17 Aug 2023 18:37:09 GMT, Zhao Song <zsong at openjdk.org> wrote:
>> As Erik said in the issue, "In SKARA-1199, we added the optional ability for a PR to block integration until a certain approval label appears on all the associated bugs. To further improve the workflow, we would like to add a couple of PR commands that will make it possible to perform the whole maintainer approval workflow through the PR"
>>
>> Therefore, in this patch, two pull request commands(`/approval` and `/approve`) are introduced.
>>
>> 1. Command `/approval`
>> Usage: `/approval [<id>] (request|cancel) [<text>]`
>> Examples: `/approval request my reason`, `/approval cancel`,
>> `/approval JDK-123 request my reason`, `/approval 123 cancel`
>>
>> Only the author of the pull request is allowed to issue this command. If the user requested approval, the text will be posted to the bug. The user will be able to update the text by requesting the approval again. Once maintainer processed the request(approved or rejected), the user will not be able to request or cancel the approval.
>>
>> If there is only one issue associated with the pr, the user will not need to specify the issue id. If there are more than one issues associated with the pr, the user should specify the issue id in the command.
>>
>> 2. Command `/approve`
>> Usage: `/approve [<id>] (yes|no)`
>> Examples: `/approve yes`, `/approve no`, `/approve JDK-123 yes`, `/approve 123 no`
>>
>> Only maintainers of the repo are allowed to issue this command. Maintainers can not approve or reject the approval if the request doesn't exist.
>>
>> If the user doesn't specify the issue id in the command, then all the approval request in issues associated with pull request will be handled.
>
> Zhao Song has updated the pull request incrementally with two additional commits since the last revision:
>
> - update
> - update
bots/pr/src/main/java/org/openjdk/skara/bots/pr/ApproveCommand.java line 135:
> 133: ret.add(issue);
> 134: } else {
> 135: reply.println("You can only handle approval request for issues that this pull request solves.");
Sorry, I missed this earlier.
Suggestion:
reply.println("You can only handle approval requests for issues that this pull request solves.");
bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java line 682:
> 680: progressBody.append("\n");
> 681:
> 682: var existingRequested = false;
This variable name confuses me. I would suggest `requestPresent`.
-------------
PR Review Comment: https://git.openjdk.org/skara/pull/1544#discussion_r1297676177
PR Review Comment: https://git.openjdk.org/skara/pull/1544#discussion_r1297677691
More information about the skara-dev
mailing list