Skip to content

[CI] fix label bot reporting already-present labels as newly added#598

Open
MridulS wants to merge 1 commit into
mainfrom
gh584
Open

[CI] fix label bot reporting already-present labels as newly added#598
MridulS wants to merge 1 commit into
mainfrom
gh584

Conversation

@MridulS
Copy link
Copy Markdown
Member

@MridulS MridulS commented May 21, 2026

Fixes #584

@github-actions github-actions Bot added the CI label May 21, 2026
@github-actions
Copy link
Copy Markdown

Hi! Your PR was missing some labels 🔖 so I added them: CI

Comment on lines +65 to +70
# Query the labels currently on the PR rather than reading them from
# the event payload. The payload is a snapshot taken when the event
# was created, so labels the author adds right after opening the PR
# (a common case) would be missing from it and wrongly reported as
# newly added by the bot. See issue #584.
EXISTING_LABELS="$(gh pr view ${PR_NUM} --json labels --jq '.labels[].name')";
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm not a 100% sure if this change is actually a good idea. If the tag is added at the moment the PR is created it should be in the payload already so we don't need to use the gh cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect comment from label bot

1 participant