public static PullRequestReviewComments ( long repositoryId, int number ) : |
||
repositoryId | long | The Id of the repository |
number | int | The pull request number |
Результат |
/// <summary> /// Gets review comments for a specified pull request. /// </summary> /// <remarks>http://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request</remarks> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="number">The pull request number</param> /// <returns>The list of <see cref="PullRequestReviewComment"/>s for the specified pull request</returns> public Task <IReadOnlyList <PullRequestReviewComment> > GetAll(string owner, string name, int number) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); return(ApiConnection.GetAll <PullRequestReviewComment>(ApiUrls.PullRequestReviewComments(owner, name, number))); }
/// <summary> /// Gets review comments for a specified pull request. /// </summary> /// <remarks>http://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request</remarks> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="number">The pull request number</param> /// <param name="options">Options for changing the API response</param> public Task<IReadOnlyList<PullRequestReviewComment>> GetAll(string owner, string name, int number, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); Ensure.ArgumentNotNull(options, nameof(options)); return ApiConnection.GetAll<PullRequestReviewComment>(ApiUrls.PullRequestReviewComments(owner, name, number), null, AcceptHeaders.ReactionsPreview, options); }
public Task <IReadOnlyList <PullRequestReviewComment> > GetAllComments(string owner, string name, int number, long reviewId, ApiOptions options) { Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner)); Ensure.ArgumentNotNullOrEmptyString(name, nameof(name)); var endpoint = ApiUrls.PullRequestReviewComments(owner, name, number, reviewId); return(ApiConnection.GetAll <PullRequestReviewComment>(endpoint, null, options)); }
/// <summary> /// Creates a comment on a pull request review as a reply to another comment. /// </summary> /// <remarks>http://developer.github.com/v3/pulls/comments/#create-a-comment</remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="number">The pull request number</param> /// <param name="comment">The comment</param> public async Task<PullRequestReviewComment> CreateReply(long repositoryId, int number, PullRequestReviewCommentReplyCreate comment) { Ensure.ArgumentNotNull(comment, nameof(comment)); var endpoint = ApiUrls.PullRequestReviewComments(repositoryId, number); var response = await ApiConnection.Connection.Post<PullRequestReviewComment>(endpoint, comment, null, null).ConfigureAwait(false); if (response.HttpResponse.StatusCode != HttpStatusCode.Created) { throw new ApiException("Invalid Status Code returned. Expected a 201", response.HttpResponse.StatusCode); } return response.Body; }
/// <summary> /// Creates a comment on a pull request review as a reply to another comment. /// </summary> /// <remarks>http://developer.github.com/v3/pulls/comments/#create-a-comment</remarks> /// <param name="owner">The owner of the repository</param> /// <param name="name">The name of the repository</param> /// <param name="number">The pull request number</param> /// <param name="comment">The comment</param> /// <returns>The created <see cref="PullRequestReviewComment"/></returns> public async Task <PullRequestReviewComment> CreateReply(string owner, string name, int number, PullRequestReviewCommentReplyCreate comment) { Ensure.ArgumentNotNullOrEmptyString(owner, "owner"); Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNull(comment, "comment"); var endpoint = ApiUrls.PullRequestReviewComments(owner, name, number); var response = await ApiConnection.Connection.Post <PullRequestReviewComment>(endpoint, comment, null, null).ConfigureAwait(false); if (response.HttpResponse.StatusCode != HttpStatusCode.Created) { throw new ApiException("Invalid Status Code returned. Expected a 201", response.HttpResponse.StatusCode); } return(response.Body); }
public Task <IReadOnlyList <PullRequestReviewComment> > GetAllComments(long repositoryId, int number, long reviewId, ApiOptions options) { var endpoint = ApiUrls.PullRequestReviewComments(repositoryId, number, reviewId); return(ApiConnection.GetAll <PullRequestReviewComment>(endpoint, null, options)); }
/// <summary> /// Gets review comments for a specified pull request. /// </summary> /// <remarks>http://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request</remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="number">The pull request number</param> /// <param name="options">Options for changing the API response</param> public Task<IReadOnlyList<PullRequestReviewComment>> GetAll(long repositoryId, int number, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); return ApiConnection.GetAll<PullRequestReviewComment>(ApiUrls.PullRequestReviewComments(repositoryId, number), options); }