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

Add Query and Status query param fields to OrganizationMembershipListOptions #550

Merged
merged 2 commits into from Oct 17, 2022

Conversation

sebasslash
Copy link
Contributor

Description

Adds two missing fields supported by our List Organization Memberships API:

  • q: A search query string. Organization memberships are searchable by user name and email.
  • filter[status]: If specified, restricts results to those with the matching status value. Valid values are invited and active

One thing to note is that we skip one of the query string tests because it depends on being able to assign a username to the user of an organization membership. A test like this requires Account API support, which go-tfe currently does not support. Once supported, we can update the skipped test to be able to dynamically assign usernames and thus make them query-able.

Testing plan

go test -v ./... -run TestOrganizationMembershipsList -tags=integration

External links

Copy link
Contributor

@nfagerlund nfagerlund left a comment

Choose a reason for hiding this comment

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

LGTM! At first I wasn't sure what you meant about not being able to set username, but I did a couple tests and now I get it — we straight-up can't create users from these tests yet. Ah well!

@sebasslash sebasslash merged commit 27c5ea1 into main Oct 17, 2022
@sebasslash sebasslash deleted the add-search-to-orgmembers branch October 17, 2022 17:58
@github-actions
Copy link

Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants