-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Add workflow to handle wait-merge label task
#36478
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,76 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name: task-wait-merge-label | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+3
to
+7
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| concurrency: | |
| group: task-wait-merge-label-${{ github.ref }} | |
| cancel-in-progress: true |
Copilot
AI
Jan 28, 2026
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.
The cleanup-labels job does not verify authentication status before attempting to remove labels, unlike the update-prs job which checks 'gh auth status' on line 20. For consistency and to catch authentication issues early, consider adding the same authentication check at the beginning of this job's script.
| run: | | |
| run: | | |
| gh auth status || exit 1 |
Copilot
AI
Jan 28, 2026
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.
The cleanup-labels job should include error handling similar to the update-prs job. Currently, if removing a label fails, the error is only logged but doesn't affect the exit code. Consider tracking failures and exiting with a non-zero code if any labels fail to be removed, similar to how the update-prs job handles failures.
| for pr_number in $closed_prs; do | |
| if gh pr edit "$pr_number" --repo ${{ github.repository }} --remove-label "reviewed/wait-merge"; then | |
| echo "#$pr_number label removed" | |
| else | |
| echo "#$pr_number failed to remove label" | |
| fi | |
| done | |
| failed=0 | |
| for pr_number in $closed_prs; do | |
| if gh pr edit "$pr_number" --repo ${{ github.repository }} --remove-label "reviewed/wait-merge"; then | |
| echo "#$pr_number label removed" | |
| else | |
| echo "#$pr_number failed to remove label" | |
| failed=1 | |
| fi | |
| done | |
| if [ "$failed" -ne 0 ]; then | |
| echo "" | |
| echo "One or more labels failed to be removed from closed PRs." | |
| fi | |
| exit $failed |
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.
The workflow name 'task-wait-merge-label' is inconsistent with the file name 'sync-prs.yml'. Based on other workflows in this repository (e.g., 'cron-licenses' in cron-licenses.yml, 'labeler' in pull-labeler.yml), the name should match the file name more closely. Consider renaming the workflow to 'sync-prs' to match the file name, or rename the file to 'task-wait-merge-label.yml' to match the workflow name.