mergeRepoPullRequestWithHttpInfo method

Future<Response> mergeRepoPullRequestWithHttpInfo(
  1. String owner,
  2. String repo,
  3. int number, {
  4. Map<String, Object>? requestBody,
})

Merge a pull request.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> mergeRepoPullRequestWithHttpInfo(String owner, String repo, int number, { Map<String, Object>? requestBody, }) async {
  // ignore: prefer_const_declarations
  final path = r'/v1/repos/repositories/{owner}/{repo}/pulls/{number}/merge'
    .replaceAll('{owner}', owner)
    .replaceAll('{repo}', repo)
    .replaceAll('{number}', number.toString());

  // ignore: prefer_final_locals
  Object? postBody = requestBody;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}