Interface Annotation

  • All Known Implementing Classes:
    ImmutableAnnotation

    @Immutable
    public interface Annotation
    The Annotation object.

    Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the Checks and Files changed tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the Update a check run endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "About status checks". See the annotations object description for details about how to use this parameter.

    See Also:
    "https://developer.github.com/v3/checks/runs/#annotations-object"
    • Method Detail

      • path

        String path()
        The path of the file to add an annotation to. For example, assets/css/main.css.
        Returns:
        the string
      • blobHref

        Optional<String> blobHref()
        Blob href optional.
        Returns:
        the optional
      • annotationLevel

        AnnotationLevel annotationLevel()
        Annotation level. Can be one of notice, warning, or failure.
        Returns:
        the annotation level
      • message

        String message()
        A short description of the feedback for these lines of code. The maximum size is 64 KB.
        Returns:
        the string
      • title

        Optional<String> title()
        The title that represents the annotation. The maximum size is 255 characters.
        Returns:
        the optional
      • rawDetails

        Optional<String> rawDetails()
        Details about this annotation. The maximum size is 64 KB.
        Returns:
        the optional string
      • startLine

        int startLine()
        The start line of the annotation.
        Returns:
        the int
      • endLine

        int endLine()
        The end line of the annotation.
        Returns:
        the int
      • startColumn

        Optional<Integer> startColumn()
        Start column optional.
        Returns:
        the optional
      • endColumn

        Optional<Integer> endColumn()
        End column optional.
        Returns:
        the optional