Skip to content

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

Closed

Description

@swu-etsy

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.

Activity

  1. added
    Type: Feature
    on Aug 31, 2021
  2. jcudit commented on Aug 31, 2021

    @jcudit
    Contributor

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

  3. dgteixeira commented on Dec 20, 2021

    @dgteixeira

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

  4. added 8 commits that reference this issue on Sep 15, 2022
    0c05565
    825d76a
    105d9b1
    962f973
    4242994
    73ae203
    3bf6a78
    4afb875
  5. added 4 commits that reference this issue on Oct 11, 2022
    17f275f
    cc4982b
    333b79b
    c9ecc70
  6. added 7 commits that reference this issue on Oct 25, 2022
    3be1338
    658d108
    858deef
    5308812
    5e8b935
    5b3cefa
    912f35c
  7. added a commit that references this issue on Nov 8, 2022
    bbc334c
  8. added a commit that references this issue on Dec 28, 2022
    cced3b4
  9. added a commit that references this issue on Feb 5, 2024
    7c2d27d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: Feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions