-
Notifications
You must be signed in to change notification settings - Fork 295
Description
Environment
gh awv0.58.1- Repository hosted on GitHub Enterprise Server (GHES)
ghCLI authenticated to both github.com and the GHES instance
Problem
When running gh aw add-wizard (or gh aw add --create-pull-request) in a repo whose origin remote points to a GHES instance (e.g. https://ghes-host.example.com/org/repo.git), the wizard completes all steps successfully — downloads the workflow template from github.com, configures it, commits, and pushes the branch — but fails at PR creation with:
GraphQL: Could not resolve to a Repository with the name 'org/repo'. (repository)
The PR creation call is being sent to the github.com GraphQL API instead of the GHES instance's API, even though the git remote clearly points to GHES.
What was tried
- Default invocation — wizard detected the correct repo name but hit github.com for the PR.
GH_HOST=<ghe-host> gh aw add-wizard ...— This correctly targeted GHES for the PR, but also redirected the workflow template fetch to GHES, wheregithubnext/agenticsdoesn't exist, resulting in a 404.
Workaround
Ran gh aw add without --create-pull-request (which successfully fetched the template from github.com and pushed the branch to GHES), then manually created the PR with gh pr create, which correctly resolved the GHES host from the git remote.
Expected behavior
The wizard should fetch workflow templates from github.com but resolve the target repository host from the git remote (or gh auth config) when creating the PR — the same way gh pr create does.