name: Frontend verify # Metadata-only: refreshes only the `commits` context after a PR title edit. # Same workflow name keeps the required context; `security` and `verify` # statuses of the head revision stay untouched (no skipped overwrite). on: pull_request: types: [edited] concurrency: group: frontend-pr-title-${{ gitea.event.pull_request.number }} cancel-in-progress: true jobs: commits: timeout-minutes: 15 runs-on: ubuntu-latest steps: - uses: https://github.com/actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 - uses: https://github.com/actions/setup-node@v4 with: node-version-file: .nvmrc - run: npm ci --ignore-scripts - name: Check PR title and commits env: PR_TITLE: ${{ github.event.pull_request.title }} BASE_SHA: ${{ github.event.pull_request.base.sha }} HEAD_SHA: ${{ github.event.pull_request.head.sha }} run: | printf '%s\n' "$PR_TITLE" | npm run commitlint -- --strict npm run commitlint -- --strict --from "$BASE_SHA" --to "$HEAD_SHA"