Skip to content

Commit

Permalink
Merge pull request #269 from checkmarx-ltd/pr-logginggitissue
Browse files Browse the repository at this point in the history
Adding Git API exception
  • Loading branch information
satyamchaurasiapersistent authored Sep 21, 2022
2 parents f264610 + b392fac commit dfcddf0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<artifactId>cx-spring-boot-sdk</artifactId>


<version>0.5.28</version>
<version>0.5.29</version>


<name>cx-spring-boot-sdk</name>
Expand Down
20 changes: 12 additions & 8 deletions src/main/java/com/checkmarx/sdk/utils/CxRepoFileHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,18 @@ else if (gitURL.contains("@bitbucket.org")) {
log.info("credentialsProvider without password");
}
log.info("Cloning code locally to {}", pathFile);
Git.cloneRepository()
.setURI(gitURL)
.setBranch(branch)
.setBranchesToClone(Collections.singleton(branch))
.setDirectory(pathFile)
.setCredentialsProvider(credentialsProvider)
.call()
.close();
try {
Git.cloneRepository()
.setURI(gitURL)
.setBranch(branch)
.setBranchesToClone(Collections.singleton(branch))
.setDirectory(pathFile)
.setCredentialsProvider(credentialsProvider)
.call()
.close();
} catch (GitAPIException e) {
log.error("API Exception : ",e);
}
}

private void runPostCloneScript(CxScanParams params, String path) {
Expand Down

0 comments on commit dfcddf0

Please sign in to comment.