mergeRepoPullRequestWithHttpInfo method
Merge a pull request.
Note: This method returns the HTTP Response.
Parameters:
-
String owner (required):
-
String repo (required):
-
int number (required):
-
Map<String, Object> requestBody:
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,
);
}