gitlab4j-api
gitlab4j-api copied to clipboard
Ability to search on runners by tag
RunnersApi.getRunners()
is missing the ability to search based on tag_list.
Either a new getRunners() method could be added with the additional parameter, or a new, more generic method could be added that would allow searching on any parameter that GitLab supports, like below:
public List<Runner> getRunners(Map<String,String> searchParams, int page, int perPage) throws GitLabApiException
{
GitLabApiForm formData = new GitLabApiForm(page, perPage);
for(Map.Entry<String,String> entry: params.entrySet()){
formData = formData.withParam(entry.getKey(), entry.getValue(), false);
}
Response response = get(Response.Status.OK, formData.asMap(), "runners");
return (response.readEntity(new GenericType<List<Runner>>() {}));
}