Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
                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);
                    }
                }
Ejemplo n.º 3
0
 async Task OnExecuteAsync()
 {
     var rs = await Jira.GetAsync <Response.Label>(new Request.Label
     {
         startAt    = 0,
         maxResults = 1000
     });
 }
Ejemplo n.º 4
0
                async Task OnExecuteAsync()
                {
                    var o = await Jira.ListComments(IssueIdOrKey);

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

                    Console.WriteLine(s);
                }
Ejemplo n.º 5
0
                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);
                }
Ejemplo n.º 6
0
                async Task OnExecuteAsync()
                {
                    var rs = await Jira.GetIssue(IssueIdOrKey);

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

                    Console.WriteLine(s);
                }
Ejemplo n.º 7
0
                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);
                    }
                }