Repository navigation
feat(github): Split PR opener from commit authors in event data - #2373
Merged
Merged
Conversation
PR #2306 added `requesterUsername` and `requesterRole` next to the GitHub `authorUsername` and `authorRole`. Filters still mixed up who opened a PR with who wrote it. Replace those fields with two clear concepts: - `openerUsername`, `openerEmail`, `openerRole`: who opened the PR. On Junior's PRs this is the person who asked Junior to open it. When Junior does not know their GitHub login, the opener is left out. The bot is never used in its place. - `authors`: the GitHub logins of the commit authors and Co-authored-by people, bots included. Match fields can now declare `list: true`. A list event value matches when it includes the match value or any entry of a match list. The opener on Junior's PRs, `openerRole`, and `authors` load before the match decision when a filter uses them. The rest load only when an event matches, so the agent sees all of them. `authors` and the people involved share one read of the commits per delivery. Co-Authored-By: David Cramer <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Reviewed by Cursor Bugbot for commit 145a50f. Configure here.
Co-authored-by emails were lowercased before Junior read the GitHub login from them. Case-sensitive authors filters then missed people who appear only as co-authors. Keep the original case and lowercase only the plain emails that the people list dedupes.
dcramer
approved these changes
Oct 29, 2026
This was referenced Oct 29, 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.

Follow-up to #2306. That PR added
requesterUsernameandrequesterRolenext to GitHub'sauthorUsernameandauthorRole. Filters could still mix up who opened a PR with who wrote it. On Junior's PRs, the GitHubauthoris the bot.This PR replaces those fields with two concepts. Each one can be matched and is in the event data that the agent gets.
Fields
openerUsername,openerEmail,openerRole: who opened the PR. On Junior's PRs, this is the person who asked Junior to open it. Junior gets it from the saved opener row and that person's linked GitHub identity, as in feat(github): Store PR requesters with their Junior identity instead of parsing PR bodies #2306. When Junior does not know their GitHub login (no row yet, no linked account, or a failed lookup), the opener fields are left out. This changes feat(github): Store PR requesters with their Junior identity instead of parsing PR bodies #2306: Junior no longer uses the bot in its place, soopenerRole: "none"cannot match Junior's own PRs.authors: a list of the GitHub logins of the commit authors and ofCo-authored-bytrailers that use GitHub noreply emails. Bots are included, so Junior's PRs listsentry-junior[bot]and the people it credits.Core: list match fields
eventMatchFieldSchemaacceptslist: true. It is not allowed withboolean.eventMatchesnow compares sets. A list event value matches when it includes the match value, or any entry of a match list. Scalar behavior does not change.searchEventTypesoutput and the match schema description now includelist.Lazy loading
withGitHubPullRequestMatchData(it replacespull-request-roles.ts) loads the opener on Junior's PRs,openerRole, andauthors:neededMatchKeys).hasMatch), so delivered events have all of them.Repository-watch copies get the PR number through the shared
eventKey.authorsand the people involved in approvals and merges now share one read of the commit pages per delivery (shareCommitPages). Before this, they would read the commits twice.Review notes
authorUsername,authorEmail,authorRole,requesterUsername, orrequesterRolestops matching until it is recreated with the new keys. Check the paused issue-first automation before resuming it. I did not read or change it.authorsworks on check suites without that load.authorUsername.Checks
pnpm --filter @sentry/junior-github exec vitest run: 256 passed.pnpm --filter @sentry/junior exec vitest run tests/unit/events: passed.junior,junior-github,junior-plugin-api.pnpm lint.@sentry/junioralso fail onmain(event-automationscard delivery andevent-wake-delaytimeout). This change does not cause them.via David Cramer.
--
View Junior Session [Sentry]