Example #1
0
 /// <summary>
 /// Adds comment to an existing issue.
 /// </summary>
 /// <param name="jira">Instance of <c>SimpleJira.Interface.IJira</c>.</param>
 /// <param name="issueReference">Reference to an existing issue. Should contains issue's key or issue's id.</param>
 /// <param name="comment">Comment model. Should contains Body.</param>
 /// <exception cref="SimpleJira.Interface.JiraAuthorizationException">Throws exception when user is not authorized.</exception>
 /// <exception cref="SimpleJira.Interface.JiraException">Throws exception in other cases.</exception>
 /// <returns>
 ///     Comment model with comment's id, comment's API url, comment's author, others.
 /// </returns>
 public static Task <JiraComment> AddCommentAsync(this IJira jira, JiraIssueReference issueReference,
                                                  JiraComment comment)
 {
     return(jira.AddCommentAsync(issueReference, comment, CancellationToken.None));
 }
Example #2
0
 /// <summary>
 /// Adds comment to an existing issue.
 /// </summary>
 /// <param name="jira">Instance of <c>SimpleJira.Interface.IJira</c>.</param>
 /// <param name="issueReference">Reference to an existing issue. Should contains issue's key or issue's id.</param>
 /// <param name="comment">Comment model. Should contains Body.</param>
 /// <exception cref="SimpleJira.Interface.JiraAuthorizationException">Throws exception when user is not authorized.</exception>
 /// <exception cref="SimpleJira.Interface.JiraException">Throws exception in other cases.</exception>
 /// <returns>
 ///     Comment model with comment's id, comment's API url, comment's author, others.
 /// </returns>
 public static JiraComment AddComment(this IJira jira, JiraIssueReference issueReference,
                                      JiraComment comment)
 {
     return(jira.AddCommentAsync(issueReference, comment, CancellationToken.None).GetAwaiter().GetResult());
 }