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

Feature request: Provide membership status in the github_membership data source. #862

Closed
swu-etsy opened this issue Jul 26, 2021 · 2 comments · Fixed by #1290
Closed

Feature request: Provide membership status in the github_membership data source. #862

swu-etsy opened this issue Jul 26, 2021 · 2 comments · Fixed by #1290
Labels
Type: Feature New feature or request

Comments

@swu-etsy
Copy link

swu-etsy commented Jul 26, 2021

Hi there! This is a feature request.

Currently, the github_membership data source considers Github users with unaccepted invitations to join an organization to be full organization members. It would be helpful to be able to distinguish, when using github_membership, whether a user is a current organization member, or merely has a pending invitation. This information would be useful, for example, to ensure that only current organization members are added to a team via the github_team_membership resource or given certain repository protected branch permissions via the github_branch_protection resource.

Glancing at the code, implementing this feature might be as simple as getting the state field of the go-github client's Membership object when calling the go-github GetOrgMembership method in github/data_source_github_membership.go, and adding a "state" property to the github_membership schema. go-github's Membership's state value should be pending if the user has an unaccepted invitation, or active if the user has successfully accepted the invitation.

@jcudit jcudit added the Type: Feature New feature or request label Aug 31, 2021
@jcudit
Copy link
Contributor

jcudit commented Aug 31, 2021

Sounds like a great addition to support this use case. PRs welcome!

@dgteixeira
Copy link

This feature would be awesome indeed.
It's very helpful to understand which requests are still pending whenever we alter our setup

wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Sep 15, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Sep 15, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Sep 15, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Sep 15, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Sep 19, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Sep 20, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Sep 21, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Sep 24, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Oct 11, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Oct 13, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Oct 13, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Oct 17, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Oct 25, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Oct 26, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Oct 27, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Oct 27, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Oct 30, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Nov 1, 2022
wwsean08 added a commit to wwsean08/terraform-provider-github that referenced this issue Nov 7, 2022
kazaker pushed a commit to auto1-oss/terraform-provider-github that referenced this issue Dec 28, 2022
avidspartan1 pushed a commit to avidspartan1/terraform-provider-github that referenced this issue Feb 5, 2024
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
3 participants