Skip to content

Fix issue labeling logic#13145

Merged
mekarpeles merged 5 commits into
masterfrom
needs-response-labeling
Jul 11, 2026
Merged

Fix issue labeling logic#13145
mekarpeles merged 5 commits into
masterfrom
needs-response-labeling

Conversation

@jimchamp

@jimchamp jimchamp commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Follows #13139

Fixes logic for the recently added should_label_issue function.

Please squash before merging

Technical

Testing

Screenshot

Stakeholders

Copilot AI review requested due to automatic review settings July 10, 2026 19:34
@jimchamp jimchamp marked this pull request as draft July 10, 2026 19:35

Copilot AI 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.

Pull request overview

This PR updates the GitHub issue comment digest bot’s “should we label this issue as Needs: Response?” decision logic, specifically how bot commenters are handled.

Changes:

  • Refactors should_label_issue() to use a walrus assignment and early return for bot accounts.
  • Preserves the previous semantics for known bot accounts vs. non-bot commenters (with one noted type-safety concern in review comments).

Comment thread scripts/gh_scripts/issue_comment_bot.py Outdated
Comment on lines +197 to +198
if (bot_acct := next((bot for bot in bots if bot["githubUsername"] == last_commenter), None)):
return bot_acct["triggersNeedsResponse"]
Comment thread scripts/gh_scripts/issue_comment_bot.py
Comment thread scripts/gh_scripts/issue_comment_bot.py Outdated
Comment thread scripts/gh_scripts/issue_comment_bot.py Outdated
@jimchamp jimchamp marked this pull request as ready for review July 10, 2026 19:47
@mekarpeles mekarpeles merged commit 0806553 into master Jul 11, 2026
8 checks passed
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