The main reason for this change is that Pronto doesn't run in pull requests opened by external contributors, and we haven't found how to fix this issue. Another reason is that Pronto only detects issues in the lines where the changes are done, but sometimes we introduce issues related to other lines and those aren't detected by Pronto. Also, when adding or changing Rubocop rules, or when we update Rubocop, Pronto doesn't check whether those rules are applied in every Ruby and ERB file, and we sometimes forget to do so (particularly in ERB files). So, from now, the linters will check all the code in every pull request. Note we're now excluding the `vendor` folder in our linters because the `setup-ruby` action actions generates a `vendor/bundle/` folder with all our gem dependencies, and we don't want to check those files.
26 lines
934 B
YAML
26 lines
934 B
YAML
name: pronto
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
pronto:
|
|
runs-on: ubuntu-latest
|
|
if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name && github.actor != 'dependabot'
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
- run: |
|
|
git fetch --no-tags --prune origin +refs/heads/*:refs/remotes/origin/*
|
|
- name: Setup Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
bundler-cache: true
|
|
- name: Setup NPM
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
cache: "npm"
|
|
node-version-file: ".node-version"
|
|
- name: Install node packages
|
|
run: npm clean-install
|
|
- name: Run pronto
|
|
run: PRONTO_PULL_REQUEST_ID="$(jq --raw-output .number "$GITHUB_EVENT_PATH")" PRONTO_GITHUB_ACCESS_TOKEN="${{ github.token }}" bundle exec pronto run -f github_status github_pr -c origin/${{ github.base_ref }}
|