From 2cc01781a8f0bd2d07673ff0811e66e64d69a144 Mon Sep 17 00:00:00 2001 From: Marco Mura Date: Thu, 20 Feb 2025 13:01:20 -0800 Subject: [PATCH] Refer to 'remote' not 'origin' --- src/ipc/issueActions.ts | 2 +- src/lib/ipc/fromUI/startWork.ts | 2 +- src/lib/webview/controller/startwork/startWorkActionApi.ts | 2 +- .../controller/startwork/startWorkWebviewController.ts | 2 +- src/react/atlascode/startwork/StartWorkPage.tsx | 2 +- src/react/atlascode/startwork/startWorkController.ts | 6 +++--- src/webview/startwork/vscStartWorkActionApi.ts | 4 ++-- src/webviews/components/issue/StartWorkPage.tsx | 2 +- src/webviews/startWorkOnBitbucketIssueWebview.ts | 6 +++--- src/webviews/startWorkOnIssueWebview.ts | 6 +++--- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/ipc/issueActions.ts b/src/ipc/issueActions.ts index ec002ca3..bad0a37c 100644 --- a/src/ipc/issueActions.ts +++ b/src/ipc/issueActions.ts @@ -120,7 +120,7 @@ export interface StartWorkAction extends Action { remoteName: string; setupJira: boolean; setupBitbucket: boolean; - pushBranchToOrigin: boolean; + pushBranchToRemote: boolean; } export interface OpenStartWorkPageAction extends Action { diff --git a/src/lib/ipc/fromUI/startWork.ts b/src/lib/ipc/fromUI/startWork.ts index d3f2597b..5e081b24 100644 --- a/src/lib/ipc/fromUI/startWork.ts +++ b/src/lib/ipc/fromUI/startWork.ts @@ -27,7 +27,7 @@ export interface StartRequestAction { sourceBranch: Branch; targetBranch: string; upstream: string; - pushBranchToOrigin: boolean; + pushBranchToRemote: boolean; } export interface OpenSettingsAction { diff --git a/src/lib/webview/controller/startwork/startWorkActionApi.ts b/src/lib/webview/controller/startwork/startWorkActionApi.ts index 22396d99..40143281 100644 --- a/src/lib/webview/controller/startwork/startWorkActionApi.ts +++ b/src/lib/webview/controller/startwork/startWorkActionApi.ts @@ -17,7 +17,7 @@ export interface StartWorkActionApi { destinationBranch: string, sourceBranch: Branch, remote: string, - pushBranchToOrigin: boolean, + pushBranchToRemote: boolean, ): Promise; closePage(): void; getStartWorkConfig(): StartWorkBranchTemplate; diff --git a/src/lib/webview/controller/startwork/startWorkWebviewController.ts b/src/lib/webview/controller/startwork/startWorkWebviewController.ts index e87eeadd..67bc8b1b 100644 --- a/src/lib/webview/controller/startwork/startWorkWebviewController.ts +++ b/src/lib/webview/controller/startwork/startWorkWebviewController.ts @@ -134,7 +134,7 @@ export class StartWorkWebviewController implements WebviewController { - Push the new branch to origin + Push the new branch to remote diff --git a/src/react/atlascode/startwork/startWorkController.ts b/src/react/atlascode/startwork/startWorkController.ts index e3be9123..6c35c00e 100644 --- a/src/react/atlascode/startwork/startWorkController.ts +++ b/src/react/atlascode/startwork/startWorkController.ts @@ -30,7 +30,7 @@ export interface StartWorkControllerApi { sourceBranch: Branch, targetBranch: string, upstream: string, - pushBranchToOrigin: boolean, + pushBranchToRemote: boolean, ) => Promise<{ transistionStatus?: string; branch?: string; upstream?: string }>; closePage: () => void; openJiraIssue: () => void; @@ -123,7 +123,7 @@ export function useStartWorkController(): [StartWorkState, StartWorkControllerAp sourceBranch: Branch, targetBranch: string, upstream: string, - pushBranchToOrigin: boolean, + pushBranchToRemote: boolean, ): Promise => { return new Promise((resolve, reject) => { (async () => { @@ -138,7 +138,7 @@ export function useStartWorkController(): [StartWorkState, StartWorkControllerAp sourceBranch, targetBranch, upstream, - pushBranchToOrigin, + pushBranchToRemote, }, StartWorkMessageType.StartWorkResponse, ConnectionTimeout, diff --git a/src/webview/startwork/vscStartWorkActionApi.ts b/src/webview/startwork/vscStartWorkActionApi.ts index b66c72de..64495ad5 100644 --- a/src/webview/startwork/vscStartWorkActionApi.ts +++ b/src/webview/startwork/vscStartWorkActionApi.ts @@ -50,7 +50,7 @@ export class VSCStartWorkActionApi implements StartWorkActionApi { destinationBranch: string, sourceBranch: Branch, remote: string, - pushBranchToOrigin: boolean, + pushBranchToRemote: boolean, ): Promise { const scm = Container.bitbucketContext.getRepositoryScm(wsRepo.rootUri)!; @@ -76,7 +76,7 @@ export class VSCStartWorkActionApi implements StartWorkActionApi { `${sourceBranch.type === RefType.RemoteHead ? 'remotes/' : ''}${sourceBranch.name}`, ); - if (pushBranchToOrigin) { + if (pushBranchToRemote) { await scm.push(remote, destinationBranch, true); } } diff --git a/src/webviews/components/issue/StartWorkPage.tsx b/src/webviews/components/issue/StartWorkPage.tsx index fecd9bf2..2b050603 100644 --- a/src/webviews/components/issue/StartWorkPage.tsx +++ b/src/webviews/components/issue/StartWorkPage.tsx @@ -261,7 +261,7 @@ export default class StartWorkPage extends WebviewComponent { // checkout if a branch exists already try { @@ -163,7 +163,7 @@ export class StartWorkOnBitbucketIssueWebview `${sourceBranch.type === RefType.RemoteHead ? 'remotes/' : ''}${sourceBranch.name}`, ); - if (pushBranchToOrigin) { + if (pushBranchToRemote) { await repo.push(remote, destBranch, true); } diff --git a/src/webviews/startWorkOnIssueWebview.ts b/src/webviews/startWorkOnIssueWebview.ts index 1e7e5109..61288e0e 100644 --- a/src/webviews/startWorkOnIssueWebview.ts +++ b/src/webviews/startWorkOnIssueWebview.ts @@ -112,7 +112,7 @@ export class StartWorkOnIssueWebview e.targetBranchName, e.sourceBranch, e.remoteName, - e.pushBranchToOrigin, + e.pushBranchToRemote, ); } const currentUserId = issue.siteDetails.userId; @@ -151,7 +151,7 @@ export class StartWorkOnIssueWebview destBranch: string, sourceBranch: Branch, remote: string, - pushBranchToOrigin: boolean, + pushBranchToRemote: boolean, ): Promise { // checkout if a branch exists already try { @@ -175,7 +175,7 @@ export class StartWorkOnIssueWebview `${sourceBranch.type === RefType.RemoteHead ? 'remotes/' : ''}${sourceBranch.name}`, ); - if (pushBranchToOrigin) { + if (pushBranchToRemote) { await repo.push(remote, destBranch, true); } }