-
Notifications
You must be signed in to change notification settings - Fork 316
Description
Summary
When multiple labels are added to a PR simultaneously (e.g., via gh pr edit --add-label "a,b,c"), GitHub fires separate labeled events for each. Each event triggers all workflows that match pull_request_target: [labeled].
The compiled concurrency group is:
concurrency:
group: "gh-aw-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}"
cancel-in-progress: trueSince the group doesn't include the label name, all runs of the same workflow for the same PR share a group. With cancel-in-progress: true, the last run cancels all previous ones. If the surviving run was triggered by a different label than the workflow expects (e.g., Sentinel's surviving run was triggered by performance-review-needed instead of security-review-needed), the if: condition on pre_activation evaluates to false and the entire workflow is skipped.
Expected behavior
Include the label name (or label ID) in the concurrency group:
concurrency:
group: "gh-aw-${{ github.workflow }}-${{ github.event.pull_request.number }}-${{ github.event.label.name }}"
cancel-in-progress: trueThis way runs triggered by different labels don't cancel each other.
Reproduction
- Create multiple gh-aw workflows, each filtering on a different label
- Add all labels to a PR at once:
gh pr edit --add-label "label-a,label-b,label-c" - Observe that only one workflow actually runs; others are cancelled or skipped
Environment
- gh-aw v0.64.0