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

Allow searching by name on team and project list #849

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

JarrettSpiker
Copy link
Contributor

Description

Adds Query parameter to team and project list options. This allows teams and projects to be searched by name through go-tfe.

Testing plan

  1. Teams.List can now accept a query parameter which filters results by name
  2. Projects.List can now accept a query parameter which filters results by name

External links

Output from tests

go test -timeout 30s -run ^TestProjectsList$ github.com/hashicorp/go-tfe

=== RUN   TestProjectsList
=== RUN   TestProjectsList/without_list_options
--- PASS: TestProjectsList/without_list_options (0.16s)
=== RUN   TestProjectsList/with_pagination_list_options
--- PASS: TestProjectsList/with_pagination_list_options (0.16s)
=== RUN   TestProjectsList/with_query_list_option
--- PASS: TestProjectsList/with_query_list_option (0.17s)
=== RUN   TestProjectsList/without_a_valid_organization
--- PASS: TestProjectsList/without_a_valid_organization (0.00s)
--- PASS: TestProjectsList (2.10s)
PASS
ok      github.com/hashicorp/go-tfe     2.732s


go test -timeout 30s -run ^TestTeamsList$ github.com/hashicorp/go-tfe

=== RUN   TestTeamsList
=== RUN   TestTeamsList/without_list_options
--- PASS: TestTeamsList/without_list_options (0.34s)
=== RUN   TestTeamsList/with_list_options
=== RUN   TestTeamsList/with_list_options/with_invalid_names_query_param
--- PASS: TestTeamsList/with_list_options/with_invalid_names_query_param (0.00s)
--- PASS: TestTeamsList/with_list_options (0.64s)
=== RUN   TestTeamsList/without_a_valid_organization
--- PASS: TestTeamsList/without_a_valid_organization (0.00s)
--- PASS: TestTeamsList (3.29s)
PASS
ok      github.com/hashicorp/go-tfe     3.780s

...

@JarrettSpiker JarrettSpiker requested a review from a team as a code owner February 7, 2024 17:39
@JarrettSpiker JarrettSpiker force-pushed the jspiker/search-projects-and-teams branch 2 times, most recently from c491fc5 to d5018eb Compare February 13, 2024 15:16
@JarrettSpiker JarrettSpiker force-pushed the jspiker/search-projects-and-teams branch from d5018eb to 60dbe00 Compare February 22, 2024 18:35
@JarrettSpiker JarrettSpiker force-pushed the jspiker/search-projects-and-teams branch from 60dbe00 to f1f4168 Compare February 26, 2024 22:07
@JarrettSpiker JarrettSpiker merged commit eedd1e2 into main Feb 27, 2024
10 checks passed
@JarrettSpiker JarrettSpiker deleted the jspiker/search-projects-and-teams branch February 27, 2024 13:08
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.

2 participants