edit method
Edit a pull request.
API docs: https://developer.github.com/v3/pulls/#update-a-pull-request
Implementation
Future<PullRequest> edit(RepositorySlug slug, int number,
{String? title, String? body, String? state, String? base}) {
final map = <String, dynamic>{};
putValue('title', title, map);
putValue('body', body, map);
putValue('state', state, map);
putValue('base', base, map);
return github
.request('POST', '/repos/${slug.fullName}/pulls/$number',
body: GitHubJson.encode(map))
.then((response) {
return PullRequest.fromJson(
jsonDecode(response.body) as Map<String, dynamic>);
});
}