示例#1
0
文件: Cmd.cs 项目: Herdubreid/Jira
 async Task OnExecuteAsync()
 {
     var fields = new Request.Fields
     {
         issuetype = Type.HasValue
                 ? new Request.Id
         {
             id = Type.Value.ToString()
         }
                 : null
     };
     var update = new Request.Update
     {
         timetracking = string.IsNullOrEmpty(Estimate)
         ? null
         : new Request.FieldUpdate <Request.Timetracking>[]
         {
             new Request.FieldUpdate <Request.Timetracking>
             {
                 set = new Request.Timetracking
                 {
                     originalEstimate = Estimate
                 }
             }
         }
     };
     await Jira.EditIssu(IssueIdOrKey, fields, update);
 }
示例#2
0
文件: Cmd.cs 项目: Herdubreid/Jira
                async Task OnExecuteAsync()
                {
                    if (Id.HasValue)
                    {
                        var rs = await Jira.GetAsync <Response.Comment>(new Request.Issue.Comment.Get
                        {
                            IdOrKey = IssueIdOrKey,
                            id      = Id.Value
                        });

                        var s = JsonSerializer.Serialize(rs, new JsonSerializerOptions {
                            WriteIndented = true
                        });
                        Console.WriteLine(s);
                    }
                    else
                    {
                        var rs = await Jira.GetAsync <Response.Comments>(new Request.Issue.Comment.Get
                        {
                            IdOrKey = IssueIdOrKey
                        });

                        var s = JsonSerializer.Serialize(rs, new JsonSerializerOptions {
                            WriteIndented = true
                        });
                        Console.WriteLine(s);
                    }
                }
示例#3
0
文件: Cmd.cs 项目: Herdubreid/Jira
 async Task OnExecuteAsync()
 {
     var rs = await Jira.GetAsync <Response.Label>(new Request.Label
     {
         startAt    = 0,
         maxResults = 1000
     });
 }
示例#4
0
文件: Cmd.cs 项目: Herdubreid/Jira
                async Task OnExecuteAsync()
                {
                    var o = await Jira.ListComments(IssueIdOrKey);

                    var s = JsonSerializer.Serialize(o, new JsonSerializerOptions {
                        WriteIndented = true
                    });

                    Console.WriteLine(s);
                }
示例#5
0
文件: Cmd.cs 项目: Herdubreid/Jira
                async Task OnExecuteAsync()
                {
                    var rs = await Jira.AddIssue(ProjectIdOrKey, IssueTypeId.ToString(), Summary, Description, new string[] { Label });

                    var s = JsonSerializer.Serialize(rs, new JsonSerializerOptions
                    {
                        WriteIndented = true
                    });

                    Console.WriteLine(s);
                }
示例#6
0
文件: Cmd.cs 项目: Herdubreid/Jira
                async Task OnExecuteAsync()
                {
                    var rs = await Jira.GetIssue(IssueIdOrKey);

                    var s = JsonSerializer.Serialize(rs, new JsonSerializerOptions
                    {
                        WriteIndented = true
                    });

                    Console.WriteLine(s);
                }
示例#7
0
文件: Cmd.cs 项目: Herdubreid/Jira
                async Task OnExecuteAsync()
                {
                    if (Transition.HasValue)
                    {
                        await Jira.TransitionIssue(IssueIdOrKey, Transition.ToString());
                    }
                    else
                    {
                        var rs = await Jira.ListTransitions(IssueIdOrKey);

                        var s = JsonSerializer.Serialize(rs, new JsonSerializerOptions {
                            WriteIndented = true
                        });
                        Console.WriteLine(s);
                    }
                }