diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5c4187a..eb2c8dd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -6,15 +6,17 @@ on: pull_request: branches: [main] -permissions: read-all +permissions: + contents: read jobs: shellcheck: - if: ${{ github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository }} name: ShellCheck runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + persist-credentials: false - name: Install ShellCheck run: sudo apt-get update && sudo apt-get install -y shellcheck @@ -24,21 +26,23 @@ jobs: shellcheck bin/gtr bin/git-gtr lib/*.sh lib/commands/*.sh adapters/editor/*.sh adapters/ai/*.sh completions: - if: ${{ github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository }} name: Completions runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + persist-credentials: false - name: Verify completion files are up to date run: ./scripts/generate-completions.sh --check test: - if: ${{ github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository }} name: Tests runs-on: ubuntu-latest steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + persist-credentials: false - name: Install BATS run: sudo apt-get update && sudo apt-get install -y bats