-
-
Notifications
You must be signed in to change notification settings - Fork 61
Description
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