Skip to content

fix(github): preserve bot classification across collection paths - #9387

Open
fs24-chrter wants to merge 1 commit into
apache:mainfrom
fs24-chrter:fix/github-bot-classification
Open

fs24-chrter wants to merge 1 commit into
apache:mainfrom
fs24-chrter:fix/github-bot-classification

Conversation

@fs24-chrter

@fs24-chrter fs24-chrter commented Nov 12, 2026 •

Copy link
Copy Markdown

⚠️ Pre Checklist

Please complete ALL items in this checklist, and remove before submitting

  • I have read through the Contributing Documentation.
  • I have added relevant tests.
  • I have added relevant documentation.
  • I will add labels to the PR, such as pr-type/bug-fix, pr-type/feature-development, etc.

Summary

This PR fixes GitHub bots being incorrectly classified as human accounts when collecting data through REST and GraphQL.

  • GraphQL: Requests __typename to distinguish bots from users reliably. Previously, the decoder could populate both fragments and cause bots to be treated as users.
  • REST: Adds [bot] to usernames when GitHub explicitly returns type: "Bot", including aliases such as Copilot. This preserves bot detection during account conversion.
  • Across repositories: Keeps bot classification intact when different repositories and collection methods update the same account, using its numeric GitHub ID.
  • Regression coverage: Adds unit and end-to-end tests for decoder behavior, REST aliases, historical data, and repeated conversion across repositories.

Does this close any open issues?

Closes #9385

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.

[Bug][GitHub] Bot reviewers are classified as human after GraphQL and REST comment collection

1 participant