Force labelling of PRs + connecting to an issue and reopen unlabeled issues #1781
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR comes with two new actions -- one that forces every PR to be connected to at least one issue, as well as forcing at least one label on every PR, and one that re-opens issues if they're closed without a label.
After some consideration, I decided not to work on an action that prevents closing issues without a linked PR because some issues may be closed as
won't-fix
, which inherently means they won't link to anything.One caveat is that the action for re-opening issues currently requires that the
GITHUB_TOKEN
has write permissions, because it sends a PATCH request through the github api. Not sure how the reviewer will test this ahead of time, since I think it needs to be merged into main. For my own testing, I merged these into my fork's main (which I later reset to track upstream/main again) and then opened+closed an unlabeled issue. I was able to successfully observe that it gets re-opened until a label is assigned.