Skip to content

docs: Deprecate old Copilot metrics endpoints closed on April 2, 2026#4137

Open
Bahtya wants to merge 1 commit intogoogle:masterfrom
Bahtya:deprecate-old-copilot-metrics-endpoints
Open

docs: Deprecate old Copilot metrics endpoints closed on April 2, 2026#4137
Bahtya wants to merge 1 commit intogoogle:masterfrom
Bahtya:deprecate-old-copilot-metrics-endpoints

Conversation

@Bahtya
Copy link
Copy Markdown

@Bahtya Bahtya commented Apr 9, 2026

Summary

Relates to: #4136.

The four legacy Copilot metrics endpoints were officially closed down on April 2, 2026 for github.com (as described in the GitHub Docs):

  • GetEnterpriseMetrics (GET /enterprises/{enterprise}/copilot/metrics)
  • GetEnterpriseTeamMetrics (GET /enterprises/{enterprise}/team/{team_slug}/copilot/metrics)
  • GetOrganizationMetrics (GET /orgs/{org}/copilot/metrics)
  • GetOrganizationTeamMetrics (GET /orgs/{org}/team/{team_slug}/copilot/metrics)

Per the maintainer's guidance in the issue, these methods are kept in place (as they may still work on GitHub Enterprise Server) but are now marked with // Deprecated: notices directing users to the replacement endpoints:

  • GetEnterpriseDailyMetricsReport / GetEnterpriseMetricsReport (for enterprise-level metrics)
  • GetOrganizationDailyMetricsReport / GetOrganizationMetricsReport (for org-level metrics)

Note: The 8 new replacement methods were already implemented in #3893. This PR only adds the deprecation notices to the 4 old methods.

Test plan

  • Existing tests still pass: go test ./github/... -run TestCopilot
  • No code changes — only documentation comments updated
  • go vet ./github/... passes with no issues

Bahtya

The four legacy Copilot metrics endpoints
(GetEnterpriseMetrics, GetEnterpriseTeamMetrics,
GetOrganizationMetrics, GetOrganizationTeamMetrics) were closed down
on April 2, 2026 for github.com. Add Deprecated notices pointing users
to the replacement report methods while keeping the functions for any
GitHub Enterprise Server users who may still have access.

Fixes google#4136
@google-cla
Copy link
Copy Markdown

google-cla bot commented Apr 9, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Copy Markdown
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @Bahtya!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear - @zyfy29 - @Not-Dhananjay-Mishra - @munlicode

@gmlewis gmlewis added NeedsReview PR is awaiting a review before merging. waiting for signed CLA labels Apr 9, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.74%. Comparing base (5124fac) to head (a265959).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4137   +/-   ##
=======================================
  Coverage   93.74%   93.74%           
=======================================
  Files         211      211           
  Lines       19685    19685           
=======================================
  Hits        18453    18453           
  Misses       1034     1034           
  Partials      198      198           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Bahtya
Copy link
Copy Markdown
Author

Bahtya commented Apr 9, 2026

Wow, thank you so much @gmlewis for the review and approval! 🎉 I really appreciate you taking the time to look at this!

I just signed the Google CLA at https://cla.developers.google.com/ — hopefully the check will update on the next push or re-check. Looking forward to getting a second LGTM! 😄

Thanks for the great project!

@gmlewis
Copy link
Copy Markdown
Collaborator

gmlewis commented Apr 9, 2026

I just signed the Google CLA at https://cla.developers.google.com/ — hopefully the check will update on the next push or re-check.

Thank you, @Bahtya! Unfortunately, the rescan didn't work.
If the commits were made from a different account than was used to sign the CLA, then either this PR needs to be closed and a new one opened using the email address used to sign the CLA or the CLA needs to be re-signed with the same email address used to create this PR's commits.

Please click on the above link which is https://github.com/google/go-github/pull/4137/checks?check_run_id=70667622891
to get more information about how to fix CLA problems.

@munlicode
Copy link
Copy Markdown
Contributor

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NeedsReview PR is awaiting a review before merging. waiting for signed CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants