Skip to content

GitHub action to create annotations from a JSON file

License

Notifications You must be signed in to change notification settings

cmsj/annotations-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Repository files navigation

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 (all options from https://docs.github.com/en/free-pro-team@latest/rest/reference/checks#annotations-items are also supported and it's recommended to use them):

[
  {
    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".

commit

Optional Commit SHA to which annotations are published.

Example usage

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

About

GitHub action to create annotations from a JSON file

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%