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
fix: resolve configured remote instead of hardcoding origin (#219)
* fix: resolve configured remote instead of hardcoding origin
getDefaultBranch and pushSetUpstream always assumed a remote named
"origin", breaking fork workflows where the only remote is e.g.
"upstream". Both now take a remote parameter (still defaulting to
"origin" for source compatibility), and every call site resolves the
actual remote via the existing resolveRemote/remoteSelection helpers
(respecting the defaultRemote setting) instead of assuming origin.
getDefaultBranch also falls back to `git remote show <remote>` when
the local origin/HEAD symbolic ref was never set, before giving up
and guessing a local main/master branch.
Closes#210
* chore: retrigger CI
* test: fix e2e ConfigurationManager stub broken by remote-resolution change
TestableCheckoutToCommand in checkoutInlineActions.test.ts used
'{} as ConfigurationManager', which throws on .get() now that
publishBranchAction/deleteLocalBranchAction call
resolveRemoteInteractive(git, { defaultRemote: configManager.get()... }).
Give it a working get() stub, matching the unit-test fix already applied
in checkoutToInlineActions.test.ts.
---------
Co-authored-by: Test <t@t.local>
0 commit comments