You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Version.Details.xml as VMR snapshot fallback for manual backflow
When someone runs 'darc vmr backflow' manually and pushes directly,
the commit message doesn't contain the standard 'Backflow from ... / <sha>'
format that the script parses. However, the VMR source SHA is always
updated in eng/Version.Details.xml's <Source> element.
This adds a fallback: when no VMR SHA is found in commit messages,
read Version.Details.xml from the PR branch to get the actual snapshot.
This gives accurate freshness reporting and fix tracing even after
manual backflow operations.
if ($firstMsg-match"^Initial commit for subscription") {
460
-
Write-Host" ℹ️ PR has only an initial subscription commit — PR body snapshot ($(Get-ShortSha$vmrCommit)) not yet verifiable from branch"-ForegroundColor DarkGray
471
+
# No mismatch from commit messages or Version.Details.xml
472
+
# Check if Version.Details.xml confirmed the PR body SHA
473
+
if ($versionDetailsVmrCommit-and ($vmrCommit.StartsWith($versionDetailsVmrCommit) -or$versionDetailsVmrCommit.StartsWith($vmrCommit))) {
474
+
Write-Host" ✅ PR body snapshot ($(Get-ShortSha$vmrCommit)) confirmed by Version.Details.xml"-ForegroundColor Green
if ($firstMsg-match"^Initial commit for subscription") {
481
+
Write-Host" ℹ️ PR has only an initial subscription commit — PR body snapshot ($(Get-ShortSha$vmrCommit)) not yet verifiable from branch"-ForegroundColor DarkGray
482
+
}
483
+
else {
484
+
Write-Host" ⚠️ No VMR SHA found in branch commit messages — trusting PR body ($(Get-ShortSha$vmrCommit))"-ForegroundColor Yellow
485
+
}
461
486
}
462
487
else {
463
-
Write-Host" ⚠️ No VMR SHA found in branch commit messages — trusting PR body ($(Get-ShortSha$vmrCommit))"-ForegroundColor Yellow
488
+
Write-Host" ⚠️ No VMR SHA found in $commitCountbranch commit messages — trusting PR body ($(Get-ShortSha$vmrCommit))"-ForegroundColor Yellow
464
489
}
465
490
}
466
-
else {
467
-
Write-Host" ⚠️ No VMR SHA found in $commitCount branch commit messages — trusting PR body ($(Get-ShortSha$vmrCommit))"-ForegroundColor Yellow
468
-
}
469
491
}
470
492
}
471
493
@@ -485,7 +507,10 @@ if ($vmrCommit -and $vmrBranch) {
0 commit comments