Skip to content

[Feature Request] Add GitHub Action to require issue assignment before PR submission #7880

@ylevental

Description

@ylevental

Problem

Currently, contributors can submit PRs for issues they were never assigned to. This causes:

  1. Wasted effort - Multiple people work on the same issue unknowingly
  2. PR conflicts - Maintainers must manually close duplicate PRs
  3. Contributor frustration - People invest time only to have PRs rejected
  4. Increased maintainer workload - Manual enforcement of the CLAIM process

Recent example: Issue #7858 had 2 PRs submitted, one from an assigned contributor and one from an unassigned contributor.

Proposed Solution

Implement a GitHub Action that:

  • Runs automatically on every PR
  • Extracts the linked issue number from the PR description (e.g., "Closes [Term Entry] Python NumPy - ndarray: max() #7858")
  • Checks via GitHub API if the PR author is assigned to that issue
  • Fails as a required status check if the author is not assigned
  • Provides clear error message: "You must be assigned to issue #XXXX before submitting a PR"

Benefits

Prevents unauthorized PRs (not just discourages)
✅ Immediate feedback to contributors
✅ Reduces maintainer workload
✅ Makes CLAIM process enforceable, not advisory
✅ Zero additional manual work required

Implementation

This can be implemented using GitHub Actions with actions/github-script@v7. Similar systems are used successfully by projects like:

  • First Contributions
  • freeCodeCamp
  • Mozilla's projects

I'm happy to help implement this if the maintainers are interested.

Alternative Considered

  • Auto-closing bot: Works but may seem harsh to new contributors
  • Manual enforcement: Current system, doesn't scale
  • Required reviews: Still allows unauthorized PRs, just blocks merging

The required status check approach provides the best balance of enforcement and contributor experience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    new entryNew entry or entries

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions