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