diff --git a/.github/templates/commit-template.txt b/.github/templates/commit-template.txt new file mode 100644 index 000000000..2af882f75 --- /dev/null +++ b/.github/templates/commit-template.txt @@ -0,0 +1,43 @@ + + +# (): (max 100 chars) +# +# [optional body] +# +# [optional footer(s)] +# +# ───────────────────────────────────────────── +# Conventional Commits – Commit Message Template (Aligned with commitlint) +# ───────────────────────────────────────────── +# +# Header (REQUIRED) +# Format: (): +# - : one of +# feat – A new feature added to the codebase. +# fix – A bug fix or correction to existing functionality. +# docs – Documentation changes only (no code changes). +# style – Code style updates (formatting, spacing, etc.) without changing behavior. +# refactor – Code restructuring without fixing a bug or adding a feature. +# perf – Performance improvements in the code. +# test – Adding or modifying tests without affecting production code. +# chore – Maintenance tasks such as build process updates or dependency changes. +# revert – Reverting a previous commit. +# - : REQUIRED (e.g., ui, api, auth). Use lowercase/kebab if possible. +# - : sentence-case, start-case, or lower-case; max 100 chars; no trailing period. +# +# Body (OPTIONAL) +# - Explain WHAT and WHY (not how). +# - Must be preceded by a blank line (enforced). +# - Wrap lines at ≤200 chars (config limit). +# +# Footer (OPTIONAL) +# - Must be preceded by a blank line (enforced). +# - Link issues: Closes #123, Fixes #456 +# - BREAKING CHANGE: +# +# Examples +# feat(auth): Add OAuth2 login support +# fix(api): Handle 429 rate limit with retry and jitter +# docs(readme): Update Docker troubleshooting section +# refactor(forms): Extract validation helpers from component +# perf(search): Cache results for 5 mins to reduce TTFB \ No newline at end of file diff --git a/README.md b/README.md index aab5697c3..a5e390e57 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,16 @@ docker compose up -d --build **note** Depending on local system architecture the build and launch of the angular server can take up to 60 seconds once the docker build finishes. +## Index + +### Recommended + +- Install git commit template: [Commit Template](docs/commit.template.md). + +### Optional + +- Admin Knowledge Base: [Admin Knowledge Base](docs/admin.knowledge-base.md). + ## Testing the project The project uses jest for unit testing. diff --git a/docs/admin.knowledge-base.md b/docs/admin.knowledge-base.md new file mode 100644 index 000000000..ea541ee06 --- /dev/null +++ b/docs/admin.knowledge-base.md @@ -0,0 +1,9 @@ +# Admin Knowledge Base + +Information on updates that require admin permissions + +## All things GitHub + +### Updating the git template message + +if the shared template changes in `.github/templates/commit-template.txt`, pull the latest changes from `main` and you’ll get the updated version automatically. your local git config will still point to the same file. diff --git a/docs/commit.template.md b/docs/commit.template.md new file mode 100644 index 000000000..f5a591b92 --- /dev/null +++ b/docs/commit.template.md @@ -0,0 +1,50 @@ +## 📝 Enabling the Shared Commit Template + +This project includes a Git commit message template stored at: + +``` +.github/templates/commit-template.txt +``` + +Using a shared template helps us keep commit messages consistent and easy to read. + +--- + +### 1. Set the Template for This Repository + +Run the following command **inside the repository**: + +```bash +git config commit.template .github/templates/commit-template.txt +``` + +This sets the template **only for this repo** (stored in `.git/config`), so it won’t affect your other projects. + +--- + +### 2. Using the Template + +Once configured, running: + +```bash +git commit +``` + +or + +```bash +git commit -a +``` + +will open your editor with the pre-filled template text. +Fill in each section before saving and closing. + +**note** + +This command will by-pass the editor. The message will still need to follow the commitlint standard. + +```bash +git commit -am 'message' +``` + +---