RFR: 1949: Handle maintainer approval from pull request
Zhao Song
zsong at openjdk.org
Wed Aug 16 01:19:10 UTC 2023
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 approve or reject the approval whether the request exists.
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.
-------------
Commit messages:
- fix test
- update
- SKARA-1949
- merge master
- Merge remote-tracking branch 'origin/master' into SKARA-1949
- SKARA-1949
- add ApprovalNeededComment
- fix some problems
- Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java
- Update bots/pr/src/main/java/org/openjdk/skara/bots/pr/CheckRun.java
- ... and 1 more: https://git.openjdk.org/skara/compare/bfaf1781...aab28673
Changes: https://git.openjdk.org/skara/pull/1544/files
Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1544&range=00
Issue: https://bugs.openjdk.org/browse/SKARA-1949
Stats: 454 lines in 12 files changed: 440 ins; 0 del; 14 mod
Patch: https://git.openjdk.org/skara/pull/1544.diff
Fetch: git fetch https://git.openjdk.org/skara.git pull/1544/head:pull/1544
PR: https://git.openjdk.org/skara/pull/1544
More information about the skara-dev
mailing list