MCPcopy Index your code
hub / github.com/google/go-github / DownloadCopilotMetrics

Method DownloadCopilotMetrics

github/copilot.go:892–910  ·  view source on GitHub ↗

DownloadCopilotMetrics downloads a Copilot metrics report from the provided download link and decodes it as a []*CopilotMetrics. Deprecated: Use DownloadDailyMetrics, DownloadPeriodicMetrics, DownloadUserDailyMetrics, DownloadUserPeriodicMetrics instead. The payloads served at the download links re

(ctx context.Context, url string)

Source from the content-addressed store, hash-verified

890// This method is retained
891// for GitHub Enterprise Server installations that may still serve the legacy shape.
892func (s *CopilotService) DownloadCopilotMetrics(ctx context.Context, url string) ([]*CopilotMetrics, *Response, error) {
893 req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
894 if err != nil {
895 return nil, nil, err
896 }
897
898 resp, err := s.client.BareDo(req)
899 if err != nil {
900 return nil, nil, err
901 }
902 defer resp.Body.Close()
903
904 var metrics []*CopilotMetrics
905 if err := json.NewDecoder(resp.Body).Decode(&metrics); err != nil {
906 return nil, resp, err
907 }
908
909 return metrics, resp, nil
910}
911
912// CopilotMetricsPullRequests represents pull request totals in a Copilot metrics report.
913type CopilotMetricsPullRequests struct {

Calls 2

BareDoMethod · 0.80
CloseMethod · 0.80