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

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?

 

Thanks

1 Reply
Community Manager
Message 2 of 2

Re: Code linting app + checks API

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!

Andrea

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!