Skip to content

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
Copy link
Contributor

@CannonLock CannonLock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One Tweak. Other then this it looks good and works on my local as expected.

Cannon pointed out this lets us re-run the action after linking an issue,
since there's no trigger for "connected" and "disconnected" events. Best
thing to do is still to link issues before the PR is officially opened, but
that shouldn't be the only way to do things!
Copy link
Contributor

@CannonLock CannonLock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jhiemstrawisc jhiemstrawisc merged commit b077c77 into PelicanPlatform:main Dec 11, 2024
22 checks passed
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

2 participants