Repository navigation
feat(github): Add trusted sender and mention data to issue comments - #2209
Merged
Merged
Conversation
Issue comment events now carry the commenter's numeric GitHub user id, login, and whether the comment mentions the App. Watches and event automations can match these keys, so an exact senderId list gates work in code before any Run starts. Refs #2207 Co-Authored-By: Burak Yigit Kaya <burak.kaya@sentry.io>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
1 of 5 tasks
BYK
requested changes
Oct 27, 2026
A trusted person who quotes another comment must not start work from the quoted text. GitHub sends mentions only as comment text, so read only the author's own lines. Trust still comes from senderId. Refs #2207
BYK
requested changes
Oct 27, 2026
…ment-sender # Conflicts: # packages/junior-github/src/webhooks/events.ts # packages/junior-github/tests/webhook-outcomes.test.ts Co-Authored-By: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 49748a6. Configure here.
Use the marked lexer, like getsentry/toolkit and getsentry/craft, to skip quotes, code, and HTML. This handles indented code, multi-backtick code spans, and fences with a language tag, which the line scanner missed. Co-Authored-By: Burak Yigit Kaya <burak.kaya@sentry.io>
Sentry Evalsjunior-behavioral
Base commit junior-integration
Base commit |
BYK
approved these changes
Oct 27, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

First step for #2207. This is the part that any design for the trusted-tag gate needs.
Before this change,
issue.comment.createdevents had the commenter only insidetrustedSummarytext. A watch or event automation could not filter on the commenter in code. The model had to read the summary and decide.Now the issue comment event data includes these keys:
senderId: the numeric GitHub user id from the webhooksender. This id does not change. Logins can be renamed and then used by another account.senderLogin: for display only.mentionsBot:truewhen the comment mentions the App slug. The slug comes fromGITHUB_APP_BOT_EMAIL. When that variable is not set, the key is not added, so a selector that needs it does not match.These keys are declared as
matchFieldson theissueandrepositoryresource types. An automation such asmatch: { mentionsBot: true, senderId: [123, 456] }is then checked in code before any Run starts. Events without these keys still do not match. Edited comments still do not publish.This PR does not decide who counts as trusted. The issue asks for "trusted people in the DB", which means people with a linked GitHub Identity and current Slack workspace membership. That check needs a core contract, because plugins cannot read
junior_identities. It also changes current core rules: Events never grant authority, Event runs use the system actor, and there is no GitHub Destination. I will propose that design separately in #2207.via BYK.
--
View Junior Session [Sentry]