Search in sources :

Example 1 with IssueCommentRequestModel

use of com.synopsys.integration.jira.common.model.request.IssueCommentRequestModel in project hub-alert by blackducksoftware.

the class JiraIssueCommenter method addComment.

@Override
protected final void addComment(String comment, ExistingIssueDetails<String> existingIssueDetails, @Nullable ProjectIssueModel source) throws AlertException {
    try {
        IssueCommentRequestModel issueCommentRequestModel = new IssueCommentRequestModel(existingIssueDetails.getIssueKey(), comment);
        addComment(issueCommentRequestModel);
    } catch (IntegrationException e) {
        throw new AlertException(String.format("Failed to add a comment in Jira. Issue Key: %s", existingIssueDetails.getIssueKey()), e);
    }
}
Also used : IntegrationException(com.synopsys.integration.exception.IntegrationException) IssueCommentRequestModel(com.synopsys.integration.jira.common.model.request.IssueCommentRequestModel) AlertException(com.synopsys.integration.alert.api.common.model.exception.AlertException)

Aggregations

AlertException (com.synopsys.integration.alert.api.common.model.exception.AlertException)1 IntegrationException (com.synopsys.integration.exception.IntegrationException)1 IssueCommentRequestModel (com.synopsys.integration.jira.common.model.request.IssueCommentRequestModel)1