feat!: Add login query param support to ListCredentialAuthorizations#3270
Conversation
| // such as Page and PerPage | ||
| // GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/orgs/orgs#list-saml-sso-authorizations-for-an-organization | ||
| type CredentialAuthorizationsListOptions struct { | ||
| ListOptions |
There was a problem hiding this comment.
Chose to embed ListOptions instead of extending it as it is reused for other List* functions which don't necessarily support the login query parameter.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3270 +/- ##
==========================================
- Coverage 97.72% 92.94% -4.78%
==========================================
Files 153 171 +18
Lines 13390 11669 -1721
==========================================
- Hits 13085 10846 -2239
- Misses 215 729 +514
- Partials 90 94 +4 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
|
Thanks for the quick review @gmlewis! Accepted your suggestion! |
|
@gmlewis should I tag someone as a second reviewer? |
Since this repo is maintained strictly by volunteers, I try to not tag individuals to respect their time unless there is an urgent need. |
|
Sounds good @gmlewis! Thank you for the information. |
Unfortunately, you can ignore the Codecov report, as we are waiting for #3221 to be addressed by @google-admin and update this repo's Codecov authentication token so that our reports will be useful. |
|
Makes sense. Does that mean that this PR only needs one more ✅ and it'll be good to land? |
Yes, and it is now ready to merge. Thank you, @alexef !
We cut a new release about once per month, so the next release should be in three to four weeks. Merging. |
BREAKING CHANGE:
ListCredentialAuthorizationsnow takesopts *CredentialAuthorizationsListOptionsinstead ofListOptions.As per the docs for the List SAML SSO authorizations for an organization endpoint — it supports a query param named
loginto filter the authorizations by a github user.This PR adds support for passing this
loginquery param via a new struct (CredentialAuthorizationsListOptions) which embedsListOptionsasListOptionsitself only supportsPageandPerPagequery params.