Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
edit-3

GitHub Action

Annotate Action

v0.2.0

Annotate Action

edit-3

Annotate Action

Creates annotations from a JSON file

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Annotate Action

uses: yuzutech/[email protected]

Learn more about this action in yuzutech/annotations-action

Choose a version

Annotations Action

GitHub Action badge

This action creates annotations from a JSON file.

In order to use this action, you will need to generate a JSON file using the following format:

[
  {
    file: "path/to/file.js",
    line: 5,
    title: "title for my annotation",
    message: "my message",
    annotation_level: "failure"
  }
]

Inputs

repo-token

Required Token used to interact with the GitHub API.

input

Required Path to a JSON file which contains a list of annotations.

title

Optional Title of the check. Default: "check".

ignore-unauthorized-error

Optional Ignore errors when the provided repo-token does not have write permissions. Default: "false".

ignore-missing-file

Optional Ignore if the file which contains annotations is missing. Default: "true".

Example usage

- name: Annotate
  uses: yuzutech/[email protected]
  with:
    repo-token: "${{ secrets.GITHUB_TOKEN }}"
    title: 'lint'
    input: './annotations.json'