Update BugTrackerEventTrigger.java
Commit Missed file changes.
Feature/841 option to disable comment on pr
@@ -35,25 +35,35 @@ public class BugTrackerEventTrigger {
switch (bugTrackerType) {
case GITLABMERGE:
+ if (gitLabService.isScanSubmittedComment()) {
gitLabService.sendMergeComment(request, SCAN_MESSAGE);
+ }
gitLabService.startBlockMerge(request);
break;
case GITLABCOMMIT:
+ if (gitLabService.isScanSubmittedComment()) {
gitLabService.sendCommitComment(request, SCAN_MESSAGE);
+ }
break;
case GITHUBPULL:
+ if (gitService.isScanSubmittedComment()) {
gitService.sendMergeComment(request, SCAN_MESSAGE);
+ }
gitService.startBlockMerge(request, cxProperties.getUrl());
break;
case BITBUCKETPULL:
+ if (bbService.isScanSubmittedComment()) {
bbService.sendMergeComment(request, SCAN_MESSAGE);
+ }
break;
case BITBUCKETSERVERPULL:
+ if (bbService.isScanSubmittedComment()) {
bbService.sendServerMergeComment(request, SCAN_MESSAGE);
+ }
bbService.setBuildStartStatus(request);
break;
@@ -94,26 +104,36 @@ public class BugTrackerEventTrigger {
switch (bugTrackerType) {
case GITLABMERGE:
+ if (gitLabService.isScanSubmittedComment()) {
gitLabService.sendMergeComment(scanRequest, SCAN_NOT_SUBMITTED_MESSAGE);
+ }
gitLabService.endBlockMerge(scanRequest);
break;
case GITLABCOMMIT:
+ if (gitLabService.isScanSubmittedComment()) {
gitLabService.sendCommitComment(scanRequest, SCAN_NOT_SUBMITTED_MESSAGE);
+ }
break;
case GITHUBPULL:
+ if (gitService.isScanSubmittedComment()) {
gitService.sendMergeComment(scanRequest, SCAN_NOT_SUBMITTED_MESSAGE);
+ }
String targetURL = cxProperties.getBaseUrl().concat(GitHubService.CX_USER_SCAN_QUEUE);
gitService.errorBlockMerge(scanRequest, targetURL, description);
break;
case BITBUCKETPULL:
+ if (bbService.isScanSubmittedComment()) {
bbService.sendMergeComment(scanRequest, SCAN_NOT_SUBMITTED_MESSAGE);
+ }
break;
case BITBUCKETSERVERPULL:
+ if (bbService.isScanSubmittedComment()) {
bbService.sendServerMergeComment(scanRequest, SCAN_NOT_SUBMITTED_MESSAGE);
+ }
String buildName = "Existing Checkmarx Scan in progress.";
String buildUrl = cxProperties.getBaseUrl().concat(BitBucketService.CX_USER_SCAN_QUEUE);
bbService.setBuildFailedStatus(scanRequest, buildName, buildUrl, description);
