Skip to content

Support GitHub's annotation output #1116

Description

@koppor

Check for existing issues

  • Completed

Describe the feature

GitHub offers annotations in PRs: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands#setting-an-error-message

Currently, as --output format, JSON and errorformat are supported - see https://vale.sh/docs/templates

I think, following tempalte adds the GitHub format -- could --output github-actions be added?

  {{- range .Files}}{{$p := .Path}}{{range .Alerts}}::{{if eq .Severity "error"}}error{{else if eq .Severity "warning"}}warning{{else}}notice{{end}} file={{$p}},line={{.Line}},col={{index .Span
  0}}::[Vale] {{.Check}}: {{.Message}}
  {{end}}{{end -}}

Note: The idea is from nbbrd/heylogs#544.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions