Files
xget/.github/workflows/commitlint.yml
T
dependabot[bot] fe26a85a6c ci(deps): bump actions/setup-node from 6 to 7
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 6 to 7.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-20 09:05:09 +00:00

55 lines
1.3 KiB
YAML

name: Commit Lint
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
commitlint:
name: Validate Commit Messages
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' && !startsWith(github.head_ref, 'dependabot/') }}
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: "24"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Lint commit messages
shell: bash
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
FROM="${{ github.event.pull_request.base.sha }}"
TO="${{ github.event.pull_request.head.sha }}"
else
FROM="${{ github.event.before }}"
TO="${{ github.sha }}"
fi
if [[ "$FROM" == "0000000000000000000000000000000000000000" ]]; then
npx commitlint --last --verbose
else
npx commitlint --from "$FROM" --to "$TO" --verbose
fi