Skip to content

Commit 05d79cc

Browse files
docs: update section about GitHub Annotations (#931)
1 parent edcd121 commit 05d79cc

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,25 @@ You will also likely need to add the following `.gitattributes` file to ensure t
144144

145145
## Comments and Annotations
146146

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

149149
The restrictions of annotations are the following:
150150

151151
1. Currently, they don't support markdown formatting (see the [feature request](https://gh.loli.gardenmunity/t5/GitHub-API-Development-and/Checks-Ability-to-include-Markdown-in-line-annotations/m-p/56704))
152152
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).
153153

154+
To enable annotations, you need to add the `checks' permission to your action.
155+
156+
```yaml annotate
157+
permissions:
158+
# Required: allow read access to the content for analysis.
159+
contents: read
160+
# Optional: allow read access to pull request. Use with `only-new-issues` option.
161+
pull-requests: read
162+
# Optional: Allow write access to checks to allow the action to annotate code in the PR.
163+
checks: write
164+
```
165+
154166
## Performance
155167
156168
The action was implemented with performance in mind:

0 commit comments

Comments
 (0)