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

chore(ci): add issue labeling reporter #27833

Closed

Conversation

denis-rossati
Copy link

Changes

This PR will create a new workflow that once in a week will check all open issues and search if any of them are not labeled correctly. If all of them are labeled as expected, it'll cleanly complete the job, otherwise, a new issue reporting the unlabeled issues will be created.

Currently the new issue does not have an label, though. I don't know if we should create a particular label just for that kind of issue or if the action should ignore them.

Context

Explained at #16273

Related issues

Documentation

  • I have updated the documentation.

How I've tested my work

  • Tested the new actions in a real repository and using act.

Copy link
Collaborator

@HonkingGoose HonkingGoose left a comment

Choose a reason for hiding this comment

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

Some small changes to start with.

After the code is changed to implement @viceice's comments/suggestions, we should run the shellcheck program on the bash parts of the code, to make sure it's safe.

https://www.shellcheck.net/

.github/workflows/check-unlabeled-issues.yml Outdated Show resolved Hide resolved
.github/workflows/check-unlabeled-issues.yml Outdated Show resolved Hide resolved
.github/workflows/check-unlabeled-issues.yml Outdated Show resolved Hide resolved
.github/workflows/check-unlabeled-issues.yml Outdated Show resolved Hide resolved
.github/workflows/check-unlabeled-issues.yml Outdated Show resolved Hide resolved
.github/workflows/check-unlabeled-issues.yml Outdated Show resolved Hide resolved
docs/development/issue-labeling.md Outdated Show resolved Hide resolved
docs/development/issue-labeling.md Outdated Show resolved Hide resolved
@viceice
Copy link
Member

viceice commented Mar 11, 2024

Some small changes to start with.

After the code is changed to implement @viceice's comments/suggestions, we should run the shellcheck program on the bash parts of the code, to make sure it's safe.

https://www.shellcheck.net/

That code should probably inside a .sh file inside tools folder, so it can be easily validated via shellcheck

@HonkingGoose
Copy link
Collaborator

That code should probably inside a .sh file inside tools folder, so it can be easily validated via shellcheck

That's way better, as we run shellcheck automatically, I think. So we know the file is good now, and later. 😄

tools/check-unlabeled-issues.sh Outdated Show resolved Hide resolved
docs/development/issue-labeling.md Outdated Show resolved Hide resolved
@denis-rossati denis-rossati requested a review from viceice March 17, 2024 06:39
Copy link
Collaborator

@HonkingGoose HonkingGoose left a comment

Choose a reason for hiding this comment

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

I'll let the maintainers review the shell script and GitHub Actions code and permissions.

I'm happy with the docs.

Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

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

Seems this needs extra testing. How can it be done without accidentally "spamming" ourselves?

# For example, if the repository added a "type:task" type label, then add "-label:type:task" to the TYPE_LABELS_FILTER.
TYPE_LABELS_FILTER='-label:type:bug -label:type:feature -label:type:docs -label:type:refactor -label:type:help'

PRIORITY_LABELS_FILTER='label:priority-1-critical -label:priority-2-high -label:priority-3-medium -label:priority-4-low'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
PRIORITY_LABELS_FILTER='label:priority-1-critical -label:priority-2-high -label:priority-3-medium -label:priority-4-low'
PRIORITY_LABELS_FILTER='-label:priority-1-critical -label:priority-2-high -label:priority-3-medium -label:priority-4-low'


ISSUE_BODY="# Label check action\n"

for FILTER in "$STATUS_LABELS_FILTER" "$TYPE_LABELS_FILTER" "$PRIORITY_LABELS_FILTER"; do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
for FILTER in "$STATUS_LABELS_FILTER" "$TYPE_LABELS_FILTER" "$PRIORITY_LABELS_FILTER"; do
for FILTER in "$TYPE_LABELS_FILTER" "$PRIORITY_LABELS_FILTER"; do

fi

# Provide an output in the action itself
echo -e "$ISSUE_BODY"
Copy link
Member

Choose a reason for hiding this comment

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

@rarkins
Copy link
Collaborator

rarkins commented Jul 23, 2024

Closing due to inactivity, reopening/resuming later is welcome

@rarkins rarkins closed this Jul 23, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run a GitHub Action weekly to check for issues that are missing labels
4 participants