diff --git a/lib/Repository.js b/lib/Repository.js index d338b261..5acf0559 100644 --- a/lib/Repository.js +++ b/lib/Repository.js @@ -504,6 +504,17 @@ class Repository extends Requestable { return this._request('GET', `/repos/${this.__fullname}/forks`, null, cb); } + /** + * List the reviews of a specific pull request + * @see https://developer.github.com/v3/pulls/reviews/ + * @param {number|string} number - the PR you wish to fetch + * @param {Requestable.callback} [cb] - will receive the list of reviews from the API + * @return {Promise} - the promise for the http request + */ + listPullRequestReviews(number, cb) { + return this._request('GET', `/repos/${this.__fullname}/pulls/${number}/reviews`, null, cb); + } + /** * Create a new branch from an existing branch. * @param {string} [oldBranch=master] - the name of the existing branch