fix(enforce-single-assignee): comment when multiple owners#51
Merged
Conversation
When multiple assignees are chosen simultaneously, GitHub fires one `assigned` event per person with a different `assignee` each time. Concurrent runs would race and cancel each other out, leaving nobody assigned. New behavior: remove all assignees and post a comment listing who was attempted, asking the team to assign a single owner explicitly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
scotwells
approved these changes
Mar 6, 2026
drewr
added a commit
that referenced
this pull request
Mar 6, 2026
## Summary Adds a concurrency group to the enforce-single-assignee workflow to prevent duplicate comments when multiple assignees are added simultaneously. ## Problem As shown in #50 and #51, when multiple users are assigned at once, GitHub fires one `assigned` event per user. Each concurrent workflow run posted its own comment, resulting in duplicates. ## Fix ```yaml concurrency: group: enforce-single-assignee-${{ github.event.issue.number }} ``` Runs are now serialized per issue. The first run removes all assignees and posts one comment. Subsequent queued runs see 0 assignees and exit immediately with no action.
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.
Summary
Fixes a race condition in the enforce-single-assignee workflow.
Problem
As shown in #50, when multiple assignees are chosen simultaneously, GitHub fires one
assignedevent per person — each with a differentgithub.event.assignee. Concurrent workflow runs each tried to keep their own "latest" assignee and remove the others, cancelling each other out and leaving nobody assigned.Fix
LATEST_ASSIGNEE— no longer making a guess about intentBehavior
github.event.assignee(racy)Example comment posted to issue