Skip to content

Commit

Permalink
docs: update section about GitHub Annotations (#931)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinDFuller committed Dec 21, 2023
1 parent edcd121 commit 05d79cc
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,25 @@ You will also likely need to add the following `.gitattributes` file to ensure t

## Comments and Annotations

Currently, GitHub parses the action's output and creates [annotations](https://github.community/t5/GitHub-Actions/What-are-annotations/td-p/30770).
Currently, GitHub parses the action's output and creates [annotations](https://github.blog/2018-12-14-introducing-check-runs-and-annotations/).

The restrictions of annotations are the following:

1. Currently, they don't support markdown formatting (see the [feature request](https://github.community/t5/GitHub-API-Development-and/Checks-Ability-to-include-Markdown-in-line-annotations/m-p/56704))
2. They aren't shown in the list of comments like it was with [golangci.com](https://golangci.com). If you would like to have comments - please, up-vote [the issue](https://github.com/golangci/golangci-lint-action/issues/5).

To enable annotations, you need to add the `checks' permission to your action.

```yaml annotate
permissions:
# Required: allow read access to the content for analysis.
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read
# Optional: Allow write access to checks to allow the action to annotate code in the PR.
checks: write
```

## Performance

The action was implemented with performance in mind:
Expand Down

0 comments on commit 05d79cc

Please sign in to comment.