diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e76154a..cf74189 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,7 +1,7 @@ --- name: Lint -on: [push, pull_request] +on: pull_request permissions: read-all @@ -14,6 +14,11 @@ jobs: # Checks out a copy of your repository on the ubuntu-latest machine - name: Checkout code uses: actions/checkout@v4 + with: + # Make sure the actual branch is checked out when running on PR + ref: ${{ github.event.pull_request.head.sha }} + # Full git history needed to get proper list of changed files + fetch-depth: 0 # Runs the Super-Linter action - name: Run Super-Linter on new changes