Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.

Commit 12867be

Browse files
committed
feat: add configuration for default branch
1 parent 5b826a4 commit 12867be

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
"github.preferedMergeMethod": {
3333
"type": "string",
3434
"description": "By default the extension asks the user during merge process. This could be set to on of 'merge', 'squash' or 'rebase' to define the prefered method and not to be asked every time."
35+
},
36+
"github.defaultBranch": {
37+
"type": "string",
38+
"default": "master",
39+
"description": "The branch to create pull requests against."
3540
}
3641
}
3742
},

src/github-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export class GitHubManager {
6161
const body: CreatePullRequestBody = {
6262
title: await git.getCommitMessage(this.cwd),
6363
head: `${owner}:${branch}`,
64-
base: `master`
64+
base: vscode.workspace.getConfiguration('github').get<string>('defaultBranch', 'master')
6565
};
6666
this.channel.appendLine('Create pull request:');
6767
this.channel.appendLine(JSON.stringify(body, undefined, ' '));

0 commit comments

Comments
 (0)