Skip to content

Commit 73977b4

Browse files
Copilotalexr00
andauthored
Fix wrong file list when creating PR (#8468)
* Initial plan * Initial analysis of wrong file list issue in PR creation Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> * Fix wrong file list when creating PR by initializing _compareBranch correctly The constructor was incorrectly initializing _compareBranch to baseBranch instead of the actual compareBranch parameter. This caused the file diff comparison to potentially use wrong branches before setCompareBranch completed its async initialization, resulting in displaying the wrong list of files when creating a PR. Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com> * Revert proposed changes --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent d18dd77 commit 73977b4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/view/createPullRequestDataModel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class CreatePullRequestDataModel extends Disposable {
4545
super();
4646
this._baseOwner = baseOwner;
4747
this._baseBranch = baseBranch;
48-
this._compareBranch = baseBranch;
48+
this._compareBranch = compareBranch;
4949
this._gitcontentProvider = new GitContentProvider(this.folderRepositoryManager);
5050
this._compareGitHubRepository = this.folderRepositoryManager.gitHubRepositories.find(githubRepo => githubRepo.remote.owner === compareOwner && githubRepo.remote.repositoryName === repositoryName);
5151
this._gitHubcontentProvider = new GitHubContentProvider(this.folderRepositoryManager.gitHubRepositories);

0 commit comments

Comments
 (0)