Files
octokit.net/Octokit/Models/Request/NewIssue.cs
Ryan Gribble 600c8657e4 Remove method/members previously deprecated (#1780)
* removes obsolete OranizationsClient.GetAll (replaced with GetAllForUser)

* removes obsolete PullRequestsClient.Comment (replaced with ReviewComment)

* removes obsolete TeamsClient.GetMembership (replaced with GetMembershipDetails)
removes obsolete TeamsClient.AddMembership (replaced with AddOrEditMembership)
removes obsolete TeamsClient.AddMembership (replaced with AddOrEditMembership)
removes obsolete TeamMembership response class (replaced with TeamMembershipDetails)

* removes obsolete RepositoryBranchesClient.GetRequiredStatusChecksContexts (replaced with GetAllRequiredStatusChecksContexts)
removes obsolete RepositoryBranchesClient.GetProtectedBranchTeamRestrictions (replaced with GetAllProtectedBranchTeamRestrictions)
removes obsolete RepositoryBranchesClient.GetProtectedBranchUserRestrictions (replaced with GetAllProtectedBranchUserRestrictions)

* removes obsolete RepositoryTrafficClient.GetReferrers (replaced with GetAllReferrers)
removes obsolete RepositoryTrafficClient.GetPaths (replaced with GetAllPaths)

* removes obsolete constructors from BranchProtectionUpdateSettings and UpdateTeam request models

* removes obsolete Assignee property from NewIssue and IssueUpdate request models (replaced with Assignees)
2018-04-22 09:58:06 +10:00

70 lines
2.3 KiB
C#

using System;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
namespace Octokit
{
/// <summary>
/// Describes a new issue to create via the <see cref="IIssuesClient.Create(string,string,NewIssue)" /> method.
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class NewIssue
{
/// <summary>
/// Initializes a new instance of the <see cref="NewIssue"/> class.
/// </summary>
/// <param name="title">The title of the issue.</param>
public NewIssue(string title)
{
Title = title;
Assignees = new Collection<string>();
Labels = new Collection<string>();
}
/// <summary>
/// Title of the milestone (required)
/// </summary>
public string Title { get; private set; }
/// <summary>
/// Details about the issue.
/// </summary>
public string Body { get; set; }
/// <summary>
/// List of logins for the multiple users that this issue should be assigned to
/// </summary>
/// <remarks>
/// Only users with push access can set the multiple assignees for new issues. The assignees are silently dropped otherwise.
/// </remarks>
public Collection<string> Assignees { get; private set; }
/// <summary>
/// Milestone to associate this issue with.
/// </summary>
/// <remarks>
/// Only users with push access can set the milestone for new issues. The milestone is silently dropped
/// otherwise
/// </remarks>
public int? Milestone { get; set; }
/// <summary>
/// Labels to associate with this issue.
/// </summary>
/// <remarks>
/// Only users with push access can set labels for new issues. Labels are silently dropped otherwise.
/// </remarks>
public Collection<string> Labels { get; private set; }
internal string DebuggerDisplay
{
get
{
var labels = Labels ?? new Collection<string>();
return string.Format(CultureInfo.InvariantCulture, "Title: {0} Labels: {1}", Title, string.Join(",", labels));
}
}
}
}