Skip to content

Commit 7a5d9d0

Browse files
committed
fix(repository): Added updatePullRequest method
This change deprecates the updatePullRequst method fixes #362 closes #365
1 parent 14b7023 commit 7a5d9d0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/Repository.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,13 +485,28 @@ class Repository extends Requestable {
485485

486486
/**
487487
* Update a pull request
488+
* @deprecated since version 2.4.0
488489
* @see https://developer.github.com/v3/pulls/#update-a-pull-request
489490
* @param {number|string} number - the number of the pull request to update
490491
* @param {Object} options - the pull request description
491492
* @param {Requestable.callback} [cb] - will receive the pull request information
492493
* @return {Promise} - the promise for the http request
493494
*/
494495
updatePullRequst(number, options, cb) {
496+
log('Deprecated: This method contains a typo and it has been deprecated. It will be removed in next major version. Use updatePullRequest() instead.');
497+
498+
return this.updatePullRequest(number, options, cb);
499+
}
500+
501+
/**
502+
* Update a pull request
503+
* @see https://developer.github.com/v3/pulls/#update-a-pull-request
504+
* @param {number|string} number - the number of the pull request to update
505+
* @param {Object} options - the pull request description
506+
* @param {Requestable.callback} [cb] - will receive the pull request information
507+
* @return {Promise} - the promise for the http request
508+
*/
509+
updatePullRequest(number, options, cb) {
495510
return this._request('PATCH', `/repos/${this.__fullname}/pulls/${number}`, options, cb);
496511
}
497512

0 commit comments

Comments
 (0)