You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: Provide membership status in the github_membership data source. #862
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.
Reacted by Jeremy Udit, Diogo Teixeira, tisigoncalve, Paulo Anes and João Feteira
Activity
jcudit commentedon Aug 31, 2021
Sounds like a great addition to support this use case. PRs welcome!
dgteixeira commentedon Dec 20, 2021
This feature would be awesome indeed.
It's very helpful to understand which requests are still pending whenever we alter our setup
feat: Fixes integrations#862 by adding a state attribute for the stat…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes #862 by adding a state attribute for the state of the in…
feat: closes integrations#862 by adding a state attribute for the sta…
feat: closes integrations#862 by adding a state attribute for the sta…