Skip to content

Add agentic workflow for labelling azd extension PRs#8192

Open
JeffreyCA wants to merge 1 commit into
Azure:mainfrom
JeffreyCA:agentic-extension-pr-labeler
Open

Add agentic workflow for labelling azd extension PRs#8192
JeffreyCA wants to merge 1 commit into
Azure:mainfrom
JeffreyCA:agentic-extension-pr-labeler

Conversation

@JeffreyCA
Copy link
Copy Markdown
Contributor

@JeffreyCA JeffreyCA commented May 14, 2026

This PR introduces a GitHub Agentic Workflow and adds an extension-focused PR labeler for first-party azd extensions under cli/azd/extensions/** and closely related Azure AI design docs.

Note

This workflow uses safe-outputs.add-labels.allowed: [area/extensions, ext-*] so new extension labels can be picked up without editing the workflow each time. Runtime glob matching for allowed was recently added in github/gh-aw#32027

What changes

  • Adds an Agentic Workflow that runs for PRs touching cli/azd/extensions/** or cli/azd/docs/**.
  • Infers related extension IDs from extension folder names, explicit IDs in docs, and strongly related doc topics.
  • Applies the matching ext-* label for mapped extension IDs.
  • Applies multiple ext-* labels when a PR relates to multiple mapped extension IDs.
  • Falls back to area/extensions when extension-related changes do not match a current ext-* mapping.

Agentic Workflow setup

Because this is the first Agentic Workflow in the repository, this PR also includes the required gh-aw setup artifacts generated from gh aw init:

  • Agent instructions/configuration
  • MCP configuration
  • Action pin metadata
  • Lock-file Git attributes
  • Copilot setup changes to install the gh-aw CLI

These files support compiling and maintaining the generated workflow lock file and make future Agentic Workflow changes reproducible for reviewers and agents.

Safety and references

The workflow follows gh-aw guidance for Markdown-based workflows, compiled lock files, read-only agent permissions, and GitHub writes through safe-outputs.add-labels:

Operational note: the default Copilot engine uses the COPILOT_GITHUB_TOKEN GitHub Actions secret for Copilot CLI authentication. The current PAT expires on August 12, 2026 and should be renewed/rotated before then using the gh-aw AI engine secret guidance:

Validation

Tested and verified on fork repo PR

image image

Copilot AI review requested due to automatic review settings May 14, 2026 21:52
@JeffreyCA JeffreyCA marked this pull request as draft May 14, 2026 22:07
@JeffreyCA JeffreyCA force-pushed the agentic-extension-pr-labeler branch 3 times, most recently from 90c78d4 to d6f7f90 Compare May 15, 2026 00:55
@JeffreyCA JeffreyCA marked this pull request as ready for review May 15, 2026 01:17
@JeffreyCA JeffreyCA linked an issue May 15, 2026 that may be closed by this pull request
@JeffreyCA JeffreyCA force-pushed the agentic-extension-pr-labeler branch from d6f7f90 to fedc3c7 Compare May 15, 2026 18:53
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JeffreyCA JeffreyCA force-pushed the agentic-extension-pr-labeler branch from fedc3c7 to 7127ad5 Compare May 15, 2026 22:28
Copy link
Copy Markdown
Member

@jongio jongio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The security model here is solid - read-only agent permissions, safe-outputs constrained to add_labels with an allowlist, team membership gating in pre_activation, and AWF firewall sandboxing. pull_request_target is the right trigger since this needs to label fork PRs too.

One question on the doc version references in the agent instructions file - see inline comment.

nit: .github/mcp.json is missing a trailing newline.

- Workflow files: `.github/workflows/*.md` and `.github/workflows/**/*.md`
- Workflow lock files: `.github/workflows/*.lock.yml`
- Shared components: `.github/workflows/shared/*.md`
- Configuration: https://github.com/github/gh-aw/blob/v0.72.1/.github/aw/github-agentic-workflows.md
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] The documentation URLs throughout this file reference gh-aw v0.72.1 (13 occurrences on lines 34, 56, 66, 76, etc.), but the compiled lock file and copilot-setup-steps.yml both use v0.74.3. Is this intentional - e.g., these docs are pinned to a known-good version that was tested? Or should they be updated to match?

If the prompt files at those URLs changed between versions, this agent would load stale instructions when developers use it to create or update workflows.

Comment thread .github/mcp.json
]
}
}
} No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LOW] nit: missing newline at end of file.

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.

Housekeeping - auto-label extension PRs

2 participants