Files
octokit.net/Octokit/Models/Request/NewCheckRunOutput.cs
Ryan Gribble c5d5df5b08 Implement Check Runs API (#1847)
* Add CheckRunEventPayload

* add CheckRunEventPayload into all the right places

* forgot integration tests for RepositoryId methods (+1 squashed commits)

Squashed commits:

[b2445bf3] Implement Create CheckRun methods for normal and observable clients including unit and integration tests and xmldoc comments

* Implement Update CheckRun method
Refactored NewCheckRun to inherit CheckRunUpdate since they share all fields except HeadSha

* Implement GetAllForReference method

* Implement GetAllForCheckSuite method

* tweak XmlDoc to match github documentation

* Implement Get method

* Implement GetAllAnnotations
Moved CheckRunAnnotation model from Request to Common and added a parameterless ctor, since it is now a response model as well as a request model

* Split common CheckRunAnnotation model into separate response and request models due to different field and ctor requirements
Rename other CheckRun request sub classes to be consistent with NewCheckRunAnnotation (eg NewCheckRunOutput, NewCheckRunImage, etc)

* add title field back into CheckRunAnnotation

* fix up XmlDocs

* fix mutable response property - hooray for convention tests!
2018-07-19 08:29:12 +10:00

48 lines
1.7 KiB
C#

using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
namespace Octokit
{
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class NewCheckRunOutput
{
/// <summary>
/// Constructs a CheckRunOutput request object
/// </summary>
/// <param name="title">Required. The title of the check run</param>
/// <param name="summary">Required. The summary of the check run. This parameter supports Markdown</param>
public NewCheckRunOutput(string title, string summary)
{
Title = title;
Summary = summary;
}
/// <summary>
/// Required. The title of the check run
/// </summary>
public string Title { get; protected set; }
/// <summary>
/// Required. The summary of the check run. This parameter supports Markdown
/// </summary>
public string Summary { get; protected set; }
/// <summary>
/// The details of the check run. This parameter supports Markdown
/// </summary>
public string Text { get; set; }
/// <summary>
/// Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. For details about annotations in the UI, see "About status checks"
/// </summary>
public IReadOnlyList<NewCheckRunAnnotation> Annotations { get; set; }
/// <summary>
/// Adds images to the output displayed in the GitHub pull request UI
/// </summary>
public IReadOnlyList<NewCheckRunImage> Images { get; set; }
internal string DebuggerDisplay => string.Format(CultureInfo.CurrentCulture, "Title: {0}", Title);
}
}