diff --git a/src/CmdLineArgs.cs b/src/CmdLineArgs.cs index 80ebb91..7f0baa8 100644 --- a/src/CmdLineArgs.cs +++ b/src/CmdLineArgs.cs @@ -19,7 +19,7 @@ internal class CmdLineArgs [ArgumentGroup(nameof(CommandAction.List))] public GitHubObjectType ObjectType { get; set; } - [OptionalArgument(0, "label", "Specific label that you want to filter issues by. If not specified, all issues are returned")] + [OptionalArgument("", "label", "Specific label that you want to filter issues by. If not specified, all issues are returned")] [ArgumentGroup(nameof(CommandAction.List))] public string Label { get; set; } diff --git a/src/Creator.csproj b/src/Creator.csproj index 8ae4dea..f3a3494 100644 --- a/src/Creator.csproj +++ b/src/Creator.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + netcoreapp3.1;net5.0 GHCreator diff --git a/src/Models/Objects/Issue.cs b/src/Models/Objects/Issue.cs index 5c000ab..df6b2a6 100644 --- a/src/Models/Objects/Issue.cs +++ b/src/Models/Objects/Issue.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using System.Linq; using System.Text; namespace Creator.Models.Objects @@ -11,14 +12,17 @@ public class Issue : GitHubObject, IConvertToOctokit { public string AssignedTo { get; set; } public string Milestone { get; set; } - + public string RepositoryName { get; set; } public string OrganizationName { get; set; } + public string Labels { get; set; } + public Issue(Octokit.Issue issue) : base(issue.Title, issue.HtmlUrl) { AssignedTo = issue.Assignee?.Login; Milestone = issue.Milestone?.Title; + Labels = string.Join(",", issue.Labels.OrderBy(x => x.Name).Select(x => x.Name)); } public Issue(params string[] entries) : base(entries) @@ -57,7 +61,7 @@ public override int GetHashCode() public override string ToString() { - return $"Issue,{base.ToString()},{AssignedTo},{Milestone},{RepositoryName},{OrganizationName}"; + return $"Issue,{base.ToString()},{AssignedTo},{Milestone},{RepositoryName},{OrganizationName},{Labels}"; } public NewIssue ConvertTo()