renovate
renovate copied to clipboard
Run a GitHub Action weekly to check for issues that are missing labels
Describe the proposed change(s).
Intro
I wrote some GitHub issue search queries that help us check if any issues are wrongly labeled.
Maybe we can automate this task, by writing a GitHub Action script.
Requirements
- Action runs weekly
- Check if any queries have a match
- If a query matches (so an issue is missing labels), throw error
- If no query matches, exit cleanly
Queries
https://github.com/renovatebot/renovate/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+-label%3Astatus%3Arequirements+-label%3Astatus%3Aready+-label%3Astatus%3Ain-progress+-label%3Astatus%3Ablocked+-label%3Astatus%3Awaiting-on-response+
https://github.com/renovatebot/renovate/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+-label%3Atype%3Abug+label%3Astatus%3Aready+-label%3Atype%3Afeature+-label%3Atype%3Adocs+-label%3Atype%3Arefactor+
https://github.com/renovatebot/renovate/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+-label%3Apriority-1-critical+-label%3Apriority-2-high+-label%3Apriority-3-medium+-label%3Apriority-4-low++-label%3Apriority-5-triage
Todo:
- [ ] Put status query in action
- [ ] Put type of issue query in action
- [ ] Put priority query in action
- [ ] Run action weekly
- [ ] Make action error if any query matches
- [ ] Else action exits cleanly
- [ ] If action works properly, update
docs/development/issue-labeling
to remove the queries, and mention the GitHub action check run
How would we process this result? e.g. we "notice" a failed checkrun, or something else?
We'll probably accidentally ignore the failed checkrun for the label check action. I usually ignore all CI messages that come from my PRs in this repository. Usually they're just telling me that a CI run has been cancelled due to merging in the latest main
branch. 🙈
Ideally the action would open an issue something like this:
# Label check action
## Found issue(s) with missing `status:` labels:
- #<number>
## Found issues(s) with missing `type:` labels:
- #<number>
## Found issues(s) with missing `priority` labels:
- #<number>
@JamieMagee this is somewhat related to the issue you opened recently:
- #17050
Checking labels is a thing that the GitHub Action can do for us. But I need somebody else to write the code. 😉 Let me know what you think? 😉
@JamieMagee do you want to work on this issue?
@HonkingGoose Not right now, but you're right that the update-data
workflow would be a good basis for a new workflow to add issue labels.
Do you guys mind if I work on this one?
I'm happy for you to work on this.
What changed?
Some things changed between when I opened this issue and now, that you should know:
- Only maintainers may create issues
- Because a maintainer makes the issue we assume:
- the issue is
status:ready
(most of the time), so we dropped thestatus:ready
label - the issue is at least
priority-4-low
, so we dropped thepriority-5-triage
label
- the issue is
- Because a maintainer makes the issue we assume:
Related PR:
- #25023
Issue labeling docs
Our Issue labeling docs mention a search for the issue and for the priority labels.
Updated requirements
I think the updated requirements are:
- [ ] Check if all issues have a
type:
label - [ ] Check if all issues have a
priority-number-description
label - [ ] Run GitHub Action weekly
- [ ] Error if any of the searches return a result (which means a maintainer needs to apply a label)
- [ ] If none of the searches returns a result: exit action cleanly
- [ ] Test action works
- [ ] Update the Issue labeling docs so they mention the action
- [ ] Put a comment in the action, that explains how to update it (we sometimes rename/drop labels, which may affect the results of the action!)
@denis-rossati I'm assigning this issue to you, so we know you're going to work on it. 😉
Much appreciated! I'm already working on it