Skip to content

Enforce single assignee on issues#49

Merged
drewr merged 1 commit intomainfrom
enforce-single-assignee
Mar 6, 2026
Merged

Enforce single assignee on issues#49
drewr merged 1 commit intomainfrom
enforce-single-assignee

Conversation

@drewr
Copy link
Copy Markdown
Contributor

@drewr drewr commented Mar 6, 2026

Summary

  • Adds reusable workflow enforce-single-assignee.yaml that removes all but the latest-assigned user when an issue has more than one assignee
  • Adds documentation in docs/enforce-single-assignee/README.md

Motivation

Ownership of an issue is an important part of working as a team. We can use issue assignments to immediately identify who is taking responsibility:

  • 0 assignees: No one. Triage the issue or otherwise archive it.
  • 1 assignee: They're the owner. They shepherd the problem through to resolution, turning ambiguity into an outcome.
  • 2 or more assignees: Error state. Choose the latest-assigned user. Even a tight team of two or three should have a clear owner who has the responsibility at any given time.

(If an issue needs to be handed off, supply the context in a comment and update the assignee.)

Changes

  • .github/workflows/enforce-single-assignee.yaml — reusable workflow_call workflow; triggered on issues: [assigned] by calling repos; uses gh api to DELETE extra assignees, keeping only github.event.assignee
  • docs/enforce-single-assignee/README.md — usage, required permissions, behavior table, calling example, troubleshooting

Usage

Calling repos opt in with:

# .github/workflows/enforce-assignees.yaml
on:
  issues:
    types: [assigned]

jobs:
  enforce:
    uses: datum-cloud/actions/.github/workflows/enforce-single-assignee.yaml@v1
    secrets: inherit

Testing

  • Created a test issue and assigned 2+ users — workflow ran and removed all but the latest-assigned user
  • Assigned 1 user — workflow exited with no action

Adds a reusable workflow that enforces a maximum of one assignee per
issue, removing all but the latest-assigned user when the limit is exceeded.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@drewr drewr requested review from ecv, kevwilliams and scotwells March 6, 2026 19:55
Copy link
Copy Markdown

@ecv ecv left a comment

Choose a reason for hiding this comment

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

Yeah this should be a built-in setting honestly.

@drewr drewr changed the title Add enforce-single-assignee reusable workflow Enforce single assignee on issues Mar 6, 2026
@drewr
Copy link
Copy Markdown
Contributor Author

drewr commented Mar 6, 2026

Not sure how to test without merging first.

@drewr drewr merged commit 028bbac into main Mar 6, 2026
3 checks passed
@drewr drewr deleted the enforce-single-assignee branch March 6, 2026 21:11
@drewr drewr mentioned this pull request Mar 6, 2026
@drewr
Copy link
Copy Markdown
Contributor Author

drewr commented Mar 6, 2026

Looks like this didn't actually get activated on the assigned action.

@drewr
Copy link
Copy Markdown
Contributor Author

drewr commented Mar 6, 2026

Claude activated it for us in 41e9092 and pushed to main before I could intervene.

@scotwells
Copy link
Copy Markdown
Contributor

@drewr you didn't configure the workflow to execute when issues were assigned in this repo. You only set it up to be called from an external repo.

@scotwells
Copy link
Copy Markdown
Contributor

Claude activated it for us in 41e9092 and pushed to main before I could intervene.

Looks like there was a bypass rule set for org admins. Adjusted it to still allow, but require to go through a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants