Skip to content

DI Refactor: Azure.Mcp.Tools.CloudArchitect#1912

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/refactor-cloudarchitect-di
Draft

DI Refactor: Azure.Mcp.Tools.CloudArchitect#1912
Copilot wants to merge 2 commits intomainfrom
copilot/refactor-cloudarchitect-di

Conversation

Copy link
Contributor

Copilot AI commented Mar 3, 2026

Sub-issue of #158 to remove context.GetService<T>() usage from ExecuteAsync in the CloudArchitect toolset.

Findings

DesignCommand was already fully compliant — it uses constructor injection for ILogger<DesignCommand> with no context.GetService<T>() calls, CloudArchitectSetup registers and resolves the command correctly, and tests already follow the DI pattern.

Changes

  • Changelog: Added entry via New-ChangelogEntry.ps1 to satisfy Step 5 of the refactor plan

Invoking Livetests

Copilot submitted PRs are not trustworthy by default. Users with write access to the repo need to validate the contents of this PR before leaving a comment with the text /azp run mcp - pullrequest - live. This will trigger the necessary livetest workflows to complete required validation.

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:

  • gist.github.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

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

Original prompt

This section details on the original issue you should resolve

<issue_title>DI Refactor: Azure.Mcp.Tools.CloudArchitect</issue_title>
<issue_description>## Summary

Refactor Azure.Mcp.Tools.CloudArchitect to use constructor dependency injection instead of resolving services via context.GetService<T>() in ExecuteAsync.

This is a sub-issue of #158.

Instructions

Follow the algorithm described in tools/di-refactor-plan.md with {ToolArea} = CloudArchitect.

An example PR is: #1815
</issue_description>

<agent_instructions>After creating the PR, please double check Step 5 was done. In particular, make sure New-ChangelogEntry.ps1 is executed so the CHANGELOG entry is correct.</agent_instructions>

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


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: conniey <10136526+conniey@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor Azure.Mcp.Tools.CloudArchitect for dependency injection DI Refactor: Azure.Mcp.Tools.CloudArchitect Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

DI Refactor: Azure.Mcp.Tools.CloudArchitect

2 participants