You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Label trigger shorthand does not produce label filter condition in compiled workflow #19770
When using the label trigger shorthand syntax (e.g. on: pull_request labeled my-label), the compiled .lock.yml does not include a label name condition in the activation job's if: clause. This means the workflow triggers on anylabeled event, not just the specified label(s).
The YAML-format syntax (on: pull_request: types: [labeled] names: [my-label]) works correctly.
Root Cause
In pkg/workflow/label_trigger_parser.go, expandLabelTriggerShorthand() stores the names field as []string:
triggerConfig["names"] =labelNames// labelNames is []string
But in pkg/workflow/filters.go, applyLabelFilter() only type-asserts for string or []any:
The tests in label_trigger_parser_test.go (line 382) and label_trigger_parser_fuzz_test.go (line 144) also assert []string and need to be updated to []any.
Reproduction
Create a workflow with shorthand: on: pull_request labeled architecture-review-needed
Compile with gh aw compile
Inspect the activation job's if: condition — it will not contain a github.event.label.name check
Activity