You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gh issue develop creates branch on upstream repo instead of the fork #12986
not sure if this is a misunderstanding on my end or an actual issue but here's what happened
i have a fork of a repo, the standard setup where origin points to my fork and upstream to the original. ran gh issue develop <number> to start working on an issue and it created the branch on the upstream repo, not on my fork.
for contributors using the fork workflow this is pretty confusing because the whole point of having origin/upstream convention is to keep your work on your fork until you open a PR. creating the branch on upstream defeats that.
would it make sense to have gh issue develop check if the current repo is a fork and default to creating the branch on the fork instead? or at least a flag like --fork to explicitly target it?
Thank you for your issue! We have categorized it as an enhancement (feature or improvement) request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.
Unless you see the
help wantedContributions welcome
label, we are not currently looking for external contributions for this feature.
If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.
I reproduced this in a fresh fork-style clone to double-check.
In a clone where origin was standard-librarian/libsql and upstream was tursodatabase/libsql, gh repo set-default -v returned:
tursodatabase/libsql
Then I ran:
GH_DEBUG=api gh issue develop 2217 --name codex-issue-develop-repro-20260401-1775028472 --base main
The debug output showed gh resolving the issue as owner=tursodatabase repo=libsql, and the CreateLinkedBranch mutation also targeted the upstream repository. It failed with:
GraphQL: standard-librarian does not have the correct permissions to execute `CreateLinkedBranch` (createLinkedBranch)
So this does seem to confirm the behavior I reported: in a fork workflow, gh issue develop is targeting upstream for branch creation rather than the fork.
Without much digging, this looks to be default, I believe as the process flow here is mainly for those that are maintainer/contributors with write access to an upstream repo
However, gh issue develop has --branch-repo which from the help mentions
# Create a branch in repo monalisa/cli for issue 123 in repo cli/cli
$ gh issue develop 123 --repo cli/cli --branch-repo monalisa/cli
Activity
standard-librarian commentedon Mar 21, 2026
i'd like to work on this if it turns out to be a valid issue
BagToad commentedon Mar 30, 2026
Hey @standard-librarian, could you check what your default repo is in this case please?
Wondering if this setting is being respected for you here?
github-actions commentedon Mar 30, 2026
Thank you for your issue! We have categorized it as an enhancement (feature or improvement) request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.
Unless you see the help wantedContributions welcome
label, we are not currently looking for external contributions for this feature.
If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.
standard-librarian commentedon Apr 1, 2026
I reproduced this in a fresh fork-style clone to double-check.
In a clone where
originwasstandard-librarian/libsqlandupstreamwastursodatabase/libsql,gh repo set-default -vreturned:Then I ran:
The debug output showed
ghresolving the issue asowner=tursodatabase repo=libsql, and theCreateLinkedBranchmutation also targeted the upstream repository. It failed with:So this does seem to confirm the behavior I reported: in a fork workflow,
gh issue developis targeting upstream for branch creation rather than the fork.kilasuit commentedon Jul 15, 2026
Without much digging, this looks to be default, I believe as the process flow here is mainly for those that are maintainer/contributors with write access to an upstream repo
However,
gh issue develophas--branch-repowhich from the help mentions