-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: Implement Enterprise SCIM - Get a Group or User #3889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3889 +/- ##
==========================================
+ Coverage 92.48% 92.54% +0.06%
==========================================
Files 200 200
Lines 14564 14734 +170
==========================================
+ Hits 13469 13636 +167
- Misses 895 897 +2
- Partials 200 201 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
gmlewis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @elminster-aom!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
cc: @stevehipwell - @alexandear - @zyfy29
github/enterprise_scim.go
Outdated
| // GitHub API docs: https://docs.github.com/enterprise-cloud@latest/rest/enterprise-admin/scim#get-scim-provisioning-information-for-an-enterprise-group | ||
| // | ||
| //meta:operation GET /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id} | ||
| func (s *EnterpriseService) GetProvisionedSCIMGroup(ctx context.Context, enterprise, scimGroupID, excludedAttributes string) (*SCIMEnterpriseGroupAttributes, *Response, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not?
| func (s *EnterpriseService) GetProvisionedSCIMGroup(ctx context.Context, enterprise, scimGroupID, excludedAttributes string) (*SCIMEnterpriseGroupAttributes, *Response, error) { | |
| func (s *EnterpriseService) GetProvisionedSCIMGroup(ctx context.Context, enterprise, scimGroupID string, opts *GetProvisionedSCIMGroupOptions) (*SCIMEnterpriseGroupAttributes, *Response, error) { |
where:
type GetProvisionedSCIMGroupOptions struct {
ExcludedAttributes *string `url:"excludedAttributes,omitempty"`
}Let's not reinvent a wheel and make everything consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not?
Because I felt a bit overkilling to create a structure here but I'll follow your advice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexandear I followed your advice, commit 7ecf378
It must be ready for merging, let me know
Related with #3813
From REST API endpoints for Enterprise SCIM docs, implements:
Get SCIM provisioning information for an enterprise group, GET /scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}
Get SCIM provisioning information for an enterprise user, GET /scim/v2/enterprises/{enterprise}/Users/{scim_user_id}