Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improve finding issues without a pull request to work on #581

@nilleb

Description

@nilleb

As a newbie to the CPython repository, it can be quite frustrating to find issues that have not an associated pull request.

The linked:pr has a small coverage and requires manual intervention (ie. a "closes" or "fixes" magic keyword in the description). Moreover, the linked:pr will close the associated issue on merge, and sometimes the issue should be kept open (because of retrocompatibility PRs, and others that I can not yet grasp).

The GitHub API exposes another concept (cross references) and these appear in the history of an issue. This is why I first implemented a script to list all the issues and the associated PRs. The output looks like this. But this is not a scalable solution: the GitHub API could suffer if all the newbies were to use it, and the script needs to be executed often to keep the picture up to date with reality.

Given that the cross-references are essentially events, why don't we add a github workflow that

  • adds a has-pr label when a PR is created, referencing an issue in its title or in its description
  • adds a has-pr label when a comment is added to the PR mentioning an issue
  • removes the has-pr label when the PR is closed without being merged

I have a sample GitHub Actions workflow available on the nilleb/cpython-stub repository

A discussion has been opened on Discourse.

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