-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
bugSomething isn't workingSomething isn't workingpriority-2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions
Description
Describe the bug
❯ gh --version
gh version 2.24.3 (2023-03-09)
https://github.com/cli/cli/releases/tag/v2.24.3If I have the following configuration:
❯ git remote -v
pub https://github.com/bazelbuild/rules_docker/ (fetch)
pub https://github.com/bazelbuild/rules_docker/ (push)
pubfork https://github.com/gibfahn/rules_docker/ (fetch)
pubfork https://github.com/gibfahn/rules_docker/ (push)
up https://github.enterprise.com/bazelbuild/rules_docker/ (fetch)
up https://github.enterprise.com/bazelbuild/rules_docker/ (push)
fork https://github.enterprise.com/gibfahn/rules_docker/ (fetch)
fork https://github.enterprise.com/gibfahn/rules_docker/ (push)then there isn't a "default remote repository", the repo depends on the specific command I'm running. For creating PRs I'm creating the PR from the git @{push} ref to the @{upstream} branch ref, which could be fork -> up, or pubfork -> pub.
Previously I could do something like:
export GH_HOST=github.enterprise.com
export GH_REPO=https://github.enterprise.com/bazelbuild/rules_docker/
gh pr createBut now this is failing with:
X No default remote repository has been set for this directory.
please run `gh repo set-default` to select a default remote repository.
Expected vs actual behavior
I would like to go back to the previous behavior, where you could override the repo to use for gh pr create without needing to set a permanent default. I can work around this in my gh pr create wrapper, but it adds more complexity, and increases the chance that I'll run a different command against the wrong repo, due to a default I previously configured for a one-off use.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingpriority-2Affects more than a few users but doesn't prevent core functionsAffects more than a few users but doesn't prevent core functions