Skip to content

Post AzDO build summary to PR comments#11251

Draft
simonrozsival wants to merge 13 commits intomainfrom
dev/simonrozsival/post-build-summary-as-comment
Draft

Post AzDO build summary to PR comments#11251
simonrozsival wants to merge 13 commits intomainfrom
dev/simonrozsival/post-build-summary-as-comment

Conversation

@simonrozsival
Copy link
Copy Markdown
Member

Summary

  • add a PR pipeline stage that posts an Azure DevOps timeline-based build summary to the GitHub PR conversation
  • add conservative @copilot mention handling for Copilot-authored or opted-in contributor PRs
  • intentionally add a failing test so this draft PR can validate the summary/comment flow

Validation

  • pwsh parser check for Post-BuildSummaryComment.ps1
  • dry-run script validation for actionable, infra, success, and disable-mentions cases
  • YAML parse checks for azure-pipelines.yaml and variables.yaml
  • targeted test run confirms BuildSummarySmokeTest_IntentionallyFails fails with the expected message

Notes

This PR is intentionally red. The failing test should be removed before this becomes ready for review/merge.

simonrozsival and others added 2 commits April 30, 2026 09:26
Add a PR pipeline stage that summarizes Azure DevOps timeline results and posts them to the GitHub PR conversation for each build run. Include conservative Copilot mention handling for Copilot-authored and opted-in contributor PRs, plus an intentional smoke-test failure to validate the summary path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

vs-mobiletools-engineering-service2 commented Apr 30, 2026

Azure DevOps build summary

Result: In progress

This build is still running. This comment is the latest status and will be updated when the final build-summary stage runs.

Item Value
Build 11.0.0-preview.4.26230.1+pr.11251.azdo.13980477
Build ID 13980477
Pull request #11251
Commit 1442613fab4b
Author @simonrozsival

Stages

Stage Result Errors Warnings
Mac ✅ succeeded 0 0
Windows ❌ failed 0 0
Linux ✅ succeeded 0 0
Package Tests ✅ succeeded 0 0
Linux Tests ✅ succeeded 0 0
MSBuild Tests ✅ succeeded 0 0
MSBuild Emulator Tests ✅ succeeded 0 0
MAUI Tests ✅ succeeded 0 0
Prepare .NET Release ➡️ skipped 0 0
PoliCheck ✅ succeeded 0 0
🔒 SDLSources ✅ succeeded 0 0

Jobs needing attention

  • Windows > Build & Smoke Test - failed, 0 error(s), 0 warning(s)

Tasks needing attention

  • ⚠️ Test Microsoft.Android.Sdk.TrimmableTypeMap.Tests Release - succeededWithIssues, 1 error(s), 0 warning(s)
    • error PowerShell exited with code '1'.
  • Ensure no modified/untracked files - failed, 1 error(s), 0 warning(s)
    • error git tree has modified or untracked files.

Failed tests

  • Microsoft.Android.Sdk.TrimmableTypeMap.Tests.AcwMapWriterTests.BuildSummarySmokeTest_IntentionallyFails - Intentional failure to verify Azure DevOps build summary PR comment posting.

Generated from Azure DevOps timeline data for build 13980477. See the linked build for full logs and artifacts.

simonrozsival and others added 11 commits April 30, 2026 10:36
Post an initial in-progress summary comment at the start of PR builds and update the same PR-wide comment when the final summary stage runs. Skip canceled superseded builds so stale canceled-run summaries do not replace the latest running status.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Run the start and final PR build-summary comment jobs on the same MAUI-1ESPT Linux pool used by existing pipeline jobs, avoiding the queued/stuck behavior seen with AzurePipelines-EO plus a Linux image.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When older in-flight builds create comments with the previous build-id marker, update every comment containing the build-summary marker so no stale build status remains visible on the PR thread.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the first build-summary marker comment as the canonical latest-status comment and delete duplicate marker comments created by earlier in-flight builds.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Do not assume GitHub comment API responses include html_url after update/delete paths; log a generic success when the URL is unavailable.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Before posting a PR build summary comment, query the latest Azure DevOps build for the current definition and source branch. Superseded builds now exit without overwriting the latest PR-thread status.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants