diff --git a/github/copilot_cloud_agent.go b/github/copilot_cloud_agent.go index b323af5efc8..dcef427f909 100644 --- a/github/copilot_cloud_agent.go +++ b/github/copilot_cloud_agent.go @@ -36,7 +36,7 @@ type CopilotCloudAgentEnabledTools struct { func (s *CopilotService) GetCloudAgentConfiguration(ctx context.Context, owner, repo string) (*CopilotCloudAgentConfiguration, *Response, error) { u := fmt.Sprintf("repos/%v/%v/copilot/cloud-agent/configuration", owner, repo) - req, err := s.client.NewRequest(ctx, "GET", u, nil) + req, err := s.client.NewRequest(ctx, "GET", u, nil, WithVersion(api20260310)) if err != nil { return nil, nil, err } diff --git a/github/copilot_cloud_agent_test.go b/github/copilot_cloud_agent_test.go index f29cedad554..43357147e43 100644 --- a/github/copilot_cloud_agent_test.go +++ b/github/copilot_cloud_agent_test.go @@ -157,6 +157,7 @@ func TestCopilotService_GetCloudAgentConfiguration(t *testing.T) { mux.HandleFunc("/repos/o/r/copilot/cloud-agent/configuration", func(w http.ResponseWriter, r *http.Request) { testMethod(t, r, "GET") + testHeader(t, r, "X-Github-Api-Version", api20260310) fmt.Fprint(w, tt.responseBody) })