From bc1904f0c946172fc1821908fc41649db49f0334 Mon Sep 17 00:00:00 2001 From: Justin Fuller Date: Thu, 21 Dec 2023 09:40:42 -0500 Subject: [PATCH] Update README.md Annotations seem to require permissions now --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b9d0b56a89..d99df223b6 100644 --- a/README.md +++ b/README.md @@ -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: