Advice on using the 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 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?

Thanks

Hi @evqna,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our community organized so users can more easily find information.

As you’ll notice, your topic is now here in the Project Development Help and Advice board. No action is needed on your part; you can continue the conversation as normal here.

Cheers!