Skip to content

Commands for Easy Issue Assignment #124

Description

@Harsh-vardhan09

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:

/claim

The bot should:

  1. Check whether the issue is already assigned.
  2. If unassigned, assign the issue to the person who used /claim.
  3. Add a confirmation comment.
  4. 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:

/assign @contributor

The bot should:

  1. Verify that the person using the command is a maintainer or admin.
  2. Validate the GitHub username.
  3. Assign the issue to the specified user.
  4. Remove the claimed label if applicable.
  5. 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

  1. A maintainer creates an issue.
  2. A contributor finds the issue they want to work on.
  3. The contributor comments:
/claim
  1. The bot assigns the issue to that contributor.
  2. The contributor works on the issue.
  3. If reassignment is needed, a maintainer comments:
/assign @another-contributor
  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Advanceimplementation needs someone advance for thisOpen-to-AllThis is an issue that can be assigned to anyone and work on it.Priority:HIGHThis is High priority Issue that must be solvedtype:DiscussionThe issue is under discussionwontfixThis will not be worked on

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions