mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-05 23:06:10 +00:00
* 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
88 lines
2.3 KiB
C#
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
|
|
}
|
|
}
|