Skip to content

feat(github): Add trusted sender and mention data to issue comments - #2209

Merged
BYK merged 4 commits into
mainfrom
feat/github-issue-comment-sender
Oct 27, 2026
Merged

BYK merged 4 commits into
mainfrom
feat/github-issue-comment-sender

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

First step for #2207. This is the part that any design for the trusted-tag gate needs.

Before this change, issue.comment.created events had the commenter only inside trustedSummary text. 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 webhook sender. This id does not change. Logins can be renamed and then used by another account.
  • senderLogin: for display only.
  • mentionsBot: true when the comment mentions the App slug. The slug comes from GITHUB_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 matchFields on the issue and repository resource types. An automation such as match: { 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]

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>
@vercel

vercel Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
junior-docs Ready Ready Preview Oct 27, 2026 9:58pm UTC

Request Review

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
…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>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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-evals

sentry-evals Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Sentry Evals

junior-behavioral

Run Status Passed Failed Errored Cost Tokens Duration
Head Failed 74 1 0 $0.76 0 426.22s

Base commit 79b4c1b has no eval run to compare against.

junior-integration

Run Status Passed Failed Errored Cost Tokens Duration
Head Passed 102 0 0 $1.14 0 464.12s

Base commit 79b4c1b has no eval run to compare against.

@BYK
BYK merged commit a8a1e9e into main Oct 27, 2026
49 of 50 checks passed
@BYK
BYK deleted the feat/github-issue-comment-sender branch October 27, 2026 22:14

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 9f4660a2 Deployed Oct 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant