From 807a4d90aab663d7f1740faf7b5f70642f0e7a7f Mon Sep 17 00:00:00 2001 From: Victor Aprea Date: Mon, 6 May 2019 11:05:44 -0400 Subject: [PATCH 1/4] add support for https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request --- lib/Repository.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/Repository.js b/lib/Repository.js index e796e1bf..96f56689 100644 --- a/lib/Repository.js +++ b/lib/Repository.js @@ -119,6 +119,18 @@ class Repository extends Requestable { return this._request('GET', `/repos/${this.__fullname}/pulls/${number}/files`, null, cb); } + /** + * List the commits associated with a specific pull request + * @see https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request + * @param {number|string} number - the PR you wish to fetch + * @param {Requestable.callback} [cb] - will receive the list of files from the API + * @return {Promise} - the promise for the http request + */ + + listPullRequestCommits(number, cb) { + return this._request('GET', '/repos/' + this.__fullname + '/pulls/' + number + '/commits', null, cb); + } + /** * Compare two branches/commits/repositories * @see https://developer.github.com/v3/repos/commits/#compare-two-commits From 144b019df1f7504653be93433836cefb5bffa4d4 Mon Sep 17 00:00:00 2001 From: Victor Aprea Date: Mon, 6 May 2019 11:08:24 -0400 Subject: [PATCH 2/4] add support for https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request --- lib/Repository.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/Repository.js b/lib/Repository.js index 96f56689..cda4aaab 100644 --- a/lib/Repository.js +++ b/lib/Repository.js @@ -119,6 +119,17 @@ class Repository extends Requestable { return this._request('GET', `/repos/${this.__fullname}/pulls/${number}/files`, null, cb); } + /** + * List the commits of a specific pull request + * @see https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository + * @param {number|string} number - the PR you wish to fetch + * @param {Requestable.callback} [cb] - will receive the list of commits from the API + * @return {Promise} - the promise for the http request + */ + listPullRequestCommitss(number, cb) { + return this._request('GET', `/repos/${this.__fullname}/pulls/${number}/commits`, null, cb); + } + /** * List the commits associated with a specific pull request * @see https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request From aff837fdd94720e24681eea5726eb16fb4043836 Mon Sep 17 00:00:00 2001 From: Victor Aprea Date: Mon, 6 May 2019 11:10:15 -0400 Subject: [PATCH 3/4] remove redundant implementation --- lib/Repository.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/lib/Repository.js b/lib/Repository.js index cda4aaab..60735707 100644 --- a/lib/Repository.js +++ b/lib/Repository.js @@ -119,22 +119,11 @@ class Repository extends Requestable { return this._request('GET', `/repos/${this.__fullname}/pulls/${number}/files`, null, cb); } - /** - * List the commits of a specific pull request - * @see https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository - * @param {number|string} number - the PR you wish to fetch - * @param {Requestable.callback} [cb] - will receive the list of commits from the API - * @return {Promise} - the promise for the http request - */ - listPullRequestCommitss(number, cb) { - return this._request('GET', `/repos/${this.__fullname}/pulls/${number}/commits`, null, cb); - } - /** * List the commits associated with a specific pull request * @see https://developer.github.com/v3/pulls/#list-commits-on-a-pull-request * @param {number|string} number - the PR you wish to fetch - * @param {Requestable.callback} [cb] - will receive the list of files from the API + * @param {Requestable.callback} [cb] - will receive the list of commits from the API * @return {Promise} - the promise for the http request */ From 30aa5c7af390d3d04325d7f693013a6c86013173 Mon Sep 17 00:00:00 2001 From: Victor Aprea Date: Mon, 6 May 2019 14:22:12 -0400 Subject: [PATCH 4/4] fix indentation and remove space for JSDoc --- lib/Repository.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Repository.js b/lib/Repository.js index 60735707..22563d28 100644 --- a/lib/Repository.js +++ b/lib/Repository.js @@ -126,9 +126,8 @@ class Repository extends Requestable { * @param {Requestable.callback} [cb] - will receive the list of commits from the API * @return {Promise} - the promise for the http request */ - listPullRequestCommits(number, cb) { - return this._request('GET', '/repos/' + this.__fullname + '/pulls/' + number + '/commits', null, cb); + return this._request('GET', '/repos/' + this.__fullname + '/pulls/' + number + '/commits', null, cb); } /** pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy