Skip to content

Chore: Auto-assign the issue when a contributor comments /assign #1460

Description

@vib3withsimran

Feature Description

Relevant files: .github/workflows/.github/scripts/moderate-contributions.cjs

Description:

Chore Description

Currently, assignment is fully manual: moderate-contributions.cjs closes PRs that don't reference an issue assigned to the author, but there is no automation to actually assign issues. Contributors must wait for a maintainer to manually assign them before they can open a valid PR.

Motivation / Use Case

Proposed Solution

Add a GitHub Actions workflow (e.g., .github/workflows/auto-assign.yml) that listens to issue_comment events and:

  1. Detects a comment containing /assign (case-insensitive, leading-slash).
  2. Assigns the commenting user to the issue via github.rest.issues.addAssignees.
  3. Comments back confirmation, e.g. @user, you've been assigned! Please open a PR referencing this issue within 7 days.
  4. Ignores maintainers / already-assigned issues, and requires commenter to have a valid GitHub account (non-bot).
  5. Prevent double-assignment: if someone else is already assigned, reply that the issue is taken.

Alternatives Considered

Acceptance Criteria

  • /assign on any open unassigned issue assigns the commenter
  • /assign on an assigned issue does not overwrite the assignee
  • Reuses the existing moderation patterns/helper style where possible

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions