Skip to content

gh aw add rejects a direct workflow file path with a branch ref #35157

@arthurfvives

Description

@arthurfvives

Summary

gh aw add rejects a direct workflow file path with a branch ref:

gh aw add MY-ORG-NAME/my-repo-name/agentic-workflows/pr-review.md@feature/github-agentic-workflows

It fails with:

✗ invalid specification 'MY-ORG-NAME/my-repo-name/agentic-workflows/pr-review.md@feature/github-agentic-workflows': not a valid workflow path or repository package
  repository must be in format 'owner/repo'. Example: github/gh-aw

Expected behavior

Either:

  1. gh aw add owner/repo/path/to/workflow.md@ref should work; or
  2. the docs should clarify that gh aw add only accepts repository packages / workflow IDs, and that direct workflow file paths require a full GitHub URL.

Context

Repo: MY-ORG-NAME/my-repo-name
Branch: feature/github-agentic-workflows
Workflow path: agentic-workflows/pr-review.md

This shorthand with blob also fails, which makes sense because it is not a full URL:

gh aw add MY-ORG-NAME/my-repo-name/blob/feature/github-agentic-workflows/agentic-workflows/pr-review.md

Error:

✗ invalid specification 'MY-ORG-NAME/my-repo-name/blob/feature/github-agentic-workflows/agentic-workflows/pr-review.md': not a valid workflow path or repository package
  repository must be in format 'owner/repo'. Example: github/gh-aw

Question

Is direct owner/repo/path/to/workflow.md@branch intended to be supported by gh aw add, or is that format only intended for source, imports, and update?

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions