Files
octokit.net/Octokit/Models/Response/IssueComment.cs
Victor 6c43183837 fix: comment id model update to long instead of int
* #2927: comment id model update to long instead of int

* #2927: code review fixes (1)

* #2927: code review fixes (2)

* #2927: comment id model update to long instead of int: unit tests fix

* #2927: code review fixes

* Fixed most names of parameters

---------

Co-authored-by: Victor Vorobyev <victor@myrtle-sa.com>
Co-authored-by: Brian C. Arnold <brian.arnold@spiderrock.net>
2024-06-10 08:12:08 -05:00

98 lines
2.7 KiB
C#

using System;
using System.Diagnostics;
using System.Globalization;
using Octokit.Internal;
namespace Octokit
{
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class IssueComment
{
public IssueComment() { }
public IssueComment(long id, string nodeId, string url, string htmlUrl, string body, DateTimeOffset createdAt, DateTimeOffset? updatedAt, User user, ReactionSummary reactions, AuthorAssociation authorAssociation)
{
Id = id;
NodeId = nodeId;
Url = url;
HtmlUrl = htmlUrl;
Body = body;
CreatedAt = createdAt;
UpdatedAt = updatedAt;
User = user;
Reactions = reactions;
AuthorAssociation = authorAssociation;
}
/// <summary>
/// The issue comment Id.
/// </summary>
public long Id { get; private set; }
/// <summary>
/// GraphQL Node Id
/// </summary>
public string NodeId { get; private set; }
/// <summary>
/// The URL for this issue comment.
/// </summary>
public string Url { get; private set; }
/// <summary>
/// The html URL for this issue comment.
/// </summary>
public string HtmlUrl { get; private set; }
/// <summary>
/// Details about the issue comment.
/// </summary>
public string Body { get; private set; }
/// <summary>
/// The date the issue comment was created.
/// </summary>
public DateTimeOffset CreatedAt { get; private set; }
/// <summary>
/// The date the issue comment was last updated.
/// </summary>
public DateTimeOffset? UpdatedAt { get; private set; }
/// <summary>
/// The user that created the issue comment.
/// </summary>
public User User { get; private set; }
/// <summary>
/// The comment author association with repository.
/// </summary>
public StringEnum<AuthorAssociation> AuthorAssociation { get; private set; }
/// <summary>
/// The reaction summary for this comment.
/// </summary>
public ReactionSummary Reactions { get; private set; }
internal string DebuggerDisplay
{
get { return string.Format(CultureInfo.InvariantCulture, "Id: {0} CreatedAt: {1}", Id, CreatedAt); }
}
}
public enum IssueCommentSort
{
/// <summary>
/// Sort by create date (default)
/// </summary>
[Parameter(Value = "created")]
Created,
/// <summary>
/// Sort by the date of the last update
/// </summary>
[Parameter(Value = "updated")]
Updated
}
}