---
name: Rubocop
on: workflow_call
env:
   REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.CREW_PR_TOKEN }}
   GH_TOKEN: ${{ secrets.CREW_PR_TOKEN }}
jobs:
  rubocop:
    runs-on: ubuntu-24.04
    permissions:
      contents: read
      pull-requests: write
    steps:
       - uses: actions/checkout@v5
       - uses: ruby/setup-ruby@v1
         with:
            ruby-version: '4.0.0'
       - name: Rubocop
         uses: reviewdog/action-rubocop@v2
         with:
            fail_level: any
            filter_mode: nofilter
            only_changed: true
            reporter: github-pr-review
            rubocop_extensions: rubocop-chromebrew
