Skip to content

Commit

Permalink
maxNumberOfComments
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasbjerre committed Mar 31, 2019
1 parent 820725e commit e72ec2d
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apply from: project.buildscript.classLoader.getResource('release.gradle').toURI(


dependencies {
compile 'se.bjurr.violations:violation-comments-lib:1.89'
compile 'se.bjurr.violations:violation-comments-lib:1.92'
compile 'org.gitlab4j:gitlab4j-api:4.9.18'
testCompile 'junit:junit:4.12'
testCompile 'org.assertj:assertj-core:2.3.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,14 @@ public boolean shouldKeepOldComments() {
public Optional<String> findCommentTemplate() {
return api.findCommentTemplate();
}

@Override
public Integer getMaxNumberOfComments() {
return api.getMaxNumberOfComments();
}

@Override
public Integer getMaxCommentSize() {
return api.getMaxCommentSize();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public void log(final Level level, final String string, final Throwable t) {
private String proxyServer;
private String proxyUser;
private String proxyPassword;
private int maxNumberOfComments;
private Integer maxCommentSize;

public ViolationCommentsToGitLabApi setViolationsLogger(final ViolationsLogger violationsLogger) {
this.violationsLogger = violationsLogger;
Expand Down Expand Up @@ -247,4 +249,22 @@ private String emptyToNull(final String str) {
}
return str.trim();
}

public ViolationCommentsToGitLabApi setMaxCommentSize(final Integer maxCommentSize) {
this.maxCommentSize = maxCommentSize;
return this;
}

public ViolationCommentsToGitLabApi setMaxNumberOfComments(final int maxNumberOfComments) {
this.maxNumberOfComments = maxNumberOfComments;
return this;
}

public int getMaxNumberOfComments() {
return maxNumberOfComments;
}

public Integer getMaxCommentSize() {
return maxCommentSize;
}
}

0 comments on commit e72ec2d

Please sign in to comment.