Skip to content
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
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,10 @@
},
"description": "%githubPullRequests.ignoredPullRequestBranches.description%"
},
"githubPullRequests.neverIgnoreDefaultBranch": {
"type": "boolean",
"description": "%githubPullRequests.neverIgnoreDefaultBranch.description%"
},
"githubPullRequests.overrideDefaultBranch": {
"type": "string",
"description": "%githubPullRequests.overrideDefaultBranch.description%"
Expand Down
1 change: 1 addition & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"githubPullRequests.pullBranch.always": "Always pull a PR branch when changes are detected in the PR. When `\"git.autoStash\": true` this will instead `prompt` to prevent unexpected file changes.",
"githubPullRequests.ignoredPullRequestBranches.description": "Prevents branches that are associated with a pull request from being automatically detected. This will prevent review mode from being entered on these branches.",
"githubPullRequests.ignoredPullRequestBranches.items": "Branch name",
"githubPullRequests.neverIgnoreDefaultBranch.description": "Never offer to ignore a pull request associated with the default branch of a repository.",
"githubPullRequests.overrideDefaultBranch.description": "The default branch for a repository is set on github.com. With this setting, you can override that default with another branch.",
"githubPullRequests.postCreate.description": "The action to take after creating a pull request.",
"githubPullRequests.postCreate.none": "No action",
Expand Down
1 change: 1 addition & 0 deletions src/common/settingKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const FILE_LIST_LAYOUT = 'fileListLayout';
export const ASSIGN_TO = 'assignCreated';
export const PUSH_BRANCH = 'pushBranch';
export const IGNORE_PR_BRANCHES = 'ignoredPullRequestBranches';
export const NEVER_IGNORE_DEFAULT_BRANCH = 'neverIgnoreDefaultBranch';
export const OVERRIDE_DEFAULT_BRANCH = 'overrideDefaultBranch';
export const PULL_BRANCH = 'pullBranch';
export const PULL_REQUEST_DESCRIPTION = 'pullRequestDescription';
Expand Down
8 changes: 6 additions & 2 deletions src/view/reviewManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
COMMENTS,
FOCUSED_MODE,
IGNORE_PR_BRANCHES,
NEVER_IGNORE_DEFAULT_BRANCH,
OPEN_VIEW,
POST_CREATE,
PR_SETTINGS_NAMESPACE,
Expand Down Expand Up @@ -498,8 +499,11 @@ export class ReviewManager {
return;
}

// Do not await the result of offering to ignore the branch.
this.offerIgnoreBranch(branch.name);
const neverIgnoreDefaultBranch = vscode.workspace.getConfiguration(PR_SETTINGS_NAMESPACE).get<boolean>(NEVER_IGNORE_DEFAULT_BRANCH, false);
if (!neverIgnoreDefaultBranch) {
// Do not await the result of offering to ignore the branch.
this.offerIgnoreBranch(branch.name);
}

const previousActive = this._folderRepoManager.activePullRequest;
this._folderRepoManager.activePullRequest = pr;
Expand Down