diff --git a/.github/workflows/_static-analysis.yml b/.github/workflows/_static-analysis.yml index f14c157b1..9d4a2e2ab 100644 --- a/.github/workflows/_static-analysis.yml +++ b/.github/workflows/_static-analysis.yml @@ -9,6 +9,14 @@ jobs: permissions: pull-requests: read steps: + - name: Enforce PR title length <= 72 + # Don't run for Dependabot PRs + if: ${{ !contains(github.event.pull_request.head.label, 'dependabot') }} + run: | + if [ $(echo "${{ github.event.pull_request.title }}" | wc -c) -gt 72 ]; then + echo "PR title too long. Please keep it under 72 characters." + exit 1 + fi - uses: amannn/action-semantic-pull-request@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}