Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly set remote branch name when doing git push #78

Merged
merged 2 commits into from
Jul 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
});
}
Expand Down
6 changes: 3 additions & 3 deletions test/__snapshots__/cliService.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions test/__snapshots__/steps.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down