Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adds method for listing review comments#404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
jedfonner wants to merge1 commit intogithub-tools:master
base:master
Choose a base branch
Loading
fromjedfonner:403-list-review-comments
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletionslib/Repository.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -803,6 +803,17 @@ class Repository extends Requestable {
mergePullRequest(number, options, cb) {
return this._request('PUT', `/repos/${this.__fullname}/pulls/${number}/merge`, options, cb);
}

/**
* List review comments on an pull request
* @see https://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request
* @param {number|string} number - the number of the pull request to get review comments from
* @param {Requestable.callback} [cb] - will receive the comments
* @return {Promise} - the promise for the http request
*/
listPullRequestReviewComments(number, cb) {
return this._request('GET', `/repos/${this.__fullname}/pulls/${number}/comments`, null, cb);
}
}

module.exports = Repository;
10 changes: 10 additions & 0 deletionstest/repository.spec.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -240,6 +240,16 @@ describe('Repository', function() {
done();
}));
});

it('should list review comments', function(done) {
const repo = github.getRepo('michael', 'github');
Copy link
Member

@mtscout6mtscout6Dec 2, 2016
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This project was moved to the github-tools Organization. You'll want to update this to get the tests working.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

You'll also want to update based on the latest changes from master that got the tests working again.


repo.listPullRequestReviewComments(401, assertSuccessful(done, function(err, reviewComments) {
expect(reviewComments).to.be.an.array();
//expect(reviewComments[0]).to.have.own('body', 'Comment test'); //TODO: Need to establish a test PR with test review comments
done();
}));
});
});

describe('creating/modifiying', function() {
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp