Skip to content

feat(seer): Assign Seer-created PRs to invoking user on GitHub#112619

Closed
JoshFerge wants to merge 1 commit intomasterfrom
joshferge/feat/assign-prs-to-user
Closed

feat(seer): Assign Seer-created PRs to invoking user on GitHub#112619
JoshFerge wants to merge 1 commit intomasterfrom
joshferge/feat/assign-prs-to-user

Conversation

@JoshFerge
Copy link
Copy Markdown
Member

@JoshFerge JoshFerge commented Apr 9, 2026

Summary

  • Register organizations:seer-assign-prs-to-user feature flag to gate rollout
  • Move get_github_username_for_user to shared sentry/seer/utils.py so both autofix and explorer flows can use it
  • Pass assign_pr_to_user boolean and github_username to Seer in both autofix request options and explorer user context
  • Existing review-request behavior remains ungated

Context

PRs created by Seer's coding agent are authored by the GitHub App bot, making them hard for users to find. This change enables assigning PRs to the invoking user so they appear in GitHub's "assigned to you" filter.

Companion Seer PR: https://github.com/getsentry/seer/pull/5704

Test plan

  • Existing TestGetGithubUsernameForUser tests pass (13/13)
  • Existing TestCallAutofix tests pass
  • Existing CollectUserOrgContextTest tests pass (18/18)
  • Flag off: no behavior change
  • Flag on + manual autofix: PR assigned to user
  • Flag on + explorer: PR assigned to user + review requested
  • Automated run (no user): no assignment

Add support for assigning PRs created by Seer's coding agent to the
user who triggered the run. This makes PRs discoverable in GitHub's
"assigned to you" filter instead of being lost as bot-authored PRs.

- Register `organizations:seer-assign-prs-to-user` feature flag
- Move `get_github_username_for_user` to shared `seer/utils.py`
- Pass `assign_pr_to_user` flag and `github_username` to Seer in both
  autofix options and explorer user context
- Existing review-request behavior is not gated by the flag

Requires corresponding Seer changes to call `pr.add_to_assignees()`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Agent transcript: https://claudescope.sentry.dev/share/8COVqBts5ukuOuYkdOaogRqr1wgoYPcitMSL_fl3Gps
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 9, 2026
@JoshFerge
Copy link
Copy Markdown
Member Author

Superseded by stacked PRs: #112669 (refactor) and #112670 (feature).

@JoshFerge JoshFerge closed this Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant