Recently, I was going through a repo I contribute to in order to convert files to use Flow type checking, when I had the idea to create a GitHub action to comment on PRs the difference in flow coverage on the files touched by the PR. I would love if this was useful to someone, and I appreciate any and all feedback!
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (1)
Preview:
Github action to compare flow coverage on a PR to the base branch.
Flow Coverage Compare
Github action to compare flow coverage on a PR to the base branch.
Running this action will create a comment like this on your pull request
Usage
You'll want to add this job to one of your workflow files. Below are examples of sample workflow files using this action. Additionally, in order to use this action, you'll want to ensure you can run flow like
yarn run flowornpm run flowin your repository.Action inputs
The possible inputs for this action are:
github-tokenGITHUB_TOKENpackage-manageryarnornpmyarnpath.flowconfig(which should be the same as the path to yourpackage.json)pattern^.*.js$threshold