Skip to content

Conversation

@fjgarlin
Copy link
Contributor

@fjgarlin fjgarlin commented May 5, 2023

The forks endpoint allows a handy search parameter, so define it as an option.

See the options for forks endpoint: https://docs.gitlab.com/ee/api/projects.html#list-forks-of-a-project

With the following code:

      $forks = $gitlab_client->projects()->forks($project, [
        'search' => 'search_term',
      ]);

Currently: throws exception as parameter is not defined.
After applying changes: returns list of forks that match "search_term"

The `forks` endpoint allows a handy `search` parameter, so define it as an option.
Options for forks endpoint: https://docs.gitlab.com/ee/api/projects.html#list-forks-of-a-project
Copy link
Member

@GrahamCampbell GrahamCampbell left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Please address the inline comments and add test coverage.

@fjgarlin
Copy link
Contributor Author

Inline comments were addressed and test coverage was added. Pleae review.

@GrahamCampbell GrahamCampbell changed the base branch from 11.10 to 11.11 July 17, 2023 09:15
@GrahamCampbell GrahamCampbell changed the title Allow "search" parameter to "forks" endpoint. [11.11] Allow "search" parameter to "forks" endpoint. Jul 17, 2023
@GrahamCampbell GrahamCampbell changed the title [11.11] Allow "search" parameter to "forks" endpoint. [11.11] Add support for additional parameters in Projects::forks Jul 17, 2023
@GrahamCampbell GrahamCampbell merged commit 1b9a894 into GitLabPHP:11.11 Jul 17, 2023
@GrahamCampbell
Copy link
Member

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants