Skip to content

[hotfix][ci] Exclude PR author's own reviews from community review labeling#28341

Open
spuru9 wants to merge 1 commit into
apache:masterfrom
spuru9:hotfix/community-review-exclude-author
Open

[hotfix][ci] Exclude PR author's own reviews from community review labeling#28341
spuru9 wants to merge 1 commit into
apache:masterfrom
spuru9:hotfix/community-review-exclude-author

Conversation

@spuru9
Copy link
Copy Markdown
Contributor

@spuru9 spuru9 commented Jun 6, 2026

What is the purpose of the change

The community review GitHub Action (community-review.sh) applies the community-reviewed label 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 labeled community-reviewed purely 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

  • Fetch the PR author.login in the open-PRs GraphQL query
  • Pass the PR author login into process_pr_reviews
  • Skip reviews authored by the PR author when counting community reviews / approvals

Verifying 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:

  • A PR whose only review is by its own author → no community-reviewed label applied (previously the label was incorrectly applied).
  • A PR that also has a review from another community member → community-reviewed label applied as before.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

Was generative AI tooling used to co-author this PR?
  • Yes (Claude Code)

Generated-by: Claude Code

…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.
@flinkbot
Copy link
Copy Markdown
Collaborator

flinkbot commented Jun 6, 2026

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

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.

2 participants