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

Run a GitHub Action weekly to check for issues that are missing labels #16273

Open
6 tasks
HonkingGoose opened this issue Jun 27, 2022 · 10 comments · May be fixed by #32707
Open
6 tasks

Run a GitHub Action weekly to check for issues that are missing labels #16273

HonkingGoose opened this issue Jun 27, 2022 · 10 comments · May be fixed by #32707
Assignees
Labels
good first issue Suitable for new contributors help wanted Help is needed or welcomed on this issue priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:feature Feature (new functionality)

Comments

@HonkingGoose
Copy link
Collaborator

HonkingGoose commented Jun 27, 2022

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

  1. Action runs weekly
  2. 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 "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 mention the GitHub action check run
@HonkingGoose HonkingGoose added type:refactor Refactoring or improving of existing code status:requirements Full requirements are not yet known, so implementation should not be started priority-5-triage labels Jun 27, 2022
@rarkins
Copy link
Collaborator

rarkins commented Jun 27, 2022

How would we process this result? e.g. we "notice" a failed checkrun, or something else?

@HonkingGoose
Copy link
Collaborator Author

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>

@HonkingGoose
Copy link
Collaborator Author

@JamieMagee this is somewhat related to the issue you opened recently:

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? 😉

@HonkingGoose
Copy link
Collaborator Author

@JamieMagee do you want to work on this issue?

@JamieMagee
Copy link
Contributor

@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.

@HonkingGoose HonkingGoose added priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:feature Feature (new functionality) status:ready and removed priority-5-triage type:refactor Refactoring or improving of existing code status:requirements Full requirements are not yet known, so implementation should not be started labels Aug 29, 2022
@HonkingGoose HonkingGoose added help wanted Help is needed or welcomed on this issue good first issue Suitable for new contributors labels Dec 14, 2022
@denis-rossati
Copy link

Do you guys mind if I work on this one?

@HonkingGoose
Copy link
Collaborator Author

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 the status:ready label
      • the issue is at least priority-4-low, so we dropped the priority-5-triage label

Related PR:

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!)

@HonkingGoose
Copy link
Collaborator Author

@denis-rossati I'm assigning this issue to you, so we know you're going to work on it. 😉

@denis-rossati
Copy link

Much appreciated! I'm already working on it

@ph1l1pF ph1l1pF linked a pull request Nov 24, 2024 that will close this issue
6 tasks
@ph1l1pF
Copy link

ph1l1pF commented Nov 26, 2024

I worked on the issue and took the work of @denis-rossati as a basis. I improved and fixed some things and opened a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Suitable for new contributors help wanted Help is needed or welcomed on this issue priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:feature Feature (new functionality)
Projects
None yet
5 participants