pediatric-ai-scribe-v3/CONTRIBUTING.md
Daniel 65a5dff9b4 docs: add CONTRIBUTING.md + .gitmessage template for conventional commits
Drops a cheat sheet (CONTRIBUTING.md) in repo root so anyone — you,
future maintainers — has the full commit-prefix table one glance
away. Covers which prefixes trigger a release and which don't.

Also adds .gitmessage that you can optionally wire into git as the
default commit template:

  git config --local commit.template .gitmessage

Opens the cheat sheet in your editor every time you `git commit`
without -m. Remove it with `git config --local --unset commit.template`.

This commit uses `docs:` prefix so it does NOT trigger a release —
proving the auto-version workflow's filter works.
2026-04-14 23:51:09 +02:00

2.6 KiB

Contributing / Release workflow

Commit message format

This repo uses Conventional Commits. The .github/workflows/auto-version.yml workflow reads your commit messages and decides whether to cut a release automatically.

Cheat sheet

Prefix Release type Example
fix: patch (6.1.1 → 6.1.2) fix: correct age parser off-by-one for "4y 11m"
feat: minor (6.1.1 → 6.2.0) feat: add vitals quick-copy button
feat!: (or BREAKING CHANGE: in body) major (6.1.1 → 7.0.0) feat!: require re-login after argon2 migration
docs: no release docs: update mobile build guide
refactor: no release refactor: split audit queue into its own module
chore: no release chore: bump eslint dep
test: no release test: add encounter version-lock test
style: no release style: prettier pass on calculators.js
ci: no release ci: cache node_modules in Actions
build: no release build: add DATA_ENCRYPTION_KEY to .env.example

Only fix:, feat:, and !: / BREAKING CHANGE trigger a version bump and a release. Everything else is committed and pushed but doesn't tag.

Decision tree

Ask yourself:

  1. Did behavior change for the user?
    • No → docs:, refactor:, chore:, test:, style:, ci: (no release)
  2. Yes. Is it a bug fix?
    • Yes → fix: (patch)
  3. New feature or enhancement?
    • Yes → feat: (minor)
  4. Does it break existing behavior (users have to log out, re-configure, migrate data, etc.)?
    • Yes → feat!: or fix!: (major)

Skip the workflow entirely

Append [skip ci] anywhere in the commit message to suppress the auto-version run for that commit (e.g., for emergency one-off fixes you want to batch under a later release).

Manual release (emergency override)

From the Actions tab → Version bump & release → Run workflow → pick patch / minor / major (or type exact version) → Run. Skips commit-message parsing and bumps exactly as requested.

Or locally:

scripts/release.sh 6.1.2 --push

After a release is cut

The tag push (whether from auto-version, manual dispatch, or local script) fires two parallel workflows:

Workflow Output Time
android-release.yml signed pedscribe-X.Y.Z.apk on the GitHub release ~8 min
docker-publish.yml danielonyejesi/pediatric-ai-scribe-v3:X.Y.Z + :latest on Docker Hub ~4 min

Obtanium users, Docker Hub subscribers, and the login page's "Download APK" link all update without further action.