feat: Add enterprise billing usage endpoints and response types#4288
feat: Add enterprise billing usage endpoints and response types#4288maishivamhoo123 wants to merge 12 commits into
Conversation
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
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 #4288 +/- ##
=======================================
Coverage 97.46% 97.47%
=======================================
Files 192 193 +1
Lines 19258 19310 +52
=======================================
+ Hits 18770 18822 +52
Misses 270 270
Partials 218 218 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
|
@alexandear @gmlewis @Not-Dhananjay-Mishra i made all the changes can you please review it ? |
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
|
@gmlewis @alexandear @Not-Dhananjay-Mishra All tests and lint checks are passing in my local setup. However, I'm not sure why the CI is failing here. Could you please guide me on how to debug this issue and identify the root cause? I'd also appreciate any suggestions on how to fix the linting error. |
Don't worry; it's a GitHub problem. @gmlewis will retry the workflow run. |
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @maishivamhoo123!
The new endpoints are missing tests that make calls to testBadOptions and testNewRequestAndDoFailure. For example:
const methodName = "ListSelectedReposForOrgSecret"
testBadOptions(t, methodName, func() (err error) {
_, _, err = client.Dependabot.ListSelectedReposForOrgSecret(ctx, "\n", "\n", opts)
return err
})
testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
got, resp, err := client.Dependabot.ListSelectedReposForOrgSecret(ctx, "o", "NAME", opts)
if got != nil {
t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
}
return resp, err
})
})
There are many examples in this repo. Please add similar tests to fix code coverage.
…ints Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
|
@alexandear and @gmlewis i made all the recommended changes can you please review this . |
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @maishivamhoo123!
LGTM.
Awaiting LGTM+Approval from other reviewers before merging:
Signed-off-by: maishivamhoo123 <maishivamhoo@gmail.com>
|
@alexandear Thank you for your review . |

Summary
Adds support for the GitHub Enterprise billing usage API endpoints.
#4262
New methods on BillingService
GetEnterpriseUsageReport
GetEnterpriseUsageSummary
GetEnterprisePremiumRequestUsageReport
GetEnterpriseAICreditUsage
And added test for all the new End points .