Closed ZehMatt closed 1 year ago
Very happy to add this as an option (PRs welcome!), but it does have two downsides:
I also wasn't sure if actions could create annotations when I first wrote this, but it seems it is now possible
I think having it as an alternative option to comments would be great.
I'm going to release this in v0.12 now, as I won't have much time to improve this for a while. PRs to make this feature better are more than welcome!
For future reference, the check-runs
REST API, which is how to use annotations, is documented here: https://docs.github.com/en/rest/checks/runs?apiVersion=2022-11-28#create-a-check-run
Although locally, one must have a GitHub App Installation Token to post annotations, as the fine-grained PAT just doesn't have access to it, it turns out that the GITHUB_TOKEN
in the Action does have access, which is why this works without having to create a whole GitHub App
The comments unfortunately introduce a lot of noise and GitHub has a way to make the reporting a bit better.
Example: https://github.com/golangci/golangci-lint-action#golangci-lint-action
This is achieved with https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md