[devops] Move comment identifier to beginning of GitHub CI comments#25785
Conversation
The "[comment]: <> (...)" identifier string used to detect and hide older comments of the same type was added at the end of GitHub comments. When a comment was too large and got truncated by GitHub, the identifier would be cut off, preventing future detection and hiding of that comment. Move the identifier to the beginning of the comment so it is never truncated away. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
This PR improves CI GitHub comment lifecycle management by moving the hidden [comment]: <> (...) identifier to the top of generated comments, ensuring it survives GitHub truncation and can still be detected for minimizing/hiding older comments.
Changes:
- Added a dedicated
WriteCommentIdentifier()helper inGitHub.psm1and emit the identifier at the beginning of allNewComment*paths. - Updated
ParallelTestsResults.WriteComment()inTestResults.psm1to emit its test-results identifier at the beginning (including the build-failure path) instead of the end. - Updated Pester expectations in
TestResults.Tests.ps1to match the new comment layout.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tools/devops/automation/scripts/GitHub.psm1 | Emits the CI comment identifier at the top of GitHub comments to prevent truncation from removing it. |
| tools/devops/automation/scripts/TestResults.psm1 | Moves the test-results marker line to the beginning of generated test summary comments. |
| tools/devops/automation/scripts/TestResults.Tests.ps1 | Adjusts test expectations to reflect the new identifier-first comment format. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #51db1fe] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [PR Build #51db1fe] Build passed (Build packages) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [PR Build #51db1fe] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #51db1fe] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 199 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
The
[comment]: <> (...)identifier string is used to detect and hide older GitHub comments of the same type during CI. This string was added at the end of each comment, which means that when a comment was too large for GitHub and got truncated, the identifier was cut off. This prevented the comment from being detected and hidden in the future.Move the identifier to the beginning of the comment so it is never lost to truncation.
Changes:
GitHub.psm1: AddedWriteCommentIdentifier()method, called at the top of all threeNewComment*methods. Removed identifier fromWriteCommentFooter.TestResults.psm1: Moved the[comment]: <>line from end to beginning in both code paths ofWriteComment().TestResults.Tests.ps1: Updated all 5 affected test expectations.🤖 Pull request created by Copilot