Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pull Request Comment "In Reply To" Field #1715

Merged
merged 1 commit into from
Nov 15, 2017
Merged
Changes from all 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
8 changes: 7 additions & 1 deletion Octokit/Models/Response/PullRequestReviewComment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public PullRequestReviewComment(int id)
Id = id;
}

public PullRequestReviewComment(string url, int id, string diffHunk, string path, int? position, int? originalPosition, string commitId, string originalCommitId, User user, string body, DateTimeOffset createdAt, DateTimeOffset updatedAt, string htmlUrl, string pullRequestUrl)
public PullRequestReviewComment(string url, int id, string diffHunk, string path, int? position, int? originalPosition, string commitId, string originalCommitId, User user, string body, DateTimeOffset createdAt, DateTimeOffset updatedAt, string htmlUrl, string pullRequestUrl, int? inReplyToId)
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like you forgot to assign the passed in variable to the class member, within the constructor

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's embarrassing. Fixed in latest commit.

{
Url = url;
Id = id;
Expand All @@ -31,6 +31,7 @@ public PullRequestReviewComment(string url, int id, string diffHunk, string path
UpdatedAt = updatedAt;
HtmlUrl = htmlUrl;
PullRequestUrl = pullRequestUrl;
InReplyToId = inReplyToId;
}

/// <summary>
Expand Down Expand Up @@ -105,6 +106,11 @@ public PullRequestReviewComment(string url, int id, string diffHunk, string path

public ReactionSummary Reactions { get; protected set; }

/// <summary>
/// The Id of the comment this comment replys to.
/// </summary>
public int? InReplyToId { get; protected set; }

internal string DebuggerDisplay
{
get { return string.Format(CultureInfo.InvariantCulture, "Id: {0}, Path: {1}, User: {2}, Url: {3}", Id, Path, User.DebuggerDisplay, Url); }
Expand Down