name: "Let me lint:fix that for you"

on: [push]

jobs:
  LMLFTFY:
    runs-on: ubuntu-latest
    steps:
      - name: Check out Git repository
        uses: actions/checkout@v4
      - name: Install Linter
        run: |
          npm ci --ignore-scripts
      - name: Fix everything which can be fixed
        run: 'npm run lint:fix'
      - uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a #v4.16.0
        with:
          commit_message: "Auto-fix linting issues"

          # Optional name of the branch the commit should be pushed to
          # Required if Action is used in Workflow listening to the `pull_request` event
          branch: ${{ github.head_ref }}

          # Optional git params
          commit_options: '--signoff'

          # Optional commit user and author settings
          commit_user_name: JuiceShopBot
          commit_user_email: 61591748+JuiceShopBot@users.noreply.github.com
          commit_author: JuiceShopBot <61591748+JuiceShopBot@users.noreply.github.com>
