Skip to content

Commit 940b826

Browse files
Copilotalexr00
andcommitted
Address code review feedback: Use constant and add clarifying comment
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent f60aad2 commit 940b826

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/view/reviewManager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import Logger from '../common/logger';
2424
import { parseRepositoryRemotes, Remote } from '../common/remote';
2525
import {
2626
COMMENTS,
27+
CREATE_IN_BROWSER,
2728
FOCUSED_MODE,
2829
IGNORE_PR_BRANCHES,
2930
NEVER_IGNORE_DEFAULT_BRANCH,
@@ -1171,7 +1172,7 @@ export class ReviewManager extends Disposable {
11711172

11721173
public async createPullRequest(compareBranch?: string): Promise<void> {
11731174
// Check if user wants to create PR in browser
1174-
const createInBrowser = vscode.workspace.getConfiguration(PR_SETTINGS_NAMESPACE).get<boolean>('createInBrowser', false);
1175+
const createInBrowser = vscode.workspace.getConfiguration(PR_SETTINGS_NAMESPACE).get<boolean>(CREATE_IN_BROWSER, false);
11751176

11761177
if (createInBrowser) {
11771178
// Open browser to create PR instead of showing the create view
@@ -1236,6 +1237,8 @@ export class ReviewManager extends Disposable {
12361237
const compareOrigin = await this._folderRepoManager.getOrigin(branch);
12371238

12381239
// Find the GitHub repository for the base
1240+
// Note: pullRequestDefaults.owner is the target owner (may differ from current fork)
1241+
// compareOrigin.remote.repositoryName is the repository we're working in
12391242
const baseRepo = this._folderRepoManager.gitHubRepositories.find(
12401243
repo => repo.remote.owner === pullRequestDefaults.owner &&
12411244
repo.remote.repositoryName === compareOrigin.remote.repositoryName

0 commit comments

Comments
 (0)