Skip to content

Add failure label to "AutoBuilder - Failed" notifications for recent build failures#2093

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-autobuilder-issue-closing
Draft

Add failure label to "AutoBuilder - Failed" notifications for recent build failures#2093
Copilot wants to merge 2 commits intomainfrom
copilot/fix-autobuilder-issue-closing

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

NotificationService immediately closes any issue without the failure label. QueueBuildCommand only added this label on exceptions, not when the category was "Failed" due to recent build failures — so "AutoBuilder - Failed" issues were created and immediately closed.

Changes

  • QueueBuildCommand.cs: Changed the AppendIf condition from exception is not null to category == "Failed", which covers both failure paths (exceptions and recent build failures):
// Before
}.AppendIf(NotificationLabels.Failure, () => exception is not null),

// After
}.AppendIf(NotificationLabels.Failure, () => category == "Failed"),
  • QueueBuildCommandTests.cs: Added QueueBuildCommand_RecentFailedBuilds_IncludesFailureLabel test and a VerifyNotificationLabelsContain helper on TestContext.

…ild failures

The failure label was only added when an exception was thrown, not when the
category was 'Failed' due to recent build failures. This caused these
actionable issues to be immediately closed by NotificationService.

Change the condition from `exception is not null` to `category == "Failed"`
so both failure paths (exception and recent failed builds) get the failure
label and remain open.

Agent-Logs-Url: https://github.com/dotnet/docker-tools/sessions/89cbb121-4c87-422e-83ec-09a65bd377c6

Co-authored-by: lbussell <36081148+lbussell@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix NotificationService to leave 'AutoBuilder - Failed' issues open Add failure label to "AutoBuilder - Failed" notifications for recent build failures Apr 20, 2026
Copilot AI requested a review from lbussell April 20, 2026 18:28
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.

"AutoBuilder - Failed" issues should be left open

2 participants