mingyen066 opened a new pull request, #22475:
URL: https://github.com/apache/kafka/pull/22475
#21928 automatically appends reviewers to the `Reviewers:` trailer, but only
when the PR is from a committer/collaborator. On anyone else's PR, the
`pull_request_review` run is gated and needs a maintainer to approve it
first;
plain comments weren't credited at all.
Now a comment, a review-with-comment, or a plain Approve all automatically
add
the reviewer to the `Reviewers:` trailer — for anyone, no approval needed.
Two
things make this work:
- The on-review workflow triggers on the `workflow_run` of "Pull Request
Reviewed" with `types: [requested]`, not `completed`. The gated run never
completes, but `requested` fires the moment it's queued, so the gate never
blocks us.
- `workflow_run` doesn't carry the PR number for fork PRs, so we recover it
by
matching the run's `head_sha` against the open PRs.
The logic moves to a dedicated `pr-reviewers-trailer.py`; the trailer code
#21928 added to `pr-format.py`, `pr-reviewed.yml`, and `pr-linter.yml` is
reverted, leaving them as pure linting.
Try it: review or comment on https://github.com/mingyen066/kafka/pull/9 and
check that you land in that PR's `Reviewers:` trailer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]