Fix automerge: prevent duplicate comments and handle status ordering#85
Conversation
|
Learn Build status updates of commit 1ae16f5: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
Triggering on both OpenPublishing.Build and PoliCheck Scan causes duplicate comments — both fire at roughly the same time and both find all required statuses green. Fix: trigger only on OpenPublishing.Build (which carries the build report URL we need). PoliCheck is still verified as a required status inside the script — it just doesn't trigger a separate run. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1ae16f5 to
cd10ed7
Compare
|
Learn Build status updates of commit cd10ed7: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
Fixes duplicate dry-run/merge comments and handles any arrival order of statuses.
Problems:
OpenPublishing.BuildandPoliCheck Scancaused 2 identical comments when both succeeded at roughly the same timeFix:
concurrency: automerge-\${{ github.event.sha }}to serialize runs per commit — if both fire simultaneously, the second waits then sees the first already handled itResult: exactly 1 comment per commit regardless of which status arrives first.