From a5ddea80e7719e40ccbbe56c51b8312f76495f0a Mon Sep 17 00:00:00 2001
From: Max Melchert <maximilian.melchert@stud.hs-bochum.de>
Date: Tue, 18 Feb 2025 23:37:19 +0100
Subject: [PATCH] chore: add pre-commit hooks config

---
 .pre-commit-config.yaml       |  5 ++++
 git-conventional-commits.yaml | 43 +++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 .pre-commit-config.yaml
 create mode 100644 git-conventional-commits.yaml

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..0c80db6
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,5 @@
+repos:
+- repo: https://github.com/qoomon/git-conventional-commits
+  rev: v2.7.2
+  hooks:
+    - id: conventional-commits
diff --git a/git-conventional-commits.yaml b/git-conventional-commits.yaml
new file mode 100644
index 0000000..632987c
--- /dev/null
+++ b/git-conventional-commits.yaml
@@ -0,0 +1,43 @@
+---
+convention:
+  commitTypes:
+  - feat     # Commits, that add or remove a new feature to the API or UI
+  - fix      # Commits, that fix a API or UI bug of a preceded feat commit
+  - refactor # Commits, that rewrite/restructure your code, however do not change any API or UI behaviour
+  - perf     # Commits are special `refactor` commits, that improve performance
+  - style    # Commits, that do not affect the meaning (white-space, formatting, missing semi-colons, etc)
+  - test     # Commits, that add missing tests or correcting existing tests
+  - build    # Commits, that affect build components like build tool, ci pipeline, dependencies, project version, ...
+  - ops      # Commits, that affect operational components like infrastructure, deployment, backup, recovery, ...
+  - docs     # Commits, that affect documentation only 
+  - chore    # Miscellaneous commits e.g. modifying `.gitignore`
+  - merge
+  - revert
+  commitScopes: []
+  releaseTagGlobPattern: v[0-9]*.[0-9]*.[0-9]*
+changelog:
+  commitTypes:
+  - feat
+  - fix
+  - perf
+  - merge
+  includeInvalidCommits: true
+  commitIgnoreRegexPattern: "^WIP "
+  headlines:
+    feat: Features
+    fix: Bug Fixes
+    perf: Performance Improvements
+    merge: Merges
+    breakingChange: BREAKING CHANGES
+
+  ## GitHub
+  # commitUrl: https://github.com/ACCOUNT/REPOSITORY/commit/%commit%
+  # commitRangeUrl: https://github.com/ACCOUNT/REPOSITORY/compare/%from%...%to%?diff=split
+
+  ## GitHub Issues
+  # issueRegexPattern: "#[0-9]+"
+  # issueUrl: https://github.com/ACCOUNT/REPOSITORY/issues/%issue%
+
+  ## Jira Issues
+  # issueRegexPattern: "[A-Z][A-Z0-9]+-[0-9]+"
+  # issueUrl: https://WORKSPACE.atlassian.net/browse/%issue%
-- 
GitLab