annotate-pull-request-from-checkstyle
annotate-pull-request-from-checkstyle copied to clipboard
New feature: Option to output annotations to the github http API, rather than standard output
This would allow this to be run from anywhere on the internet, instead of just Github Actions. Github repo details and an access token would have to be passed in as options or environment variables.
HTTP API is documented at https://developer.github.com/v3/checks/runs/#update-a-check-run . It's currently in a 'preview period', so has no backward compatibility gurantee.
Could you desribe in more detail your concret use-case when this would be helpful?
How would you use cs2pr for that?
We're running php-cs-fixer, psalm etc in AWS CodeBuild, which runs for every commit to a github repository. It would be useful to be able to see the output from these tools as annotations on the PR.
We could do that now by running the tools in a Github Action instead of CodeBuild, but we might be able to get the same benefit with less change by connecting to the HTTP API.
I might be up for implementing this. Don't know if it's a feature you'd want in this tool, or if it would be better as a separate tool.
Sounds interessting.
If you can get it implemented in a reasonable amount of code - why not.