-
Notifications
You must be signed in to change notification settings - Fork 45
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
ci: improve and automate issue/PR labels #72
Conversation
Some initial impressions:
I'd like to give this some more time to percolate in my mind before confirming above thoughts or giving further opinions. |
I'm in agreement with @valarnin regarding the use of (As a personal take on the use of the label, I feel like it tends to end up kind of user-hostile, and its implementations usually haven't been helpful in the situations I've observed. I would prefer to avoid that here unless it's really necessary.) Apart from that, I'm fine with the rest of the changes and will defer to you all on the specifics of any implementations. |
Similar thoughts to @valarnin on |
Appreciate all the feedback so far. I'm planning to leave this open at least until next weekend in case others want to chime in or if there are additional thoughts.
|
Updated the PR based on the comments above, and edited my original description to reflect the changes. This also consolidates all of the PR labeling functionality into the existing (renamed for clarity) workflow, which should be easier to review/maintain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me now.
(_edited on 03-01-2024_) With cactbot's transition to a community-maintained project, I'd like to propose some changes to the issue/PR labels to help with organization and automation. This PR includes _~a handful of workflow scripts~ an update to the existing PR labeling workflow script_ to automate some of the label management discussed below. I'm admittedly trying to strike a balance between adding things that will be useful and will keep the issue/PR lists scrubbed (especially if/when repo activity ramps up leading in to 7.0), but not overengineering. I'm not sure how well this proposal strikes that balance, so this is definitely a wide call for comments, suggestions, and pushback. NB: If we decide to go forward with this (or some version of this) proposal, it probably makes sense to throw this in a 'maintainers' guide doc or something similar. But I'd be inclined to tackle that with a follow-up PR. ## Issue Labels: Existing issue type labels (`bug`, `question`, `enhancement`) are automatically applied when a new issue is opened. `needs-review` is also automatically applied to all new issues (and can be manually removed once an issue is reviewed). I propose to keep that behavior, and add the following label options: | Label | Applied | Intent | |:------|:--------|:-------| | `pending info` | Manual | Used when we are waiting on more info from the issue opener. | | `cant repro` | Manual | Used when a bug cannot be reproduced and appears unique to the issue opener. | | `fix-me` | Manual & Automatic | Used to indicate a valid bug/feature request that should be addressed. (Auto-applied when issue linked to PR.) | | `not planned` | Manual | Used to indicate that a bug/requested feature is intended behavior, a system limitation, etc., and won't be addressed. | | _~`stale`~_ | _~Automatic~_ | _~Applied automatically to inactive issues (see discussion below) after a period of inactivity. If there is no further activity, they will be automatically closed.~_ | ## PR Labels: Similarly to issues, I propose to automatically label PRs with `needs-review` when opened and whenever a new commit is pushed to the PR _(until an approving review is submitted)_. That label ~can be manually removed by the reviewer once the PR has been initially reviewed~ _will be automatically removed whenever a maintainer submits a review (approving or otherwise)_. I also propose to add the following label option~s~: | Label | Applied | Intent | |:------|:--------|:-------| | `auto-merge` | Automatic | Toggled whenever a PR's auto-merge setting is changed (added visibility for reviewers before approving). | | _~`changes-requested`~_ | _~Manual~_ | _~Used when a reviewer has requested changes before merging. Can be manually removed once changes are committed & reviewed.~_ | | _~`review-complete`~_ | _~Automatic~_ | _~Automatically applied when an approving review is submitted.~_ | | _~`stale`~_ | _~Automatic~_ | _~Same as with issues (see discussion below).~_ | ## Supporting Workflow Scripts: This PR modifies the existing (now renamed) `labels.yaml` -> `label_pr.yml` script to automate this functionality, specifically: * If a PR is opened or a new commit is pushed: * auto-label.cjs will (continue to) add scope-related labels * auto_label.cjs will add `needs-review` unless the PR already has an approving review from a maintainer * Any linked issues will have the `fix-me` label applied to them. * If a review (approving or otherwise) is added by a maintainer, the `needs-review` label is removed. * If auto merge is enabled or disabled on the PR, the `auto-merge` label is added/removed. _~This PR includes some workflow scripts to help automate the label management discussed above.~_ * _~`label-linked-issues` - adds `fix-me` to an issue when it is linked to a PR.~_ * _~`label-pr-automerge` - toggles `auto-merge` on a PR whenever the auto-merge setting is changed.~_ * _~`label-pr-review` -~_ * _~Adds `review-complete` (and removes `needs-review`) when an approving review is submitted.~_ * _~Adds `needs-review` to a PR when opened or when a new commit is pushed (**unless** `review-complete` is present).~_ * _~`stale-daemon` - runs `actions/stale` every 4 hours and:~_ * _~Adds `stale` to any issue that has had no activity in 30 days and __does not have__ `needs-review` or `fix-me`.~_ * _~Adds `stale` to any PR that has had no activity in 60 days and __does not have__ `needs-review`.~_ * _~Removes `stale` from any issue/PR if there is subsequent activity.~_ * _~Closes any issue/PR that has been labeled `stale` for 7 days with no subsequent activity.~_ * _~Adds an explanatory comment to issues/PRs when marking as `stale` or closing.~_ b177af5
(edited on 03-01-2024)
With cactbot's transition to a community-maintained project, I'd like to propose some changes to the issue/PR labels to help with organization and automation. This PR includes
a handful of workflow scriptsan update to the existing PR labeling workflow script to automate some of the label management discussed below.I'm admittedly trying to strike a balance between adding things that will be useful and will keep the issue/PR lists scrubbed (especially if/when repo activity ramps up leading in to 7.0), but not overengineering. I'm not sure how well this proposal strikes that balance, so this is definitely a wide call for comments, suggestions, and pushback.
NB: If we decide to go forward with this (or some version of this) proposal, it probably makes sense to throw this in a 'maintainers' guide doc or something similar. But I'd be inclined to tackle that with a follow-up PR.
Issue Labels:
Existing issue type labels (
bug
,question
,enhancement
) are automatically applied when a new issue is opened.needs-review
is also automatically applied to all new issues (and can be manually removed once an issue is reviewed).I propose to keep that behavior, and add the following label options:
pending info
cant repro
fix-me
not planned
stale
AutomaticApplied automatically to inactive issues (see discussion below) after a period of inactivity. If there is no further activity, they will be automatically closed.PR Labels:
Similarly to issues, I propose to automatically label PRs with
needs-review
when opened and whenever a new commit is pushed to the PR (until an approving review is submitted). That labelcan be manually removed by the reviewer once the PR has been initially reviewedwill be automatically removed whenever a maintainer submits a review (approving or otherwise).I also propose to add the following label option
s:auto-merge
changes-requested
ManualUsed when a reviewer has requested changes before merging. Can be manually removed once changes are committed & reviewed.review-complete
AutomaticAutomatically applied when an approving review is submitted.stale
AutomaticSame as with issues (see discussion below).Supporting Workflow Scripts:
This PR modifies the existing (now renamed)
labels.yaml
->label_pr.yml
script to automate this functionality, specifically:needs-review
unless the PR already has an approving review from a maintainerfix-me
label applied to them.needs-review
label is removed.auto-merge
label is added/removed.This PR includes some workflow scripts to help automate the label management discussed above.label-linked-issues
- addsfix-me
to an issue when it is linked to a PR.label-pr-automerge
- togglesauto-merge
on a PR whenever the auto-merge setting is changed.label-pr-review
-Addsreview-complete
(and removesneeds-review
) when an approving review is submitted.Addsneeds-review
to a PR when opened or when a new commit is pushed (unlessreview-complete
is present).stale-daemon
- runsactions/stale
every 4 hours and:Addsstale
to any issue that has had no activity in 30 days and does not haveneeds-review
orfix-me
.Addsstale
to any PR that has had no activity in 60 days and does not haveneeds-review
.Removesstale
from any issue/PR if there is subsequent activity.Closes any issue/PR that has been labeledstale
for 7 days with no subsequent activity.Adds an explanatory comment to issues/PRs when marking asstale
or closing.