Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.

Commit

Permalink
Giving access to the commentOnlyChangedContentContext parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurelian Teglas committed Jul 5, 2021
1 parent 4d1893c commit ffd1d81
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ task violationCommentsToGitLab(type: se.bjurr.violations.comments.gitlab.plugin.
projectId = System.properties['GITLAB_PROJECTID'];
commentOnlyChangedContent = true;
commentOnlyChangedContentContext = 0;
createCommentWithAllSingleFileComments = true;
createSingleFileComments = true;
keepOldComments = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class ViolationCommentsToGitLabTask extends DefaultTask {

private List<List<String>> violations = new ArrayList<>();
private boolean commentOnlyChangedContent = true;
private int commentOnlyChangedContentContext = 0;
private boolean commentOnlyChangedFiles = true;
private boolean createCommentWithAllSingleFileComments = true;
private boolean createSingleFileComments = true;
Expand Down Expand Up @@ -54,6 +55,10 @@ public void setCommentOnlyChangedContent(final boolean commentOnlyChangedContent
this.commentOnlyChangedContent = commentOnlyChangedContent;
}

public void setCommentOnlyChangedContentContext(final int commentOnlyChangedContentContext) {
this.commentOnlyChangedContentContext = commentOnlyChangedContentContext;
}

public void setCreateCommentWithAllSingleFileComments(
final boolean createCommentWithAllSingleFileComments) {
this.createCommentWithAllSingleFileComments = createCommentWithAllSingleFileComments;
Expand Down Expand Up @@ -195,6 +200,7 @@ public void log(final Level level, final String string, final Throwable t) {
.setApiToken(this.apiToken)
.setTokenType(tokenType)
.setCommentOnlyChangedContent(this.commentOnlyChangedContent) //
.setCommentOnlyChangedContentContext(this.commentOnlyChangedContentContext) //
.withShouldCommentOnlyChangedFiles(this.commentOnlyChangedFiles) //
.setCreateCommentWithAllSingleFileComments(
this.createCommentWithAllSingleFileComments) //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ task violationCommentsToGitLab(type: se.bjurr.violations.comments.gitlab.plugin.
projectId = System.properties['GITLAB_PROJECTID'];

commentOnlyChangedContent = true;
commentOnlyChangedContentContext = 0;
createCommentWithAllSingleFileComments = true;
createSingleFileComments = true;
keepOldComments = false;
Expand Down

0 comments on commit ffd1d81

Please sign in to comment.