-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add new GraphQL queries to list organization memberships for a user and list SCIM accounts for an EMU #791
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
Conversation
user Added a GraphQL query to list the organizations a user belongs to on GitHub.com. This query retrieves the organization name and slug for each organization.
This commit adds a GraphQL query to list SCIM accounts for an EMU (Enterprise Managed Users) enterprise account. The query retrieves details about enterprise members and their SCIM account information, which is useful for managing user accounts in GitHub Enterprise Cloud.
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.
Pull Request Overview
Adds two GraphQL queries to retrieve user membership and enterprise account information from GitHub. The queries provide structured access to organization memberships and SCIM account details for Enterprise Managed Users (EMU).
- Added query to list organizations a user belongs to with visibility restrictions based on caller permissions
- Added query to list enterprise members and their SCIM account details for EMU enterprises
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
graphql/queries/user-org-membership.graphql | Query to retrieve organization memberships for a specified user |
graphql/queries/emu-list-scim-accounts.graphql | Query to list enterprise members and SCIM account details for EMU enterprises |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Gave them a go and found no issues.
Only possible comment, should we include what scopes the PAT you use requires (e.g. read:enterprise
for the first one)?
Done! Thanks @bss-mc |
Do you need |
Would this note covered that? https://github.com/github/platform-samples/pull/791/files#diff-13200abcdb94a745382c6cdf63d997d34f9b4b6d13f0906da76902700425f846R3 EDIT: 🤦 misunderstood your comment! I did a squad commit to update the actual scope. Thanks @bss-mc ❤️ |
fd48719
to
c096ff5
Compare
Perfect, I vote to merge 🎉 |
Summary
This pull request adds two new GraphQL queries to the codebase, each designed to help retrieve important user and organization data from GitHub. The queries are well-documented and provide clear usage instructions for customizing the parameters.
Outline
New GraphQL queries for account and membership information:
emu-list-scim-accounts.graphql
query to list enterprise members and their SCIM account details for GitHub Enterprise Cloud with Managed Users (EMU), including notes on usage and limitations.user-org-membership.graphql
query to list organizations a specified user belongs to, with guidance on parameter replacement and output caveats.