Skip to content

Instantly share code, notes, and snippets.

@mehagar
Last active July 2, 2020 14:42
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mehagar/011a260e5c4cd34794128f27d59a008e to your computer and use it in GitHub Desktop.
Save mehagar/011a260e5c4cd34794128f27d59a008e to your computer and use it in GitHub Desktop.
How to use pronto-brakeman as a Github Action
name: Pronto
on: [pull_request]
jobs:
pronto:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- run: |
git fetch --no-tags --prune --depth=10 origin +refs/heads/*:refs/remotes/origin/*
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Install pronto-brakeman
run: |
gem install specific_install
gem specific_install https://github.com/zenom/pronto-brakeman
- name: Setup pronto
run: gem install pronto
- name: Run Pronto
run: PRONTO_PULL_REQUEST_ID="$(jq --raw-output .number "$GITHUB_EVENT_PATH")" PRONTO_GITHUB_ACCESS_TOKEN="${{ github.token }}" pronto run -f github_status github_pr -c origin/${{ github.base_ref }}
@mehagar
Copy link
Author

mehagar commented Jun 21, 2020

This is based on this example from pronto. Because of an open issue with pronto-brakeman, I install a fork of the project which has a fix for it.

@mgrachev
Copy link

As alternative you can use https://github.com/reviewdog/action-brakeman 🐶

@mehagar
Copy link
Author

mehagar commented Jun 25, 2020

As alternative you can use github.com/reviewdog/action-brakeman 🐶

I haven't heard of that project. Looks cool!

@wbotelhos
Copy link

@mgrachev Looks like that Pronto has a couple of gems [1]. Reviewdog can handle all those plugins?

[1] https://github.com/prontolabs/pronto#runners

@mgrachev
Copy link

mgrachev commented Jul 2, 2020

I suppose it supports most of this list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment