[hotfix][ci] Exclude PR author's own reviews from community review labeling#28341
Open
spuru9 wants to merge 1 commit into
Open
[hotfix][ci] Exclude PR author's own reviews from community review labeling#28341spuru9 wants to merge 1 commit into
spuru9 wants to merge 1 commit into
Conversation
…beling The community review GitHub Action applies the `community-reviewed` label when a non-committer reviews a PR. It also counted the PR author's own reviews (for example, a self-comment on their own PR) as a community review, so a PR could be labeled `community-reviewed` purely because its author commented on it, with no actual community review having occurred. Fetch the PR author login in the open-PRs query, pass it into the review tally, and skip reviews authored by the PR author so that only reviews from other community members are counted.
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
The community review GitHub Action (
community-review.sh) applies thecommunity-reviewedlabel when a non-committer reviews a PR. However, it also counts the PR author's own reviews — for example, a self-comment on their own PR — as a community review. As a result, a PR can be incorrectly labeledcommunity-reviewedpurely because its author commented on it, without any actual community review having taken place.This change excludes the PR author from the community-review tally so that only reviews from other community members are counted.
Brief change log
author.loginin the open-PRs GraphQL queryprocess_pr_reviewsVerifying this change
This change is a trivial rework of the community-review labeling script with no production code impact.
Verified locally by running the script's functions with network calls mocked:
community-reviewedlabel applied (previously the label was incorrectly applied).community-reviewedlabel applied as before.Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code