Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force labelling of PRs + connecting to an issue and reopen unlabeled issues #1781

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jhiemstrawisc
Copy link
Member

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.

@jhiemstrawisc jhiemstrawisc added enhancement New feature or request infrastructure GitHub Actions, Release management, and CI internal Internal code improvements, not user-facing labels Nov 27, 2024
@jhiemstrawisc jhiemstrawisc linked an issue Nov 27, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request infrastructure GitHub Actions, Release management, and CI internal Internal code improvements, not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create GHA to enforce labelling for metrics collection
1 participant