Skip to content

Commit 3900dea

Browse files
committed
merge base for review manager.
1 parent 3f1996b commit 3900dea

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/view/reviewManager.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,10 @@ export class ReviewManager implements vscode.DecorationProvider {
393393

394394
const data = await this._prManager.getPullRequestChangedFiles(pr);
395395
await this._prManager.fullfillPullRequestCommitInfo(pr);
396-
let baseSha = pr.base.sha;
397396
let headSha = pr.head.sha;
398-
const contentChanges = await parseDiff(data, this._repository, baseSha);
397+
let mergeBase = await this._prManager.getPullRequestMergeBase(pr);
398+
399+
const contentChanges = await parseDiff(data, this._repository, mergeBase);
399400
this._localFileChanges = contentChanges.map(change => {
400401
if (change instanceof SlimFileChange) {
401402
return new RemoteFileChangeNode(

src/view/treeNodes/pullRequestNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export class PRNode extends TreeNode {
138138
const data = await this._prManager.getPullRequestChangedFiles(this.pullRequestModel);
139139
await this._prManager.fullfillPullRequestCommitInfo(this.pullRequestModel);
140140
let mergeBase = await this._prManager.getPullRequestMergeBase(this.pullRequestModel);
141-
const rawChanges = await parseDiff(data, this.repository, mergeBase || this.pullRequestModel.base.sha);
141+
const rawChanges = await parseDiff(data, this.repository, mergeBase);
142142
this._contentChanges = rawChanges.map(change => {
143143
if (change instanceof SlimFileChange) {
144144
return new RemoteFileChangeNode(

0 commit comments

Comments
 (0)