---
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@v4
      - uses: ruby/setup-ruby@v1
        with:
           ruby-version: '3.4'
      - name: Rubocop
        uses: reviewdog/action-rubocop@v2
        with:
           fail_on_error: true
           filter_mode: nofilter
           only_changed: true
           reporter: github-pr-review
           rubocop_extensions: rubocop-chromebrew
