Visitar URL original
Automatically link PRs to issues · Issue #602 · python/core-workflow · GitHub
Skip to content

Automatically link PRs to issues #602

Description

@edvilme

As many, I want to start contributing to the project by finding un-claimed issues. However, by the way the repo is set up, finding them is difficult.

Taking advantage of the GH-XXXX convention, I think we should have an automated action on PR creation/renaming that extracts the issue number and assigns it to the PR, so that it is visible from the issue list.

I would like to work on this, but want to know other people's opinions/alternatives.

Activity

  1. skirpichev commented on May 21, 2026

    @skirpichev
    Member

    I think we should have an automated action on PR creation/renaming that extracts the issue number and assigns it to the PR, so that it is visible from the issue list.

    Bedevere already adds linked prs to the issue description. An example: python/cpython#150045 (see "Linked PRs" section). Maybe we could add some labels, that track the issue has some open prs, or that all linked PRs are merged (perhaps, it's a case to add "pending" label). Though, I'm not sure if this will be helpful.

    But keep in mind, that issue can have multiple prs. Not only backports: some issues are complex and prs address them only partially. That means, if issue has linked prs - it doesn't mean you can't contribute.

    I would like to work on this

    So far, I don't see a clear proposal from you.

  2. transferred this issue frompython/cpythonon May 21, 2026
  3. skirpichev commented on May 21, 2026

    @skirpichev
    Member

    Perhaps, it's a duplicate of #581

  4. hugovk commented on May 21, 2026

    @hugovk
    Member

    Thanks for the suggestion.

    Please could you clarify what assigning an issue to a PR means?

    Is it a GitHub feature? Can you show some screnshots/links to how it's used in other repos, and link the docs?

  5. edvilme commented on May 21, 2026

    @edvilme
    Author

    Hi, thanks for your reply.

    Yes, basically GitHub allows you to "link" PRs to issues. What this basically means is that the PR shows up on the Development section of the issue. This is useful because:

    • It shows the related PR(s) in a standarized way that is easier to track
    • It allows to close the issue when the PR gets merged
    • On the issue list, it identifies issues that already have linked PRs, making it easier to discover those who don't (either through the UI, the API, or using agents).

    See https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue

    Image

    =================

    I was thinking different approaches:

    I am personally happier with option 1 but don't know if that has been explored already.

  6. skirpichev commented on May 21, 2026

    @skirpichev
    Member

    Docs says:

    When you merge a linked pull request into the default branch of a repository, its linked issue is automatically closed.

    That's certainly so, if you link to issues, using keywords. Does it "works" in same way to manually linked issues? If so, I don't think it's acceptable for CPython: as I said, issue can have multiple prs.

  7. edvilme commented on May 25, 2026

    @edvilme
    Author

    Yes. You are right. I now realize there is not a 1:1 relationship. Maybe we could do something like a "has PR" label (non intrusive, and as you say, people can still contribute, comment or make follow up PRs)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions