Package io.jenkins.plugins.checks.api
Class ChecksAnnotation.ChecksAnnotationBuilder
- java.lang.Object
-
- io.jenkins.plugins.checks.api.ChecksAnnotation.ChecksAnnotationBuilder
-
- Enclosing class:
- ChecksAnnotation
public static class ChecksAnnotation.ChecksAnnotationBuilder extends Object
Builder forChecksAnnotation
.
-
-
Constructor Summary
Constructors Constructor Description ChecksAnnotationBuilder()
Constructs a builder forChecksAnnotation
.
-
Method Summary
-
-
-
Constructor Detail
-
ChecksAnnotationBuilder
public ChecksAnnotationBuilder()
Constructs a builder forChecksAnnotation
.
-
-
Method Detail
-
withPath
public ChecksAnnotation.ChecksAnnotationBuilder withPath(String path)
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
public ChecksAnnotation.ChecksAnnotationBuilder withLine(int line)
Sets the line of the single line annotation.- Parameters:
line
- the line of code to annotate- Returns:
- this builder
-
withStartLine
public ChecksAnnotation.ChecksAnnotationBuilder withStartLine(Integer startLine)
Sets the start line of annotation.- Parameters:
startLine
- the start line of code to annotate- Returns:
- this builder
-
withEndLine
public ChecksAnnotation.ChecksAnnotationBuilder withEndLine(Integer endLine)
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
public ChecksAnnotation.ChecksAnnotationBuilder withMessage(String message)
Sets a short description of the feedback for the annotation.- Parameters:
message
- a short description- Returns:
- this builder
-
withStartColumn
public ChecksAnnotation.ChecksAnnotationBuilder withStartColumn(Integer startColumn)
Adds start column of the annotation.- Parameters:
startColumn
- the start column of the annotation- Returns:
- this builder
-
withEndColumn
public ChecksAnnotation.ChecksAnnotationBuilder withEndColumn(Integer endColumn)
Adds end column of the annotation.- Parameters:
endColumn
- the end column of the annotation- Returns:
- this builder
-
withTitle
public ChecksAnnotation.ChecksAnnotationBuilder withTitle(String title)
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
public ChecksAnnotation.ChecksAnnotationBuilder withRawDetails(String rawDetails)
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
public ChecksAnnotation build()
Actually builds theChecksAnnotation
.- Returns:
- the built
ChecksAnnotation
-
-