Files
octokit.net/Octokit/Models/Response/PullRequestReview.cs
Ryan Gribble 5e89232521 Release v0.25 - She'll be Comin' Round the Mountain (#1656)
* Run `build -Target FormatCode` to fixup whitespace etc

* Fix delete release asset integration test

* Fix repository fork test

* Fix pagination test for PR Review Request

* First cut of release notes

* update release notes

* Update release notes

* include links to contributors

* Add breaking changes/advisories section

* Tidy up formatting

* Tidy up wording
2017-08-23 21:27:15 +10:00

88 lines
2.3 KiB
C#

using System;
using System.Diagnostics;
using System.Globalization;
using Octokit.Internal;
namespace Octokit
{
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class PullRequestReview
{
public PullRequestReview() { }
public PullRequestReview(long id)
{
Id = id;
}
public PullRequestReview(long id, string commitId, User user, string body, string htmlUrl, string pullRequestUrl, PullRequestReviewState state)
{
Id = id;
CommitId = commitId;
User = user;
Body = body;
HtmlUrl = htmlUrl;
PullRequestUrl = pullRequestUrl;
State = state;
}
/// <summary>
/// The review Id.
/// </summary>
public long Id { get; protected set; }
/// <summary>
/// The state of the review
/// </summary>
public StringEnum<PullRequestReviewState> State { get; protected set; }
/// <summary>
/// The commit Id the review is associated with.
/// </summary>
public string CommitId { get; protected set; }
/// <summary>
/// The user that created the review.
/// </summary>
public User User { get; protected set; }
/// <summary>
/// The text of the review.
/// </summary>
public string Body { get; protected set; }
/// <summary>
/// The URL for this review on Github.com
/// </summary>
public string HtmlUrl { get; protected set; }
/// <summary>
/// The URL for the pull request via the API.
/// </summary>
public string PullRequestUrl { get; protected set; }
internal string DebuggerDisplay
{
get { return string.Format(CultureInfo.InvariantCulture, "Id: {0}, State: {1}, User: {2}", Id, State.DebuggerDisplay, User.DebuggerDisplay); }
}
}
public enum PullRequestReviewState
{
[Parameter(Value = "APPROVED")]
Approved,
[Parameter(Value = "CHANGES_REQUESTED")]
ChangesRequested,
[Parameter(Value = "COMMENTED")]
Commented,
[Parameter(Value = "DISMISSED")]
Dismissed,
[Parameter(Value = "PENDING")]
Pending
}
}