Add Author Association for comments related models (#1877)

* Add Author Association for comments related models

* remove optional AuthorAssociation from constructors

* tidy up whitespace/formatting
This commit is contained in:
Ehsan Mirsaeedi
2018-11-07 07:18:21 -05:00
committed by Ryan Gribble
parent d34aa8021a
commit eb9c112c03
4 changed files with 73 additions and 3 deletions
@@ -15,7 +15,7 @@ namespace Octokit
Id = id;
}
public PullRequestReviewComment(string url, int id, string nodeId, string diffHunk, string path, int? position, int? originalPosition, string commitId, string originalCommitId, User user, string body, DateTimeOffset createdAt, DateTimeOffset updatedAt, string htmlUrl, string pullRequestUrl, ReactionSummary reactions, int? inReplyToId, int? pullRequestReviewId)
public PullRequestReviewComment(string url, int id, string nodeId, string diffHunk, string path, int? position, int? originalPosition, string commitId, string originalCommitId, User user, string body, DateTimeOffset createdAt, DateTimeOffset updatedAt, string htmlUrl, string pullRequestUrl, ReactionSummary reactions, int? inReplyToId, int? pullRequestReviewId, AuthorAssociation authorAssociation)
{
PullRequestReviewId = pullRequestReviewId;
Url = url;
@@ -35,6 +35,7 @@ namespace Octokit
PullRequestUrl = pullRequestUrl;
Reactions = reactions;
InReplyToId = inReplyToId;
AuthorAssociation = authorAssociation;
}
/// <summary>
@@ -127,6 +128,11 @@ namespace Octokit
/// </summary>
public int? PullRequestReviewId { get; protected set; }
/// <summary>
/// The comment author association with repository.
/// </summary>
public StringEnum<AuthorAssociation> AuthorAssociation { 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); }