investigate: agentic workflow skipped due to non-matching label (no fix needed)#18212
Closed
investigate: agentic workflow skipped due to non-matching label (no fix needed)#18212
Conversation
When users specify `names: label-name` in their `on.issues` or `on.pull_request` triggers with `types: [labeled]`, gh-aw was converting this to a job-level `if` condition. This caused the workflow to trigger for ALL label events and be immediately "skipped" when the label didn't match, resulting in noisy workflow runs. GitHub Actions supports native `labels:` filtering in the `on:` section for issues and pull_request events. For `types: [labeled]`, the filter applies specifically to the label being applied (not existing labels). This change adds `convertNamesToNativeLabelFilter` which renames `names:` -> `labels:` in the frontmatter before YAML generation for these event types. The generated lock file now uses the native filter, preventing the workflow from triggering entirely for non-matching labels. Discussion events are not converted because GitHub Actions does not support `labels:` filter for discussions. Recompiled .github/workflows/cloclo.lock.yml which had `names: cloclo`. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Investigate skipped agentic workflow
fix: use native GitHub Actions Feb 24, 2026
labels: filter instead of job-level conditions for issues/pull_request label triggers
Contributor
This is not a valid syntax for github actions yml. |
GitHub Actions does not support a `labels:` filter in the `on.issues` or `on.pull_request` trigger syntax. The previous change introduced invalid YAML that would break GitHub Actions processing. The original job-level `if` condition approach is correct: - Workflows trigger on all `issues: labeled` events (unavoidable) - Job conditions correctly skip when the label doesn't match - Skipped runs for non-matching labels are expected behavior Reverts changes to: - pkg/workflow/filters.go - pkg/workflow/compiler_orchestrator_workflow.go - pkg/workflow/label_filter_test.go - pkg/workflow/label_trigger_parser.go - .github/workflows/cloclo.lock.yml Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
... You're right — The original job-level |
Copilot
AI
changed the title
fix: use native GitHub Actions
investigate: agentic workflow skipped due to non-matching label (no fix needed)
Feb 24, 2026
labels: filter instead of job-level conditions for issues/pull_request label triggers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Investigated why the workflow at erikaheidi/blog was completely skipped. The workflow was correctly working as designed.
Root Cause
The workflow
create-blog-post.mdusesnames: content-todoto filteron.issues: labeledevents. gh-aw compiles this into a job-levelifcondition:Issue #43 was labeled with
enhancement(notcontent-todo), so the condition evaluated tofalseand all jobs were correctly skipped.Why No Code Change Is Made
GitHub Actions does not support a
labels:filter in theon.issuestrigger syntax — onlytypes:is supported. The job-levelifcondition approach is the correct and only way to filter by label name forissuesevents. The skipped run was expected behavior, not a bug.Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.