/// <summary> /// Creates new issue and returns reference to created issue. /// </summary> /// <param name="jira">Instance of <c>SimpleJira.Interface.IJira</c>.</param> /// <param name="issue">Issue.</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> /// Reference To issue that contains issue's key, issue's id, issue's API url. /// </returns> public static Task <JiraIssueReference> CreateIssueAsync(this IJira jira, JiraIssue issue) { return(jira.CreateIssueAsync(issue, CancellationToken.None)); }
/// <summary> /// Creates new issue and returns reference to created issue. /// </summary> /// <param name="jira">Instance of <c>SimpleJira.Interface.IJira</c>.</param> /// <param name="issue">Issue.</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> /// Reference To issue that contains issue's key, issue's id, issue's API url. /// </returns> public static JiraIssueReference CreateIssue(this IJira jira, JiraIssue issue) { return(jira.CreateIssueAsync(issue, CancellationToken.None).GetAwaiter().GetResult()); }