Package io.jenkins.plugins.checks.api
Class ChecksAnnotation.ChecksAnnotationBuilder
java.lang.Object
io.jenkins.plugins.checks.api.ChecksAnnotation.ChecksAnnotationBuilder
- Enclosing class:
- ChecksAnnotation
Builder for
ChecksAnnotation
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Actually builds theChecksAnnotation
.Sets the annotation level, one ofNOTICE
,WARNING
, orFAILURE
.withEndColumn
(Integer endColumn) Adds end column of the annotation.withEndLine
(Integer endLine) Sets the end line of annotation.withLine
(int line) Sets the line of the single line annotation.withMessage
(String message) Sets a short description of the feedback for the annotation.Sets the path of the file to annotate.withRawDetails
(String rawDetails) Adds the details about this annotation.withStartColumn
(Integer startColumn) Adds start column of the annotation.withStartLine
(Integer startLine) Sets the start line of annotation.Adds the title that represents the annotation.
-
Constructor Details
-
ChecksAnnotationBuilder
public ChecksAnnotationBuilder()Constructs a builder forChecksAnnotation
.
-
-
Method Details
-
withPath
Sets the path of the file to annotate.- Parameters:
path
- the relative path of the file to annotation, e.g. src/main/java/io/jenkins/plugins/checks/api/ChecksAnnotation.java- Returns:
- this builder
-
withLine
Sets the line of the single line annotation.- Parameters:
line
- the line of code to annotate- Returns:
- this builder
-
withStartLine
Sets the start line of annotation.- Parameters:
startLine
- the start line of code to annotate- Returns:
- this builder
-
withEndLine
Sets the end line of annotation.- Parameters:
endLine
- the end line of code to annotate- Returns:
- this builder
-
withAnnotationLevel
public ChecksAnnotation.ChecksAnnotationBuilder withAnnotationLevel(ChecksAnnotation.ChecksAnnotationLevel level) Sets the annotation level, one ofNOTICE
,WARNING
, orFAILURE
. The default isWARNING
.- Parameters:
level
- the annotation level- Returns:
- this builder
-
withMessage
Sets a short description of the feedback for the annotation.- Parameters:
message
- a short description- Returns:
- this builder
-
withStartColumn
Adds start column of the annotation.- Parameters:
startColumn
- the start column of the annotation- Returns:
- this builder
-
withEndColumn
Adds end column of the annotation.- Parameters:
endColumn
- the end column of the annotation- Returns:
- this builder
-
withTitle
Adds the title that represents the annotation.Note that for a GitHub check run annotation, the
title
must not exceed 255 characters.- Parameters:
title
- the title of the annotation- Returns:
- this builder
-
withRawDetails
Adds the details about this annotation.Note that for a GitHub check run annotation, the
rawDetails
must not exceed 64 KB.- Parameters:
rawDetails
- the details about this annotation- Returns:
- this builder
-
build
Actually builds theChecksAnnotation
.- Returns:
- the built
ChecksAnnotation
-