Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 1

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?