File Annotations

class git_bot_feedback.FileAnnotation

A structure to describe the output of a file annotation.

end_column

The column number where the annotation ends (1-based).

This is ignored if

  • the [Self::path] is blank

  • the [Self::start_line] is not provided

  • the [Self::end_line] is not greater than [Self::start_line] and [Self::start_column] is provided but is not less than this [Self::end_column]

end_line

The line number where the annotation ends (1-based).

If not provided, the annotation will be placed at the specified [Self::start_line] instead.

This is ignored if

  • [Self::path] is blank.

  • [Self::start_line] is not provided.

  • [Self::end_line] is not greater than [Self::start_line].

message

The message of the annotation, which will be shown in the Git Server’s UI.

This shall not contain any line breaks. Some Git Servers may support a limited set of markdown syntax, but this is not guaranteed.

path

The path to the file being annotated.

This is relative to the repository root. It should not start with a leading slash (not ./). It should only use posix-style path separators (/), even on Windows runners.

On Github, this can be left blank if the annotation is to be specific to the workflow run.

severity

The severity level of the annotation.

start_column

The column number where the annotation starts (1-based).

This is ignored if the [Self::start_line] is not provided, or if [Self::path] is blank.

start_line

The line number where the annotation starts (1-based).

If not provided, the annotation will be scoped to the entire file (and [Self::end_line] will be ignored).

This is ignored if [Self::path] is blank.

title

The title of the annotation, which will be shown in the Git Server’s UI.

class git_bot_feedback.AnnotationLevel

The severity of a [FileAnnotation].

Debug

A debugging annotation.

Notice

A note annotation.

Warning

A warning annotation.

Error

A error annotation.