feat: Add DownloadCopilotMetrics helper method#4149
feat: Add DownloadCopilotMetrics helper method#4149MasterOogway1466 wants to merge 4 commits intogoogle:masterfrom
DownloadCopilotMetrics helper method#4149Conversation
DownloadCopilotMetrics helper method
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4149 +/- ##
=======================================
Coverage 93.75% 93.76%
=======================================
Files 211 211
Lines 19687 19701 +14
=======================================
+ Hits 18458 18472 +14
Misses 1031 1031
Partials 198 198 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @MasterOogway1466.
Please resolve the merge conflicts in all the deprecation warning comments from the master branch, then make sure you run the linter in step 4 of CONTRIBUTING.md and push the changes to this branch and we can then proceed with a full review.
|
@MasterOogway1466 - did you run |
|
Hey @gmlewis , I did run the script and I got the below issue: |
Ah, right. Since this is a helper method that has no GitHub v3 API direct correspondence, then adding this method as an exception is the correct way to proceed. |
|
@MasterOogway1466 - it would also be good if you could attempt to cover as many lines in your function as possible in the unit tests to keep the codecoverage reports high. |
…ethod in metadata
| testMethod(t, r, "GET") | ||
| fmt.Fprint(w, `[{invalid JSON`) | ||
| }) | ||
| urlBadJson := client.BaseURL.String() + "path/to/download/badjson" |
There was a problem hiding this comment.
| urlBadJson := client.BaseURL.String() + "path/to/download/badjson" | |
| urlBadJSON := client.BaseURL.String() + "path/to/download/badjson" |


Added DownloadCopilotMetrics helper method to simulate previous implementation of viewing copilot usage metrics. Also, commented above the older function definitions to highlight that the methods are no longer in use due to the change in API endpoint. Fixes #4136