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
30 changes: 30 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,33 @@ jobs:

---
© 2026 Dr. Sohil Momin (drsamonline) — MIT license, attribution required.

# ---------------------------------------------------------------------------
# Conventional commits — advisory, pull requests only.
#
# Checks the commits the PR adds against the types in `cog.toml`, never the
# history: 52 of the 82 commits written before this gate used a type outside
# the standard set (`licence:`, `sweep:`, title-cased subjects), and a gate
# that relitigates them would be red on arrival and ignored thereafter.
# Promote to blocking once a few PRs have passed through it clean.
# ---------------------------------------------------------------------------
commits:
name: Conventional commits
if: github.event_name == 'pull_request'
continue-on-error: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # was @v4
with:
fetch-depth: 0

- name: Install cocogitto 7.0.0
run: |
curl -fsSL -o cog.tar.gz \
https://github.com/cocogitto/cocogitto/releases/download/7.0.0/cocogitto-7.0.0-x86_64-unknown-linux-musl.tar.gz
tar -xzf cog.tar.gz
sudo install -m 0755 "$(find . -maxdepth 2 -type f -name cog | head -1)" /usr/local/bin/cog
cog --version

- name: cog check (PR commits only)
run: cog check "${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}"
5 changes: 4 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ cargo clippy --all-targets -- -D warnings
4. Watermark every new file (see ground rule 2).
5. Ensure your commit tree contains **no** `target/`, logs, or OS junk
(`.gitignore` covers these — don't weaken it).
6. Open the PR against `main`; CI runs automatically. Maintainer review required.
6. Write conventional commit subjects (`feat:`, `fix:`, `docs:`, `ci:`, …; the
full list is in `cog.toml`). The `Conventional commits` job checks the
commits your PR adds — `cog check main..HEAD` reproduces it locally.
7. Open the PR against `main`; CI runs automatically. Maintainer review required.

## Reporting issues

Expand Down
29 changes: 29 additions & 0 deletions cog.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# =============================================================================
# CLDR — cocogitto configuration (conventional commits)
# © 2026 Dr. Sohil Momin (drsamonline). MIT-licensed — retain this notice.
# =============================================================================
#
# `cog check` runs on every pull request over the commits the PR adds (see the
# `commits` job in .github/workflows/build-release.yml). The type list is this
# repo's own: `licence` and `sweep` are used throughout the history, and
# `release` marks a version bump, so all three are declared here rather than
# being reported as violations.
#
# Local use: cog check main..HEAD
ignore_merge_commits = true

[commit_types]
feat = { changelog_title = "Features" }
fix = { changelog_title = "Fixes" }
docs = { changelog_title = "Documentation" }
build = { changelog_title = "Build" }
ci = { changelog_title = "CI" }
release = { changelog_title = "Releases" }
chore = { changelog_title = "Chores", omit_from_changelog = true }
licence = { changelog_title = "Licence", omit_from_changelog = true }
sweep = { changelog_title = "Sweeps", omit_from_changelog = true }
refactor = { changelog_title = "Refactoring", omit_from_changelog = true }
test = { changelog_title = "Tests", omit_from_changelog = true }
perf = { changelog_title = "Performance" }
style = { changelog_title = "Style", omit_from_changelog = true }
revert = { changelog_title = "Reverts", omit_from_changelog = true }
Loading