docs: update section about GitHub Annotations (#931)

This commit is contained in:
Justin Fuller 2023-12-21 11:04:32 -05:00 committed by GitHub
parent edcd1211b8
commit 05d79cc0e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: