Summary
Add simple GitHub issue commands to make issue assignment easier for contributors, maintainers, and admins.
- Contributors can use
/claim to assign an unassigned issue to themselves.
- Maintainers and admins can use
/assign @username to assign an issue to a specific contributor.
Commands
/claim
Allowed for: Contributors, Maintainers, Admins
When a contributor comments:
The bot should:
- Check whether the issue is already assigned.
- If unassigned, assign the issue to the person who used
/claim.
- Add a confirmation comment.
- Optionally add a
claimed label.
Example response:
✅ @username has claimed this issue.
If the issue is already assigned:
⚠️ This issue is already assigned to @current-assignee.
The bot must not change the existing assignee.
/assign @username
Allowed for: Maintainers and Admins only
Example:
The bot should:
- Verify that the person using the command is a maintainer or admin.
- Validate the GitHub username.
- Assign the issue to the specified user.
- Remove the
claimed label if applicable.
- Add a confirmation comment.
Example response:
✅ This issue has been assigned to @contributor by @maintainer.
If a regular contributor tries to use /assign:
❌ Only maintainers and admins can use /assign.
Permission Matrix
CommandContributorMaintainerAdmin
/claim
/assign @username
Edge Cases
/claim on an already-assigned issue must not change the assignee.
/assign without a username should show the correct usage.
- Invalid GitHub usernames should return a clear error.
- Repeated
/claim commands should not create duplicate actions.
- Commands should be processed idempotently to prevent duplicate assignments.
- The bot should handle closed issues appropriately.
Example Workflow
- A maintainer creates an issue.
- A contributor finds the issue they want to work on.
- The contributor comments:
- The bot assigns the issue to that contributor.
- The contributor works on the issue.
- If reassignment is needed, a maintainer comments:
/assign @another-contributor
- The bot updates the assignee and confirms the change.
Acceptance Criteria
- Contributors can claim unassigned issues using
/claim.
/claim automatically assigns the issue to the commenter.
/claim cannot override an existing assignee.
- Maintainers can assign issues using
/assign @username.
- Admins can assign issues using
/assign @username.
- Regular contributors cannot use
/assign.
- Invalid command usage returns a helpful message.
- Successful commands produce confirmation comments.
- Duplicate command processing is prevented.
- Tests cover permission checks and assignment edge cases.
Suggested Implementation
Implement the commands using a GitHub Action triggered by issue_comment events or through a GitHub App/bot.
The implementation should use the minimum required GitHub token permissions needed to manage issue assignments.
Summary
Add simple GitHub issue commands to make issue assignment easier for contributors, maintainers, and admins.
/claimto assign an unassigned issue to themselves./assign @usernameto assign an issue to a specific contributor.Commands
/claimAllowed for: Contributors, Maintainers, Admins
When a contributor comments:
The bot should:
/claim.claimedlabel.Example response:
If the issue is already assigned:
The bot must not change the existing assignee.
/assign @usernameAllowed for: Maintainers and Admins only
Example:
The bot should:
claimedlabel if applicable.Example response:
If a regular contributor tries to use
/assign:Permission Matrix
CommandContributorMaintainerAdmin
/claim
/assign @username
Edge Cases
/claimon an already-assigned issue must not change the assignee./assignwithout a username should show the correct usage./claimcommands should not create duplicate actions.Example Workflow
Acceptance Criteria
/claim./claimautomatically assigns the issue to the commenter./claimcannot override an existing assignee./assign @username./assign @username./assign.Suggested Implementation
Implement the commands using a GitHub Action triggered by
issue_commentevents or through a GitHub App/bot.The implementation should use the minimum required GitHub token permissions needed to manage issue assignments.