Description
gh aw trial fails to fetch the workflow source file when using the owner/repo/workflow-name[@ref] format. The tool constructs the GitHub Contents API path as workflows/{name}.md instead of .github/workflows/{name}.md, resulting in a 404.
Reproduction
# From a repo that has a gh-aw workflow at .github/workflows/reproduce-issue.md
gh aw trial github/memex/reproduce-issue --disable-security-scanner --delete-host-repo-after
Expected
The trial fetches .github/workflows/reproduce-issue.md from the repository and proceeds with setup.
Actual
✗ failed to install workflow 'reproduce-issue' in trial mode:
failed to fetch workflow:
failed to download workflow from github/memex/workflows/reproduce-issue.md@main:
failed to fetch file content from github/memex/workflows/reproduce-issue.md@main:
HTTP 404: Not Found
(https://api.github.com/repos/github/memex/contents/workflows/reproduce-issue.md?ref=main)
The API URL shows contents/workflows/reproduce-issue.md — missing the .github/ prefix. The correct path would be contents/.github/workflows/reproduce-issue.md.
Additional context
- The same 404 occurs when specifying a branch ref:
gh aw trial "github/memex/reproduce-issue@copilot/add-slash-command-reproduce"
- The workflow compiles cleanly with
gh aw compile reproduce-issue (0 errors, 0 warnings), so the file is valid and in the right location.
- Local path format (
.github/workflows/reproduce-issue.md) also fails, but with a different error: '.github/workflows' does not look like a valid GitHub repository
- gh-aw version: v0.50.7
Description
gh aw trialfails to fetch the workflow source file when using theowner/repo/workflow-name[@ref]format. The tool constructs the GitHub Contents API path asworkflows/{name}.mdinstead of.github/workflows/{name}.md, resulting in a 404.Reproduction
# From a repo that has a gh-aw workflow at .github/workflows/reproduce-issue.md gh aw trial github/memex/reproduce-issue --disable-security-scanner --delete-host-repo-afterExpected
The trial fetches
.github/workflows/reproduce-issue.mdfrom the repository and proceeds with setup.Actual
The API URL shows
contents/workflows/reproduce-issue.md— missing the.github/prefix. The correct path would becontents/.github/workflows/reproduce-issue.md.Additional context
gh aw trial "github/memex/reproduce-issue@copilot/add-slash-command-reproduce"gh aw compile reproduce-issue(0 errors, 0 warnings), so the file is valid and in the right location..github/workflows/reproduce-issue.md) also fails, but with a different error:'.github/workflows' does not look like a valid GitHub repository