feat(ci): auto-assign the PR author as assignee on open#60929
Merged
Conversation
rnegron
approved these changes
Jun 1, 2026
Member
rnegron
left a comment
There was a problem hiding this comment.
I'm surprised there is no GH setting to auto-enable this 😬
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the “Opened PR” GitHub Actions workflow to automatically assign the PR author as the assignee when the PR is first opened, and consolidates that with the existing “author email hygiene” nudge into a single job.
Changes:
- Renamed/repurposed the existing
check-author-emailjob intoauthor-hygiene. - Added a non-blocking step to assign the PR author to their own PR on the initial
openedevent (skipping forks and bots). - Kept the existing org-membership + commit-email nudge behavior under the renamed job.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
Reviews (1): Last reviewed commit: "fix(ci): exclude bot accounts from autho..." | Re-trigger Greptile |
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.
Problem
PostHog has never been diligent about the GitHub Assignees field on PRs. Reviewers are already handled well (CODEOWNERS-based auto-assignment), but "who owns / is the DRI for this PR" is left blank — so
assignee:@mefilters, project boards, and "what's on my plate" views are unreliable, and there's no single owner to poke when a PR stalls or gets handed off.Changes
Auto-assign the PR author as the assignee when a PR is opened. The author is the natural DRI, and assignment is the lowest-cost win here — no round-robin "assign a random staffer" logic, which tends to become notification noise.
This is DRY'd into the existing on-open author job in
pr-opened.yml(the one that already nudges non-@posthog.comgit emails), renamed toauthor-hygienesince it now covers two author-on-open concerns. The new step:openedaction (fires exactly once; drafts included),continue-on-error, so it can never turn a PR red.Deliberately not included: assigning other/random staff as assignees (diffusion of responsibility + notification fatigue) — that's left to the existing reviewer automation.
How did you test this code?
I'm an agent. There's no automated test harness for this workflow's inline script. I validated
pr-opened.ymlwithactionlint(passes), confirmed it'soxfmt-clean, and checked the YAML parses. The added step uses the standardgithub.rest.issues.addAssigneescall under the workflow's existingpull-requests: writepermission (same permission that already backs PR comments in this file).🤖 Agent context
Authored by Claude Code (Opus) at @webjunkie's request, as a follow-up to the author-email-nudge work (#60613, #60693).
Decision trail:
auto-assign-reviewers.yml; the gap was the assignee/DRI field.opened-triggered author job rather than adding a new workflow file, since it already deals with the PR author on open. Kept the assignee step independent of the org-membership/app-token logic (assignment needs neither).Generated by Claude Code