Skip to content

Commit 78283a8

Browse files
committed
feat: Add cocogitto conventional commits check
Check PR commits are compliant, so we can generate changelogs automagically.
1 parent 5691171 commit 78283a8

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/cog.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Run cocogitto in PRs via cocogitto-action runner to support local cog.toml config.
2+
# (which cocogitto-bot seems to not support for some reason?)
3+
name: Cocogitto check
4+
5+
on:
6+
pull_request:
7+
8+
jobs:
9+
cog:
10+
name: "Check conventional commits"
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 2
13+
steps:
14+
- name: "Checkout Repository"
15+
uses: actions/checkout@v6.0.2
16+
with:
17+
fetch-tags: true
18+
fetch-depth: 0
19+
# pick the pr HEAD instead of the merge commit
20+
ref: ${{github.event.pull_request.head.sha}}
21+
- name: Conventional commit check
22+
uses: cocogitto/cocogitto-action@v4.1.0
23+
with:
24+
command: check
25+
args: ${{github.event.pull_request.base.sha}}..${{github.event.pull_request.head.sha}}

cog.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
tag_prefix = "v"
2+
ignore_merge_commits = true
3+
4+
[commit_types]
5+
wip = { changelog_title = "Work in progress", omit_from_changelog = true }
6+
sq = { changelog_title = "Squash me later!", omit_from_changelog = true }

0 commit comments

Comments
 (0)