Skip to content

ci: auto-remove needs review label when PR is reviewed#2402

Merged
serhalp merged 5 commits intomainfrom
ci/remove-needs-review-label-on-pr-review
Apr 7, 2026
Merged

ci: auto-remove needs review label when PR is reviewed#2402
serhalp merged 5 commits intomainfrom
ci/remove-needs-review-label-on-pr-review

Conversation

@serhalp
Copy link
Copy Markdown
Member

@serhalp serhalp commented Apr 6, 2026

🔗 Linked issue

N/A

🧭 Context

We've been using the needs review label on PRs that are not stale, desirable, meet our contribution guidelines, passing CI, haven't been reviewed yet or are ready for a re-review, etc.

But the label gets less valuable if you can't rely on it at a glance or to filter PRs. This can happen if we don't manually remove the label when submitting a PR review.

📚 Description

This PR adds a CI workflow that removes the needs review label from a PR, if present, when a PR review is submitted by a maintainer.

✅ Ignores "reviews" (some comments count as reviews) from the PR author:

Skipping self-review from @serhalp on PR #2402.

✅ Ignores reviews from bots like CodeRabbit:

Skipping bot review from @CodeRabbit on PR #2402.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Apr 7, 2026 9:51pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Apr 7, 2026 9:51pm
npmx-lunaria Ignored Ignored Apr 7, 2026 9:51pm

Request Review

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@serhalp serhalp force-pushed the ci/remove-needs-review-label-on-pr-review branch from 014373a to 9abce4a Compare April 6, 2026 19:11
@serhalp serhalp changed the title ci: automatically remove needs review label on PR review submission ci: auto-remove needs review label on PR review submission Apr 6, 2026
@serhalp serhalp changed the title ci: auto-remove needs review label on PR review submission ci: auto-remove needs review label when PR is reviewed Apr 6, 2026
@serhalp serhalp added the needs review This PR is waiting for a review from a maintainer label Apr 6, 2026
Copy link
Copy Markdown
Contributor

@43081j 43081j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks somewhat tolerable to me

@github-actions github-actions bot removed the needs review This PR is waiting for a review from a maintainer label Apr 7, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

📝 Walkthrough

Walkthrough

A new GitHub Actions workflow, remove-needs-review-on-review, was added. It triggers on pull_request_review events of type submitted and runs only for the npmx-dev/npmx.dev repository. The workflow inspects the submitted review and PR payload, verifies the PR has the needs review label, checks the reviewer is not a bot or the PR author, queries the reviewer’s permission level, and removes the needs review label when the permission is admin, maintain or write.

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description is directly related to the changeset, explaining the motivation for the new workflow and detailing its key behaviours.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/remove-needs-review-label-on-pr-review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d038b959-6826-42d5-9a95-b55ec5a1bb9e

📥 Commits

Reviewing files that changed from the base of the PR and between 973b9c7 and 962e9b3.

📒 Files selected for processing (1)
  • .github/workflows/remove-needs-review-on-review.yml

@serhalp serhalp added the needs review This PR is waiting for a review from a maintainer label Apr 7, 2026
@serhalp
Copy link
Copy Markdown
Member Author

serhalp commented Apr 7, 2026

this is a test

@serhalp
Copy link
Copy Markdown
Member Author

serhalp commented Apr 7, 2026

@CodeRabbit review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@serhalp serhalp added this pull request to the merge queue Apr 7, 2026
@serhalp serhalp removed the needs review This PR is waiting for a review from a maintainer label Apr 7, 2026
Merged via the queue into main with commit f88bbcb Apr 7, 2026
27 checks passed
@serhalp serhalp deleted the ci/remove-needs-review-label-on-pr-review branch April 7, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants