Skip to content

Conversation

Copy link

Copilot AI commented Oct 14, 2025

  • Add IAzureDevOpsClient methods for creating and updating work items with tags/labels
  • Create new AzureDevOpsAlertOptions configuration class for Alert-specific Azure DevOps settings
  • Update AlertHookController to use IAzureDevOpsClient instead of GitHub client
  • Update Startup.cs to configure AzureDevOpsAlertOptions
  • Replace GitHub-specific logic with Azure DevOps work item operations
  • Update issue creation to work item creation
  • Update issue search/retrieval to work item queries
  • Update label operations to work item tag operations
  • Fix HTTP methods for Azure DevOps API (PATCH for updates)
  • Fix syntax errors - use HttpRequestMessage for PATCH compatibility
  • Improve configuration handling with proper null checks
  • Fix string interpolation in HTML generation
  • Update mock implementations for tests
  • Verify code follows requirements (no var, IOptions pattern)
  • Build validation passed
  • Test validation passed

Summary

Successfully migrated the AlertHookController from GitHub to Azure DevOps. All build and test errors have been resolved.

Recent Fixes:

  • Added missing interface methods to MockAzureClient and MockTimeoutAzureClient test implementations
  • All tests pass successfully (11/11 tests in AzureDevOpsTimeline.Tests)

The implementation is ready for testing.

Original prompt

This section details on the original issue you should resolve

<issue_title>Modify DotNet.Status.Web to open Grafana Alert issues in Azure DevOps instead of GitHub</issue_title>
<issue_description>The AlertHookController of DotNet.Status.Web is in charge of receiving webhooks from Grafana that represent alerts (including new notifications and updates of existing notifications). It then processes this information and either creates a new issue or updaets an existing issue in GitHub.

This should be modified to open issues in Azure DevOps instead. </issue_description>

<agent_instructions>Avoid the use of var, use direct types instead. Leverage the IOptions configuration pattern for information about the target Azure DevOps instance. </agent_instructions>

Comments on the Issue (you are @copilot in this section)

Fixes #6314


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Modify DotNet.Status.Web to open Grafana alert issues in Azure DevOps Migrate AlertHookController from GitHub Issues to Azure DevOps Work Items Oct 14, 2025
Copilot AI requested a review from garath October 14, 2025 21:46
Copilot finished work on behalf of garath October 14, 2025 21:46
@garath
Copy link
Member

garath commented Oct 14, 2025

@copilot the CI build failed, indicating syntax errors in the files you changed. Please fix those.

Copy link
Author

Copilot AI commented Oct 14, 2025

@copilot the CI build failed, indicating syntax errors in the files you changed. Please fix those.

Fixed the syntax errors in commit 0ba3da4:

  1. Replaced HttpClient.PatchAsync() with HttpRequestMessage using the PATCH method for better compatibility across .NET versions
  2. Improved the configuration lambda in Startup.cs with explicit variable declarations and proper null/default value handling

The code should now build successfully.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 1k9vsblobprodcus379.vsblob.vsassets.io
    • Triggering command: dotnet build src/DotNet.Status.Web/DotNet.Status.Web/DotNet.Status.Web.csproj (dns block)
  • 51yvsblobprodcus36.vsblob.vsassets.io
    • Triggering command: dotnet build src/DotNet.Status.Web/DotNet.Status.Web/DotNet.Status.Web.csproj (dns block)
  • 8xbvsblobprodcus382.vsblob.vsassets.io
    • Triggering command: dotnet build src/DotNet.Status.Web/DotNet.Status.Web/DotNet.Status.Web.csproj (dns block)
  • c50vsblobprodcus330.vsblob.vsassets.io
    • Triggering command: dotnet build src/DotNet.Status.Web/DotNet.Status.Web/DotNet.Status.Web.csproj (dns block)
  • c78vsblobprodcus322.vsblob.vsassets.io
    • Triggering command: dotnet build src/DotNet.Status.Web/DotNet.Status.Web/DotNet.Status.Web.csproj (dns block)
  • k0ivsblobprodcus356.vsblob.vsassets.io
    • Triggering command: dotnet build src/DotNet.Status.Web/DotNet.Status.Web/DotNet.Status.Web.csproj (dns block)
  • kh4vsblobprodcus325.vsblob.vsassets.io
    • Triggering command: dotnet build src/DotNet.Status.Web/DotNet.Status.Web/DotNet.Status.Web.csproj (dns block)
  • l49vsblobprodcus358.vsblob.vsassets.io
    • Triggering command: dotnet build src/DotNet.Status.Web/DotNet.Status.Web/DotNet.Status.Web.csproj (dns block)
  • m6xvsblobprodcus342.vsblob.vsassets.io
    • Triggering command: dotnet build src/DotNet.Status.Web/DotNet.Status.Web/DotNet.Status.Web.csproj (dns block)
  • n3kvsblobprodcus335.vsblob.vsassets.io
    • Triggering command: dotnet build src/DotNet.Status.Web/DotNet.Status.Web/DotNet.Status.Web.csproj (dns block)
  • pdfvsblobprodcus380.vsblob.vsassets.io
    • Triggering command: dotnet build src/DotNet.Status.Web/DotNet.Status.Web/DotNet.Status.Web.csproj (dns block)
  • sc4vsblobprodcus331.vsblob.vsassets.io
    • Triggering command: dotnet build src/DotNet.Status.Web/DotNet.Status.Web/DotNet.Status.Web.csproj (dns block)
  • uy6vsblobprodcus34.vsblob.vsassets.io
    • Triggering command: dotnet build src/DotNet.Status.Web/DotNet.Status.Web/DotNet.Status.Web.csproj (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of garath October 14, 2025 22:11
@garath
Copy link
Member

garath commented Oct 14, 2025

@copilot try your build again. I think I fixed the permissions to allow you to build and restore projects.

Copy link
Author

Copilot AI commented Oct 14, 2025

@copilot try your build again. I think I fixed the permissions to allow you to build and restore projects.

Build successful! Fixed string interpolation syntax errors in commit 4a9a662. Both DotNet.Status.Web and AzureDevOpsClient projects now compile without errors.

Copilot finished work on behalf of garath October 14, 2025 22:36
@garath
Copy link
Member

garath commented Oct 14, 2025

@copilot CI build is still failing with errors like "'MockAzureClient' does not implement interface member 'IAzureDevOpsClient.CreateAlertWorkItem(string, string, string, string[], CancellationToken)'". Please fix.

Copy link
Author

Copilot AI commented Oct 14, 2025

@copilot CI build is still failing with errors like "'MockAzureClient' does not implement interface member 'IAzureDevOpsClient.CreateAlertWorkItem(string, string, string, string[], CancellationToken)'...

Fixed in commit 8e7f15d. Added the missing interface methods (CreateAlertWorkItem, UpdateWorkItemTags, AddWorkItemComment, QueryWorkItemsByTag) to both MockAzureClient and MockTimeoutAzureClient. All tests pass successfully.

Copilot finished work on behalf of garath October 14, 2025 22:44
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.

Modify DotNet.Status.Web to open Grafana Alert issues in Azure DevOps instead of GitHub

2 participants