Skip to content

gh aw trial fails with 404 — missing .github/ prefix in workflow path resolution #18875

@maxbeizer

Description

@maxbeizer

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

Metadata

Metadata

Assignees

Labels

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