Clarify and regress gh aw add spec handling for direct paths and shorthand @ref forms#35175
Closed
Copilot wants to merge 6 commits into
Closed
Clarify and regress gh aw add spec handling for direct paths and shorthand @ref forms#35175Copilot wants to merge 6 commits into
gh aw add spec handling for direct paths and shorthand @ref forms#35175Copilot wants to merge 6 commits into
Conversation
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] Fix gh aw add to accept direct workflow file path with branch ref
Clarify and regress direct May 27, 2026
owner/repo/path.md@ref handling in gh aw add
Collaborator
|
These specs should be supported/ owner/repo/route@ref |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Copilot
AI
changed the title
Clarify and regress direct
Clarify and regress May 27, 2026
owner/repo/path.md@ref handling in gh aw addgh aw add spec handling for direct paths and shorthand @ref forms
Contributor
There was a problem hiding this comment.
Pull request overview
This PR clarifies how gh aw add interprets shorthand specs vs direct workflow-path specs when an @ref is present (including slash-delimited branch names), and adds regression tests/docs to lock the intended behavior.
Changes:
- Added regression tests for
ResolveWorkflowsand repository-package parsing to ensure direct.md@refspecs are not treated as repository packages, and that refs propagate correctly for repo packages and fallback shorthand. - Updated
gh aw addhelp text and setup docs to include an explicit direct file-path example using a slash-delimited branch ref. - Updated an auto-generated workflow lock file, including a schedule change and a firewall allowlist change.
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/add_package_manifest_test.go | Adds regression tests covering @ref handling across repo packages, fallback behavior, and direct workflow paths. |
| pkg/cli/add_command.go | Updates CLI help examples/wording to clarify that branch names with slashes are supported in @version. |
| docs/src/content/docs/setup/cli.md | Adds a setup-doc example for direct workflow path + slash-delimited branch ref. |
| .github/workflows/daily-compiler-threat-spec-optimizer.lock.yml | Regenerates a compiled/locked workflow with a changed cron schedule and updated network allowlist. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 2
Comment on lines
62
to
+66
| name: "Daily Compiler Threat Spec Optimizer" | ||
| on: | ||
| schedule: | ||
| - cron: "19 2 * * *" | ||
| # Friendly format: daily (scattered) | ||
| - cron: "6 3 * * 1" | ||
| # Friendly format: weekly on monday around 03:00 (scattered) |
Comment on lines
1347
to
1350
| export COPILOT_API_KEY="$COPILOT_DUMMY_BYOK" | ||
| (umask 177 && touch /tmp/gh-aw/threat-detection/detection.log) | ||
| printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" | ||
| printf '%s\n' '{"$schema":"https://github.com/github/gh-aw-firewall/releases/download/v0.25.55/awf-config.schema.json","network":{"allowDomains":["api.business.githubcopilot.com","api.enterprise.githubcopilot.com","api.github.com","api.githubcopilot.com","api.individual.githubcopilot.com","github.com","host.docker.internal","registry.npmjs.org","telemetry.enterprise.githubcopilot.com"]},"apiProxy":{"enabled":true,"enableTokenSteering":true,"maxRuns":500,"maxEffectiveTokens":25000000},"container":{"imageTag":"0.25.55"}}' > "${RUNNER_TEMP}/gh-aw/awf-config.json" | ||
| cp "${RUNNER_TEMP}/gh-aw/awf-config.json" /tmp/gh-aw/awf-config.json |
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.
gh aw addwas ambiguous for direct workflow file specs with branch refs (especially slash-delimited branch names), and users could reasonably interpret failures as package-parser rejection. This change makes supported direct-path usage explicit and adds regression coverage to lock behavior.Problem framing
gh aw add owner/repo/path/to/workflow.md@refshould be treated as a direct workflow spec, not as a repository package (aw.yml) lookup.feature/github-agentic-workflowsshould remain valid in@ref.owner/repo@ref(repository package at root manifest)owner/repo/route@ref(fallback to direct workflow shorthand when nested package manifest is missing)Behavioral regression coverage
ResolveWorkflowstest for:owner/repo/agentic-workflows/pr-review.md@feature/github-agentic-workflowsowner/repo@feature/github-agentic-workflowsowner/repo/review@feature/github-agentic-workflows.md@refinput is not classified as a repository packageowner/repo@refis classified as a repository package with the parsed refCLI/docs clarity
gh aw addhelp examples to include direct file-path + slash-delimited branch ref usage.