diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f483354e..7ecb5c39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -235,6 +235,9 @@ jobs: linter: runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read steps: - uses: actions/checkout@v4 @@ -273,6 +276,33 @@ jobs: - name: Frontend Tests run: bun run test + # Gates merges on a Conventional-Commit PR title. Lives in the linter + # job (a required check) so a bad title blocks the merge, unlike the old + # standalone workflow whose check wasn't required. Skipped on push since + # there's no PR title to validate then. + - name: Conventional PR title + if: github.event_name == 'pull_request' + uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: | + feat + fix + chore + docs + style + refactor + perf + test + build + ci + revert + requireScope: false + subjectPattern: ^(?![A-Z]).+$ + subjectPatternError: | + Subject must not start with uppercase. Use: feat: add checkout, fix(billing): handle retry. + performance-tests: runs-on: ubuntu-latest services: diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml deleted file mode 100644 index b57bf661..00000000 --- a/.github/workflows/pr-title.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: PR title - -on: - pull_request: - types: [opened, edited, synchronize, reopened, ready_for_review] - -jobs: - semantic-pr-title: - name: Conventional PR title - runs-on: ubuntu-latest - permissions: - pull-requests: read - steps: - - name: Validate PR title - uses: amannn/action-semantic-pull-request@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - types: | - feat - fix - chore - docs - style - refactor - perf - test - build - ci - revert - requireScope: false - subjectPattern: ^(?![A-Z]).+$ - subjectPatternError: | - Subject must not start with uppercase. Use: feat: add checkout, fix(billing): handle retry.