Skip to content

fix(github): own review threads by bot user id - #1623

Merged
dcramer merged 1 commit into
mainfrom
fix/github-graphql-bot-login-thread-resolve
Aug 19, 2026
Merged

fix(github): own review threads by bot user id#1623
dcramer merged 1 commit into
mainfrom
fix/github-graphql-bot-login-thread-resolve

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What failed

Junior refused to resolve a review thread on its own PR.

Root cause

GitHub returns different bot login shapes. REST uses sentry-junior[bot]. GraphQL Bot.login uses sentry-junior.

The configured noreply email already encodes the stable bot user id. The review-thread GraphQL payload also exposes that id as Bot.databaseId.

Fix

Parse the documented GitHub bot noreply format once. Compare its user id with author.databaseId. Keep the repository match. Do not use login or another fallback identity path.

Verification

  • Confirmed the live fix(api-turns): claim idle local empty wakes #1614 payload returns author.databaseId: 264270552.
  • pnpm --filter @sentry/junior-github exec vitest run tests/resolve-pull-request-review-thread.test.ts tests/webhook-outcomes.test.ts tests/commit-composition.test.ts — 44 passed.

Evidence

  • JUNIOR-89
  • slack:C0B595QDZLL:1787171595.435169

Requested by David Cramer.

--

View Junior Session [Sentry]

@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview Aug 19, 2026 10:21pm

Request Review

Review-thread resolve compared GraphQL author.login to the noreply
bot login. GitHub GraphQL Bot.login omits [bot], so every Junior-
authored PR failed the ownership gate.

Use the bot user id already encoded in GITHUB_APP_BOT_EMAIL and
compare it to author.databaseId from the GraphQL payload.

Evidence: #jr-cramer on #1614; JUNIOR-89
Co-Authored-By: David Cramer <david@sentry.io>
@sentry-junior
sentry-junior Bot force-pushed the fix/github-graphql-bot-login-thread-resolve branch from a4b41dd to 67ac2e4 Compare August 19, 2026 22:20
@dcramer
dcramer marked this pull request as ready for review August 19, 2026 22:31
@github-actions github-actions Bot added the risk: low PR risk score: low label Aug 19, 2026
@dcramer
dcramer merged commit 3ed7cff into main Aug 19, 2026
39 checks passed
@dcramer
dcramer deleted the fix/github-graphql-bot-login-thread-resolve branch August 19, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant