Don't retag people who have already approved the PR - #8
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the release PR bot to avoid re-requesting reviews from users who have already approved an existing release PR, reducing notification noise and improving clarity on release approval status.
Changes:
- Add a
listReviewscall when updating an existing release PR to detect previously submitted approvals. - Filter out already-approved users from the set of reviewers to (re)request.
- Add a Jest test covering the “already approved” scenario.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/actions/release-pr-bot/manage-release-pr.js |
Fetches submitted PR reviews and filters out approvers when computing new reviewers to request. |
.github/actions/release-pr-bot/manage-release-pr.test.js |
Extends GitHub mock with listReviews and adds a test ensuring approvals are not re-requested. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
ritchtea
left a comment
There was a problem hiding this comment.
Do we need to update the version number anywhere too?
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
.github/actions/release-pr-bot/manage-release-pr.js:150
listReviewsreturns the full history of reviews; filtering on anystate === 'APPROVED'will exclude a reviewer even if their approval was later dismissed or replaced by a non-approval review. Also,currentReviewsis actually the requested-reviewers response (naming), and the current mapping can addundefinedlogins into the Set.
Consider deriving the latest review state per user (and filtering out missing logins), and request per_page: 100 to reduce the chance of missing approvals on PRs with many reviews.
const excludedLogins = new Set([
...currentReviews.users.map((u) => u.login),
...submittedReviews
.filter((review) => review.state === 'APPROVED')
.map((review) => review.user?.login),
This is done with release tags, have a little script to do this after stuff is merged into main |
Background 📜
There was an issue where approvers were getting retagged on release PRs, this was making it hard to track who has approved a release and who hasn't.
Changes 📝
Just added some code to filter out people who have already approved the PR.
Screenshots 📷
Checklist ✅