Skip to content

Commit f5d5c43

Browse files
AurelioDeRosaclayreimann
authored andcommitted
feature(repository): add listPullRequestFiles (#353)
1 parent 7ac1633 commit f5d5c43

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/Repository.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,17 @@ class Repository extends Requestable {
108108
return this._request('GET', `/repos/${this.__fullname}/pulls/${number}`, null, cb);
109109
}
110110

111+
/**
112+
* List the files of a specific pull request
113+
* @see https://developer.github.com/v3/pulls/#list-pull-requests-files
114+
* @param {number|string} number - the PR you wish to fetch
115+
* @param {Requestable.callback} [cb] - will receive the list of files from the API
116+
* @return {Promise} - the promise for the http request
117+
*/
118+
listPullRequestFiles(number, cb) {
119+
return this._request('GET', `/repos/${this.__fullname}/pulls/${number}/files`, null, cb);
120+
}
121+
111122
/**
112123
* Compare two branches/commits/repositories
113124
* @see https://developer.github.com/v3/repos/commits/#compare-two-commits

0 commit comments

Comments
 (0)