Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .commitlintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
extends:
- '@commitlint/config-conventional'

rules:
header-max-length: [0, 'always', 100]
39 changes: 0 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,6 @@ permissions:
contents: read

jobs:
commitlint:
runs-on: ubuntu-latest

steps:
- name: Enforce single-commit PRs
if: github.event_name == 'pull_request'
env:
PR_COMMIT_COUNT: ${{ github.event.pull_request.commits }}
run: |
test "$PR_COMMIT_COUNT" -eq 1

- name: Checkout repository
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}

- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: "20"

- name: Validate PR title
if: github.event_name == 'pull_request'
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
printf '%s\n' "$PR_TITLE" |
npx --yes \
--package=@commitlint/cli@21.0.2 \
--package=@commitlint/config-conventional@21.0.2 \
commitlint --verbose --extends @commitlint/config-conventional

- name: Validate last commit
run: |
npx --yes \
--package=@commitlint/cli@21.0.2 \
--package=@commitlint/config-conventional@21.0.2 \
commitlint --last --verbose --extends @commitlint/config-conventional

test:
runs-on: ubuntu-latest

Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Commit checks

on:
push:
branches: [main]
pull_request:
branches: [main]

concurrency:
group: commitlint-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
commitlint:
if: >-
(github.event_name == 'pull_request' && github.event.pull_request.user.login != 'dependabot[bot]')
|| (github.event_name == 'push' && github.event.head_commit.author.name != 'dependabot[bot]')
runs-on: ubuntu-latest

steps:
- name: Enforce single-commit PRs
if: github.event_name == 'pull_request'
env:
PR_COMMIT_COUNT: ${{ github.event.pull_request.commits }}
run: |
test "$PR_COMMIT_COUNT" -eq 1

- name: Checkout repository
uses: actions/checkout@v6
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}

- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: "22"

- name: Install commitlint
run: npm install -D @commitlint/cli @commitlint/config-conventional

- name: Validate PR title
if: github.event_name == 'pull_request'
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
printf '%s\n' "$PR_TITLE" | npx commitlint --verbose

- name: Validate last commit
run: |
npx commitlint --last --verbose
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<p align="center">
<img alt="version 0.1.0" src="https://img.shields.io/badge/version-0.1.0-2f6f5e?style=flat-square">
<img alt="license Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-4a5568?style=flat-square">
<img alt="node &gt;=20" src="https://img.shields.io/badge/node-%3E%3D20-339933?style=flat-square&amp;logo=node.js&amp;logoColor=white">
<img alt="node &gt;=22" src="https://img.shields.io/badge/node-%3E%3D22-339933?style=flat-square&amp;logo=node.js&amp;logoColor=white">
<img alt="python &gt;=3.11" src="https://img.shields.io/badge/python-%3E%3D3.11-3776AB?style=flat-square&amp;logo=python&amp;logoColor=white">
</p>

Expand Down Expand Up @@ -200,7 +200,7 @@ controllers start as TODO adapters.
## Requirements

- Python 3.11+
- Node.js 20+
- Node.js 22+
- An OpenAPI 3.0 or 3.1 YAML/JSON contract
- One of npm, pnpm, Yarn, or Bun for the generated package

Expand Down