Code linting app + checks API

Hello there,

I am using probot to write a GitHub app that interacts with the checks API. It is basically a wrapper around a code linting tool and should provide feedback on open pull requests similarly to this example in the documentation:

Status checks within a pull request

Ideally the report would only show issues that affect files that are part of the PR, is this already handled by GitHub or does it have to be implemented by the app?

I am a trying to understand the workflow that is required to implement this. For now the code downloads all files that were modified by the PR (retrieved from the API), runs the linter and sends back the check run results. However this does not work when a new PR is created because this does not trigger a check suite event.

I am specifically looking for advice on which files I should run the analysis on and how to access them:

  • Should I download the complete repository (via git clone) every time a check_suite is requested, then send back the results?
  • Should I just analyze the files that were modified by the commit that triggered the check suite?
  • What if multiple commits got pushed at once?
  • When a PR is opened, how does GitHub populate the checks tab?


1 Like

Hi @evqna,

Thank you for being here! Hopefully, someone in the community has some tips specific to your process. As far populating the checks tabs this blog post on checks and integrator workflows might help answer some of your questions.

In any case, I’ve also wanted to share a link to the Probot community, they even have a set office hours every Friday where you can ask questions. 

I hope this helps!


1 Like