From a820399f680d70d95af117d2040f54fbd2b4e4bb Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 7 Apr 2018 20:19:24 +0200 Subject: [PATCH] add list issue labels method --- lib/Issue.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/Issue.js b/lib/Issue.js index 59ba1eab..5ea21d2b 100644 --- a/lib/Issue.js +++ b/lib/Issue.js @@ -212,6 +212,18 @@ class Issue extends Requestable { listLabels(options, cb) { return this._request('GET', `/repos/${this.__repository}/labels`, options, cb); } + + /** + * List the labels of a particular issue + * @see https://developer.github.com/v3/issues/labels/#list-labels-on-an-issue + * @param {number} issue - the id of the issue to get comments from + * @param {Object} data ... + * @param {Requestable.callback} [cb] - will receive the comments + * @return {Promise} - the promise for the http request + */ + listIssueLabels(issue, data, cb) { + return this._request('GET', `/repos/${this.__repository}/issues/${issue}/labels`, data, cb); + } /** * Get a label