-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
chore(ci): add issue labeling reporter #27833
Conversation
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.
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.
That code should probably inside a |
That's way better, as we run shellcheck automatically, I think. So we know the file is good now, and later. 😄 |
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.
I'll let the maintainers review the shell script and GitHub Actions code and permissions.
I'm happy with the docs.
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.
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' |
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.
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 |
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.
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" |
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.
Closing due to inactivity, reopening/resuming later is welcome |
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
How I've tested my work