Skip to content

Commit

Permalink
Refer to 'remote' not 'origin'
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomura committed Feb 20, 2025
1 parent 9b93482 commit 2cc0178
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/ipc/issueActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export interface StartWorkAction extends Action {
remoteName: string;
setupJira: boolean;
setupBitbucket: boolean;
pushBranchToOrigin: boolean;
pushBranchToRemote: boolean;
}

export interface OpenStartWorkPageAction extends Action {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/ipc/fromUI/startWork.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface StartRequestAction {
sourceBranch: Branch;
targetBranch: string;
upstream: string;
pushBranchToOrigin: boolean;
pushBranchToRemote: boolean;
}

export interface OpenSettingsAction {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/webview/controller/startwork/startWorkActionApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface StartWorkActionApi {
destinationBranch: string,
sourceBranch: Branch,
remote: string,
pushBranchToOrigin: boolean,
pushBranchToRemote: boolean,
): Promise<void>;
closePage(): void;
getStartWorkConfig(): StartWorkBranchTemplate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class StartWorkWebviewController implements WebviewController<StartWorkIs
msg.targetBranch,
msg.sourceBranch,
msg.upstream,
msg.pushBranchToOrigin,
msg.pushBranchToRemote,
);
}
this.postMessage({
Expand Down
2 changes: 1 addition & 1 deletion src/react/atlascode/startwork/StartWorkPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ const StartWorkPage: React.FunctionComponent = () => {
<Grid item>
<Typography variant="h4">
<Box fontWeight="fontWeightBold">
Push the new branch to origin
Push the new branch to remote
</Box>
</Typography>
</Grid>
Expand Down
6 changes: 3 additions & 3 deletions src/react/atlascode/startwork/startWorkController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -123,7 +123,7 @@ export function useStartWorkController(): [StartWorkState, StartWorkControllerAp
sourceBranch: Branch,
targetBranch: string,
upstream: string,
pushBranchToOrigin: boolean,
pushBranchToRemote: boolean,
): Promise<StartWorkResponseMessage> => {
return new Promise<StartWorkResponseMessage>((resolve, reject) => {
(async () => {
Expand All @@ -138,7 +138,7 @@ export function useStartWorkController(): [StartWorkState, StartWorkControllerAp
sourceBranch,
targetBranch,
upstream,
pushBranchToOrigin,
pushBranchToRemote,
},
StartWorkMessageType.StartWorkResponse,
ConnectionTimeout,
Expand Down
4 changes: 2 additions & 2 deletions src/webview/startwork/vscStartWorkActionApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export class VSCStartWorkActionApi implements StartWorkActionApi {
destinationBranch: string,
sourceBranch: Branch,
remote: string,
pushBranchToOrigin: boolean,
pushBranchToRemote: boolean,
): Promise<void> {
const scm = Container.bitbucketContext.getRepositoryScm(wsRepo.rootUri)!;

Expand All @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/webviews/components/issue/StartWorkPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export default class StartWorkPage extends WebviewComponent<Emit, Accept, {}, St
transition: this.state.transition,
setupJira: this.state.jiraSetupEnabled,
setupBitbucket: this.isEmptyRepo(this.state.repo) ? false : this.state.bitbucketSetupEnabled,
pushBranchToOrigin: false,
pushBranchToRemote: false,
});
};

Expand Down
6 changes: 3 additions & 3 deletions src/webviews/startWorkOnBitbucketIssueWebview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class StartWorkOnBitbucketIssueWebview
e.targetBranchName,
e.sourceBranch,
e.remoteName,
e.pushBranchToOrigin,
e.pushBranchToRemote,
);
}

Expand Down Expand Up @@ -139,7 +139,7 @@ export class StartWorkOnBitbucketIssueWebview
destBranch: string,
sourceBranch: Branch,
remote: string,
pushBranchToOrigin: boolean,
pushBranchToRemote: boolean,
): Promise<void> {
// checkout if a branch exists already
try {
Expand All @@ -163,7 +163,7 @@ export class StartWorkOnBitbucketIssueWebview
`${sourceBranch.type === RefType.RemoteHead ? 'remotes/' : ''}${sourceBranch.name}`,
);

if (pushBranchToOrigin) {
if (pushBranchToRemote) {
await repo.push(remote, destBranch, true);
}

Expand Down
6 changes: 3 additions & 3 deletions src/webviews/startWorkOnIssueWebview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class StartWorkOnIssueWebview
e.targetBranchName,
e.sourceBranch,
e.remoteName,
e.pushBranchToOrigin,
e.pushBranchToRemote,
);
}
const currentUserId = issue.siteDetails.userId;
Expand Down Expand Up @@ -151,7 +151,7 @@ export class StartWorkOnIssueWebview
destBranch: string,
sourceBranch: Branch,
remote: string,
pushBranchToOrigin: boolean,
pushBranchToRemote: boolean,
): Promise<void> {
// checkout if a branch exists already
try {
Expand All @@ -175,7 +175,7 @@ export class StartWorkOnIssueWebview
`${sourceBranch.type === RefType.RemoteHead ? 'remotes/' : ''}${sourceBranch.name}`,
);

if (pushBranchToOrigin) {
if (pushBranchToRemote) {
await repo.push(remote, destBranch, true);
}
}
Expand Down

0 comments on commit 2cc0178

Please sign in to comment.