fetchPullRequestList method
Fetches a list of Pull Requests from the remote repository.
Request parameters:
name - Required. The GitRepositoryLink resource name in the format
projects / * /locations / * /connections / * /gitRepositoryLinks / * .
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/connections/\[^/\]+/gitRepositoryLinks/\[^/\]+$.
filter - Optional. A filter expression that filters the pull requests
returned in the response. Only a single equality comparison on state is
supported, for example state = "OPEN". Supported values are OPEN,
CLOSED, and MERGED. DECLINED is only supported for SCM providers
that support declining pull requests, and returns INVALID_ARGUMENT for
GitHub, GitHub Enterprise, GitLab, and GitLab Enterprise. Other values or
expressions return INVALID_ARGUMENT. Defaults to state = "OPEN" if
unspecified.
pageSize - Optional. Number of results to return in the list. Default is
20. Max is 100. A page may contain fewer than page_size results even
when more results are available; use next_page_token to check for more
pages.
pageToken - Optional. A page token, received from a previous
FetchGitRepositoryLinkPullRequestList call. Provide this to retrieve the
subsequent page.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a FetchGitRepositoryLinkPullRequestListResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<FetchGitRepositoryLinkPullRequestListResponse>
fetchPullRequestList(
core.String name, {
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'filter': ?filter == null ? null : [filter],
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$name') + ':fetchPullRequestList';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return FetchGitRepositoryLinkPullRequestListResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}