Skip to content

Commit 2aeefa4

Browse files
authored
feat: add org-level commit-check.toml and dogfooding workflow (#19)
1 parent 570a4bb commit 2aeefa4

2 files changed

Lines changed: 59 additions & 0 deletions

File tree

.github/workflows/commit-check.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Commit Check
2+
3+
on:
4+
pull_request:
5+
branches: 'main'
6+
types: [opened, synchronize, reopened, edited]
7+
workflow_dispatch:
8+
9+
jobs:
10+
commit-check:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
pull-requests: write
15+
steps:
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v7.0.0
17+
with:
18+
fetch-depth: 0 # Required for merge-base checks
19+
- uses: commit-check/commit-check-action@v2.10.0
20+
with:
21+
message: true
22+
branch: true
23+
job-summary: true
24+
pr-comments: true
25+
pr-title: true

commit-check.toml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# ============================================================================
2+
# commit-check — org-level base configuration
3+
#
4+
# Repos within the commit-check org can inherit this config by placing the
5+
# following directive at the top of their own commit-check.toml:
6+
#
7+
# inherit_from = "github:commit-check/.github:commit-check.toml"
8+
#
9+
# Local settings override the inherited values (shallow merge per section).
10+
# See https://github.com/commit-check/commit-check for full documentation.
11+
# ============================================================================
12+
13+
[commit]
14+
# https://www.conventionalcommits.org
15+
conventional_commits = true
16+
subject_capitalized = false
17+
subject_imperative = true
18+
subject_max_length = 100
19+
subject_min_length = 5
20+
allow_commit_types = ["feat", "fix", "docs", "style", "refactor", "test", "chore", "ci"]
21+
allow_merge_commits = true
22+
allow_revert_commits = true
23+
allow_empty_commits = false
24+
allow_fixup_commits = true
25+
allow_wip_commits = false
26+
require_body = false
27+
require_signed_off_by = false
28+
ignore_authors = ["dependabot[bot]", "copilot[bot]", "pre-commit-ci[bot]", "coderabbitai[bot]"]
29+
30+
[branch]
31+
# https://conventional-branch.github.io/
32+
conventional_branch = true
33+
allow_branch_types = ["feature", "bugfix", "hotfix", "release", "chore", "feat", "fix", "ai", "claude", "codex", "copilot", "cursor"]
34+
ignore_authors = ["dependabot[bot]", "copilot[bot]", "pre-commit-ci[bot]", "shenxianpeng"]

0 commit comments

Comments
 (0)