Closed IsaacMilarky closed 9 months ago
When I get the chance I plan to also do this for repolinter for automatic repo linting. That is something that can be used more broadly though so it might be worth it to host that somewhere separately. Keeping this PR small
Tagging @decause-gov because this pr might be relevant to this issue: https://github.cms.gov/DSAC/ospo/issues/26
Create GitHub Workflow to Run Custom Checks on PR Creation
Problem
Before, linting and other checking wasn't done automatically when a pull-request was created.
Solution
When a pull request is created, a github action is triggered to run a set of checks on the corresponding git branch. The first of which, called
run-pylint
, runs pylint, stores the resulting json in a variable, and passes that variable to some check annotations. This job basically adds pylint annotations to a branch automatically when a PR is opened.NOTE: I have tested this with the
on: push
trigger since It's better to test that way. According to https://github.com/LouisBrunner/checks-action/issues/12 the action should behave the same when used with theon: pull_request
trigger.Result: