diff --git a/src/main/java/com/talanlabs/sonar/plugins/gitlab/GitLabApiV4Wrapper.java b/src/main/java/com/talanlabs/sonar/plugins/gitlab/GitLabApiV4Wrapper.java index 16cbc7a..b167157 100644 --- a/src/main/java/com/talanlabs/sonar/plugins/gitlab/GitLabApiV4Wrapper.java +++ b/src/main/java/com/talanlabs/sonar/plugins/gitlab/GitLabApiV4Wrapper.java @@ -279,7 +279,7 @@ public String getGitLabUrl(@Nullable String revision, String path, @Nullable Int @Override public void createOrUpdateReviewComment(String revision, String fullPath, Integer line, String body) { try { - if (config.isMergeRequestDiscussionEnabled() && config.mergeRequestIid() != -1) { + if (config.isMergeRequestDiscussionEnabled()) { createReviewDiscussion(fullPath, line, body); } else { gitLabAPIV4.getGitLabAPICommits().postCommitComments(gitLabProject.getId(), revision != null ? revision : getFirstCommitSHA(), body, fullPath, line, "new");