Skip to content

[devops] Move comment identifier to beginning of GitHub CI comments#25785

Merged
rolfbjarne merged 2 commits into
mainfrom
dev/rolf/move-comment-marker-to-top
Jun 26, 2026
Merged

[devops] Move comment identifier to beginning of GitHub CI comments#25785
rolfbjarne merged 2 commits into
mainfrom
dev/rolf/move-comment-marker-to-top

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

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: Added WriteCommentIdentifier() method, called at the top of all three NewComment* methods. Removed identifier from WriteCommentFooter.
  • TestResults.psm1: Moved the [comment]: <> line from end to beginning in both code paths of WriteComment().
  • TestResults.Tests.ps1: Updated all 5 affected test expectations.

🤖 Pull request created by Copilot

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>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne marked this pull request as ready for review June 25, 2026 10:38
Copilot AI review requested due to automatic review settings June 25, 2026 10:38
@rolfbjarne rolfbjarne enabled auto-merge (squash) June 25, 2026 10:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 in GitHub.psm1 and emit the identifier at the beginning of all NewComment* paths.
  • Updated ParallelTestsResults.WriteComment() in TestResults.psm1 to emit its test-results identifier at the beginning (including the build-failure path) instead of the end.
  • Updated Pester expectations in TestResults.Tests.ps1 to 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.

Comment thread tools/devops/automation/scripts/GitHub.psm1
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #51db1fe] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 51db1fe4483db49a1d8f84e79b094071d68bc6ba [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #51db1fe] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 51db1fe4483db49a1d8f84e79b094071d68bc6ba [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 51db1fe4483db49a1d8f84e79b094071d68bc6ba [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #51db1fe] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 51db1fe4483db49a1d8f84e79b094071d68bc6ba [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [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
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 17 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 18 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: 51db1fe4483db49a1d8f84e79b094071d68bc6ba [PR build]

@rolfbjarne rolfbjarne merged commit 6793e5f into main Jun 26, 2026
57 checks passed
@rolfbjarne rolfbjarne deleted the dev/rolf/move-comment-marker-to-top branch June 26, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants