name: Linters permissions: contents: read on: pull_request: branches: - main workflow_dispatch: jobs: jshint: name: Javascript Linter runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Install linters run: | sudo npm install -g --ignore-scripts jshint@2.13.6 eslint@8.57.0 - name: Run jshint run: jshint internal/ui/static/js/*.js - name: Run ESLint run: eslint internal/ui/static/js/*.js golangci: name: Golang Linters runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 with: go-version: stable - uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 - name: Run gofmt linter run: gofmt -d -e . commitlint: if: github.event_name == 'pull_request' name: Commit Linter runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false fetch-depth: 0 - name: Set up Python uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 with: python-version: '3.13' - name: Validate PR commits env: BASE_SHA: ${{ github.event.pull_request.base.sha }} HEAD_SHA: ${{ github.event.pull_request.head.sha }} run: python3 .github/workflows/scripts/commit-checker.py --base "$BASE_SHA" --head "$HEAD_SHA"