prontolabs / pronto

Quick automated code review of your changes
MIT License
2.6k stars 245 forks source link

[Enhancement] Support the GitHub Checks API #294

Open zhuravel opened 6 years ago

zhuravel commented 6 years ago

Learn more about Checks: https://developer.github.com/changes/2018-05-07-new-checks-api-public-beta/ https://help.github.com/articles/about-status-checks/#checks https://developer.github.com/v3/checks/

checks_annotation

mknapik commented 6 years ago

IMO looks very promising! I only wonder if we should wait until it leaves the beta or assume the API won't change that much and jump into implementation.

kevinjalbert commented 6 years ago

Looks like its also only for GitHub Apps at this point.

The Checks API is only available to GitHub Apps through a new granular permission: checks.

Correct me if I'm wrong, but pronto still runs using an Access Token? Thus not really qualified as a GitHub App.

aergonaut commented 5 years ago

If there were a Checks API formatter, then that could use App credentials instead of Access Tokens. I would not see Checks API replacing the existing GitHub-oriented formatters, just providing an alternative.

aergonaut commented 5 years ago

This also makes me think we should make the formatters pluggable like the runners are. That way the community could provide a Checks API formatter without needing to have it merged to the main gem.

blackjid commented 5 years ago

https://github.com/haya14busa/reviewdog is a similar project that has checks API support. They have a server that receives the comments from the linter and the server communicates with the githubs Checks API.

Maybe this is a good approach. A simple server that anyone can run in a small heroku instance.

jbielick commented 4 years ago

Pluggable formatters is a really good idea.

In lieu of that, we set up a GitHub Action to run Pronto (ruby runners) and post results to the Checks API. The CheckRun API seems pretty stable. Hope this is helpful to someone!

Is there any interest in this supporting other languages or runners?

jbielick commented 4 years ago

Here's a crack at a GitHub Check Run formatter

jbielick commented 4 years ago

FYI we made a Github Action for running pronto with a Check Run formatter to handle this. Github Actions are given an App token so it was a good fit.

ibrahima commented 2 weeks ago

@jbielick that looks great! I wonder if it could be upstreamed into pronto, or if there's some reason why it wouldn't work? I figure at least the formatter could be upstreamed right? I think that would make it easier to install arbitrary linters rather than having a fixed set of dependencies, in the way that the GitHub Actions Integration document describes. Curious to hear your thoughts, thanks!