Skip to content

gh aw add fails to parse valid workflow path when repository name contains multiple hyphens #35682

Description

@arthurfvives

gh aw add fails to parse valid workflow path when repository name contains multiple hyphens

Follow-up on #35157.

I upgraded to the latest version of gh-aw:

gh-aw v0.77.1

I’m seeing gh aw add reject a workflow reference that appears to be valid. The same workflow path structure works in one internal repository, but fails after migrating the workflow catalog to another repository with a longer, hyphenated name.

Working case

gh aw add ORG/short-repo/agentic-workflows/business-deviation-tracker.md

This works as expected.

Failing case

gh aw add ORG/long-repository-name-with-hyphens/agentic-workflows/business-deviation-tracker.md

Output:

✗ invalid specification 'ORG/long-repository-name-with-hyphens/agentic-workflows/business-deviation-tracker.md': not a valid workflow path or repository package
  repository must be in format 'owner/repo'. Example: github/gh-aw

Expected behavior

The command should parse the repository as:

ORG/long-repository-name-with-hyphens

and the workflow path as:

agentic-workflows/business-deviation-tracker.md

Since repository names with hyphens are valid, I expected this to work the same way as the short repository name.

Actual behavior

The command rejects the full specification before resolving the workflow path, with an error saying the repository must be in owner/repo format.

Notes

The folder name does not seem to be the issue, because the same agentic-workflows/... path works in the short-name repository.

I cannot share the exact repository names publicly because these are internal company repositories, but I can provide more details privately if needed.

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