Skip to content
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

retrieve publicly available emails as well #1557

Merged
merged 4 commits into from
Mar 24, 2023

Conversation

mac2000
Copy link
Contributor

@mac2000 mac2000 commented Feb 19, 2023

This is an very first baby step going to solve #1532 feature request

Technically all we are doing here is adding one more field to GraphQL query and map it to response, aka:

query getAllMembers($org:String!,$after:String) {
  organization(login:$org) {
    membersWithRole(first:100,after:$after) {
      nodes {
        id
        login
        email # <- added
      }
    }
  }
}

This should not brake anything because we are not touching any existing fields, only adding new one, the idea was to introduce this first and as a next step try to figure out how can we rewrite code in a such way so it will retrieve all users if no inputs given, but to me it seems better to do it step by step, otherwise it may become to many changes to review

Here is how sample output will look like:

image

To be fair I'm not sure if passing such data in different lists is a good idea but cannot touch it without braking something else so at first iteration we may keep it simple


Behavior

After the change?

  • Email field added to response

Other information

  • @kfcampbell I'm not sure if you asked about something like this, but I did tried to do my best

Additional info

Pull request checklist

  • [+] Tests for the changes have been added (for bug fixes / features)
  • [+] Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • [+] Added the appropriate label for the given change

Does this introduce a breaking change?

  • [+] No

Pull request type

Type: Feature


@kfcampbell
Copy link
Member

@mac2000 thanks! Could you provide appropriate documentation for this field in the website/docs/d/users.html.markdown file so our docs stay up-to-date?

Copy link
Contributor

@nickfloyd nickfloyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @mac2000 for this change! ❤️

@nickfloyd nickfloyd merged commit 526297e into integrations:main Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants