2021-09-30 07:44:35 +02:00
|
|
|
name: "Commit Linter"
|
2021-12-13 17:40:24 +01:00
|
|
|
on:
|
2022-11-05 11:04:46 +01:00
|
|
|
pull_request: # By default, a workflow only runs when a pull_request event's activity type is opened, synchronize, or reopened.
|
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
- edited
|
|
|
|
- synchronize
|
|
|
|
- reopened
|
2021-09-30 07:44:35 +02:00
|
|
|
jobs:
|
2022-11-05 11:04:46 +01:00
|
|
|
lint-pr-title:
|
2021-09-30 07:44:35 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2022-11-05 11:04:46 +01:00
|
|
|
HELP_URL: "https://github.com/LunarVim/LunarVim/blob/rolling/CONTRIBUTING.md#commit-messages"
|
|
|
|
COMMITLINT_CONFIG: ${{ format('{0}/.github/workflows/commitlint.config.js', github.workspace) }}
|
|
|
|
GH_REPO: ${{ github.repository }}
|
|
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
|
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
2021-09-30 07:44:35 +02:00
|
|
|
steps:
|
2024-05-28 13:46:11 +02:00
|
|
|
- uses: actions/checkout@v4
|
2022-11-05 11:04:46 +01:00
|
|
|
- name: install commitlint
|
|
|
|
run: |
|
|
|
|
npm install --save-dev @commitlint/cli
|
|
|
|
- name: run commitlint
|
|
|
|
run: |
|
|
|
|
echo "$PR_TITLE" | npx commitlint --verbose --help-url "$HELP_URL" --config "$COMMITLINT_CONFIG"
|