Skip to content

Add labels field for workflow categorization and filtering - #5912

Merged
pelikhan merged 4 commits into
mainfrom
copilot/add-labels-field-support
Dec 9, 2025
Merged

Add labels field for workflow categorization and filtering#5912
pelikhan merged 4 commits into
mainfrom
copilot/add-labels-field-support

Conversation

Copilot AI commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

Adds optional labels field to workflow frontmatter for categorization. Labels are displayed in status command output and can be filtered using --label flag.

Changes

  • Schema: Added labels field to main_workflow_schema.json as optional array of strings
  • Status Command: Extended WorkflowStatus struct with Labels field, displayed in both table and JSON output
  • Filtering: Added --label <label> flag to status command for case-insensitive label matching
  • Tests: Added marshaling and filtering test coverage

Usage

---
name: CI Doctor
labels: ["automation", "ci", "diagnostics"]
on: pull_request
---
# View all workflows with labels
gh aw status --json

# Filter by label
gh aw status --label automation

Labels appear as [automation ci diagnostics] in table output and as JSON array in --json mode.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/user
    • Triggering command: /usr/bin/gh gh api user --jq .login g_.a GO111MODULE ps GOINSECURE GOMOD GOMODCACHE ps e-gi�� e-github-app-token.git GO111MODULE /opt/hostedtoolcache/go/1.25.0/x64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login ion-precompile.git GO111MODULE 1/x64/bin/node GOINSECURE GOMOD GOMODCACHE oCXyPhhYx1Vd0/B1RY457az_iowFWnQdmO/z6D7m-lEg3UtB-v env 57/create_discussion.js GO111MODULE (http block)
    • Triggering command: /usr/bin/gh gh api user --jq .login it/ref/tags/v5 GO111MODULE 9b068602748fa7bd00acd0bc5b8a12af7aa/log.json GOINSECURE GOMOD GOMODCACHE ache/go/1.25.0/x64/pkg/tool/linux_amd64/compile 8656�� -json GO111MODULE e/git GOINSECURE GOMOD GOMODCACHE e/git (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Add support for a top level "labels" field (takes an array of string) that allows to label an agentic workflow. The labels are not used currently, but they are reported in the "status/list" command. Add filters "--label" to commands working on multiple workflows based on labels.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits December 9, 2025 00:02
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for labels field in agentic workflows Add labels field for workflow categorization and filtering Dec 9, 2025
Copilot AI requested a review from pelikhan December 9, 2025 00:23
@pelikhan
pelikhan marked this pull request as ready for review December 9, 2025 00:37
@pelikhan
pelikhan merged commit 807efef into main Dec 9, 2025
5 checks passed
@pelikhan
pelikhan deleted the copilot/add-labels-field-support branch December 9, 2025 00:37
github-actions Bot added a commit that referenced this pull request Dec 9, 2025
Added documentation for two new user-facing features merged in the last 24 hours:

1. Workflow labels field (PR #5912)
   - Added `labels` field documentation to frontmatter.md
   - Documented `--label` flag for status command in cli.md
   - Labels enable workflow categorization and filtering

2. Minimize-comment safe output (PR #5911)
   - Added `minimize-comment` to safe-outputs.md table
   - Created detailed section with usage, requirements, and examples
   - Documents GraphQL node ID requirement and SPAM classification

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
github-actions Bot added a commit that referenced this pull request Dec 9, 2025
Add two new glossary terms from recent features:
- Labels: workflow categorization and filtering
- Minimize Comment: safe output for comment moderation

Related: #5912, #5911
@github-actions github-actions Bot mentioned this pull request Dec 9, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants