Skip to content

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

Merged
serhalp merged 5 commits into
mainfrom
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 into
mainfrom
ci/remove-needs-review-label-on-pr-review

Conversation

@serhalp

@serhalpserhalp commented Apr 6, 2026

Copy link
Copy Markdown
Member

🔗 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

vercelBot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentApr 7, 2026 9:51pm
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewApr 7, 2026 9:51pm
npmx-lunariaIgnoredIgnoredApr 7, 2026 9:51pm

Request Review

@codecov

codecovBot commented Apr 6, 2026

Copy link
Copy Markdown

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
serhalpforce-pushed the ci/remove-needs-review-label-on-pr-review branch from 014373a to 9abce4aCompareApril 6, 2026 19:11
@serhalpserhalp changed the title ci: automatically remove needs review label on PR review submissionci: auto-remove needs review label on PR review submissionApr 6, 2026
@serhalpserhalp changed the title ci: auto-remove needs review label on PR review submissionci: auto-remove needs review label when PR is reviewedApr 6, 2026
@serhalpserhalp added the needs review This PR is waiting for a review from a maintainer label Apr 6, 2026

@43081j43081j left a comment

Copy link
Copy Markdown
Contributor

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-actionsgithub-actionsBot removed the needs review This PR is waiting for a review from a maintainer label Apr 7, 2026
@coderabbitai

coderabbitaiBot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor
📝 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 nameStatusExplanation
Description check✅ PassedThe 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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread.github/workflows/remove-needs-review-on-review.yml
@serhalpserhalp added the needs review This PR is waiting for a review from a maintainer label Apr 7, 2026
@serhalp

Copy link
Copy Markdown
MemberAuthor

this is a test

@serhalp

Copy link
Copy Markdown
MemberAuthor

@CodeRabbit review

@coderabbitai

Copy link
Copy Markdown
Contributor
✅ 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 queueApr 7, 2026
@serhalpserhalp 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 f88bbcbApr 7, 2026
27 checks passed
@serhalp
serhalp deleted the ci/remove-needs-review-label-on-pr-review branch April 7, 2026 22:03
@github-actionsgithub-actionsBot mentioned this pull request Apr 7, 2026
@ghostdevv

Copy link
Copy Markdown
Member

I got a failure here, not sure if it's a fluke

https://github.com/npmx-dev/npmx.dev/actions/runs/24199409062/job/70638557339

Sign up for freeto 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

@serhalp@ghostdevv@43081j