Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature: Option to output annotations to the github http API, rather than standard output #47

Open
bdsl opened this issue Jul 1, 2020 · 3 comments

Comments

@bdsl
Copy link

bdsl commented Jul 1, 2020

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.

@staabm
Copy link
Owner

staabm commented Jul 1, 2020

Could you desribe in more detail your concret use-case when this would be helpful?

How would you use cs2pr for that?

@bdsl
Copy link
Author

bdsl commented Jul 1, 2020

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.

@bdsl bdsl changed the title New feature: Option to output checks to the github http API, rather than standard output New feature: Option to output annotations to the github http API, rather than standard output Jul 1, 2020
@staabm
Copy link
Owner

staabm commented Jul 1, 2020

Sounds interessting.

If you can get it implemented in a reasonable amount of code - why not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants