Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0198ac0

Browse files
AurelioDeRosaclayreimann
authored andcommitted
feature(repository): add updatePullRequst
1 parent f5d5c43 commit 0198ac0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib/Repository.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,18 @@ class Repository extends Requestable {
483483
return this._request('POST', `/repos/${this.__fullname}/pulls`, options, cb);
484484
}
485485

486+
/**
487+
* Update a pull request
488+
* @see https://developer.github.com/v3/pulls/#update-a-pull-request
489+
* @param {number|string} number - the number of the pull request to update
490+
* @param {Object} options - the pull request description
491+
* @param {Requestable.callback} [cb] - will receive the pull request information
492+
* @return {Promise} - the promise for the http request
493+
*/
494+
updatePullRequst(number, options, cb) {
495+
return this._request('PATCH', `/repos/${this.__fullname}/pulls/${number}`, options, cb);
496+
}
497+
486498
/**
487499
* List the hooks for the repository
488500
* @see https://developer.github.com/v3/repos/hooks/#list-hooks

0 commit comments

Comments
 (0)