feat: Add support for getting Copilot cloud agent configuration#4241
feat: Add support for getting Copilot cloud agent configuration#4241maishivamhoo123 wants to merge 11 commits into
Conversation
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4241 +/- ##
=======================================
Coverage 97.48% 97.48%
=======================================
Files 190 191 +1
Lines 19178 19188 +10
=======================================
+ Hits 18695 18705 +10
Misses 268 268
Partials 215 215 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
59ab5d7 to
4420993
Compare
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @maishivamhoo123!
A couple minor tweaks, please, then we should be ready for any other contributor to this repo to provide a second LGTM+Approval before merging.
cc: @stevehipwell - @alexandear - @zyfy29 - @Not-Dhananjay-Mishra - @munlicode
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
|
@gmlewis, @alexandear, @Not-Dhananjay-Mishra I’ve made all the recommended changes and addressed the review comments. Thank you! |
|
|
||
| // CopilotCloudAgentConfiguration represents the Copilot cloud agent configuration for a repository. | ||
| type CopilotCloudAgentConfiguration struct { | ||
| McpConfiguration *json.RawMessage `json:"mcp_configuration"` |
There was a problem hiding this comment.
I apologize for not catching this sooner, but it looks like we need a new initialism ("MCP") to be added to line 424 of tools/structfield/structfield.go (in sorted order) and then update this line as well. Note that json.RawMessage is already a reference type (it is a byte slice) and there is no need for a pointer here.
So this line needs to be:
| McpConfiguration *json.RawMessage `json:"mcp_configuration"` | |
| MCPConfiguration json.RawMessage `json:"mcp_configuration"` |
@gmlewis I made all the changes but it is still failing? |
Ah, yes, you may need to delete the old linters in the |


Description
Add support for getting Copilot cloud agent configuration via the GitHub REST API.
Changes
CopilotCloudAgentConfigurationstruct to handle the API responseEnabledToolsstruct for tool configuration detailsGetCopilotCloudAgentConfigurationmethod in CopilotServiceMcpConfigurationfield to use*json.RawMessagefor proper null handlingRelated Issue
Closes #4239
Testing
All existing tests pass and new unit tests validate the functionality.