diff --git a/src/lib/git.js b/src/lib/git.js index a432f3cd..bb194226 100644 --- a/src/lib/git.js +++ b/src/lib/git.js @@ -91,7 +91,7 @@ function createAndCheckoutBranch(owner, repoName, baseBranch, featureBranch) { } function push(owner, repoName, username, branchName) { - return rpc.exec(`git push ${username} ${branchName} --force`, { + return rpc.exec(`git push ${username} ${branchName}:${branchName} --force`, { cwd: env.getRepoPath(owner, repoName) }); } diff --git a/test/__snapshots__/cliService.test.js.snap b/test/__snapshots__/cliService.test.js.snap index afd3b308..5dfb3fba 100644 --- a/test/__snapshots__/cliService.test.js.snap +++ b/test/__snapshots__/cliService.test.js.snap @@ -62,7 +62,7 @@ Array [ [Function], ], Array [ - "git push sqren backport/6.x/pr-myPullRequest_pr-myOtherPullRequest --force", + "git push sqren backport/6.x/pr-myPullRequest_pr-myOtherPullRequest:backport/6.x/pr-myPullRequest_pr-myOtherPullRequest --force", Object { "cwd": "/myHomeDir/.backport/repositories/elastic/kibana", "maxBuffer": 104857600, @@ -134,7 +134,7 @@ Array [ [Function], ], Array [ - "git push sqren backport/6.x/pr-myPullRequest_pr-myOtherPullRequest --force", + "git push sqren backport/6.x/pr-myPullRequest_pr-myOtherPullRequest:backport/6.x/pr-myPullRequest_pr-myOtherPullRequest --force", Object { "cwd": "/myHomeDir/.backport/repositories/elastic/kibana", "maxBuffer": 104857600, @@ -166,7 +166,7 @@ Array [ [Function], ], Array [ - "git push sqren backport/6.x/commit-mySha --force", + "git push sqren backport/6.x/commit-mySha:backport/6.x/commit-mySha --force", Object { "cwd": "/myHomeDir/.backport/repositories/elastic/kibana", "maxBuffer": 104857600, diff --git a/test/__snapshots__/steps.test.js.snap b/test/__snapshots__/steps.test.js.snap index 26436263..9db183f9 100644 --- a/test/__snapshots__/steps.test.js.snap +++ b/test/__snapshots__/steps.test.js.snap @@ -50,7 +50,7 @@ Array [ [Function], ], Array [ - "git push sqren backport/6.2/pr-myPullRequest --force", + "git push sqren backport/6.2/pr-myPullRequest:backport/6.2/pr-myPullRequest --force", Object { "cwd": "/myHomeDir/.backport/repositories/elastic/kibana", "maxBuffer": 104857600, @@ -105,7 +105,7 @@ Array [ [Function], ], Array [ - "git push sqren backport/6.2/pr-myPullRequest --force", + "git push sqren backport/6.2/pr-myPullRequest:backport/6.2/pr-myPullRequest --force", Object { "cwd": "/myHomeDir/.backport/repositories/elastic/kibana", "maxBuffer": 104857600, @@ -160,7 +160,7 @@ Array [ [Function], ], Array [ - "git push sqren backport/6.2/pr-myPullRequest --force", + "git push sqren backport/6.2/pr-myPullRequest:backport/6.2/pr-myPullRequest --force", Object { "cwd": "/myHomeDir/.backport/repositories/elastic/kibana", "maxBuffer": 104857600, @@ -215,7 +215,7 @@ Array [ [Function], ], Array [ - "git push sqren backport/6.2/pr-myPullRequest --force", + "git push sqren backport/6.2/pr-myPullRequest:backport/6.2/pr-myPullRequest --force", Object { "cwd": "/myHomeDir/.backport/repositories/elastic/kibana", "maxBuffer": 104857600,