Skip to content

Commit a76a8f9

Browse files
authored
Fix PR head branch SHA collection (#5309)
1 parent cd6cd47 commit a76a8f9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/ProductConstructionService/ProductConstructionService.DependencyFlow/PullRequestUpdater.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,8 @@ await AddDependencyFlowEventsAsync(
14731473
// We store it the new head branch SHA in Redis (without having to have to query the remote repo)
14741474
if (prInfo != null)
14751475
{
1476-
prInfo.HeadBranchSha = await _gitClient.GetShaForRefAsync(codeFlowRes.RepoPath, prHeadBranch);
1476+
var repoPath = isForwardFlow ? _vmrInfo.VmrPath : codeFlowRes.RepoPath;
1477+
prInfo.HeadBranchSha = await _gitClient.GetShaForRefAsync(repoPath, prHeadBranch);
14771478
}
14781479

14791480
await RegisterSubscriptionUpdateAction(SubscriptionUpdateAction.ApplyingUpdates, update.SubscriptionId);

0 commit comments

Comments
 (0)