Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
50 changes: 50 additions & 0 deletions .gitlint
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Gitlint configuration for CI Framework
# Enforces Conventional Commits specification
# See: https://www.conventionalcommits.org/

[general]
# Ignore merge commits, fixup commits, squash commits, and revert commits
ignore=merge,fixup,squash,revert

# Enable all default rules
contrib=contrib-title-conventional-commits,contrib-body-requires-signed-off-by

# Set the extra-path to allow for additional user-defined rules
# We enforce CI-FMW specific rules there
extra-path=gitlint_rules

[title-must-not-contain-word]
# Don't allow these words in titles
words=WIP,wip

[title-match-regex]
# Enforce conventional commits format: type(scope): description
# Examples: feat(auth): add login, fix: resolve bug, docs: update readme
regex=^(build|ci|docs|feat|fix|perf|refactor|style|test|chore|revert|deprecate)(\(.+\))?(!)?: .{1,50}$

[body-max-line-length]
line-length=100

[body-min-length]
min-length=0

# Conventional commits plugin configuration
[contrib-title-conventional-commits]
# List of conventional commit types we allow
types=build,ci,docs,feat,fix,perf,refactor,style,test,chore,revert,deprecate

# Optional scopes (if not specified, any scope is allowed)
# scopes=api,cli,core,docs,tests,ci

# Breaking changes
# We allow ! at the end of type to indicate breaking changes
# Examples: feat!: breaking change, fix(auth)!: breaking auth fix

# CI Framework custom deprecation rules configuration
[CIFMW-CR1]
# Minimum weeks between deprecation notice and removal (default: 12)
min-deprecation-weeks=12

[CIFMW-C1]
# CI Framework deprecation compliance violations
# This rule is automatically triggered by CIFMW-CR1 when issues are found
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,13 @@ repos:
hooks:
- id: ansible-lint
additional_dependencies:
- ansible-core==2.15.13
- netaddr
- jmespath

# Conventional commits validation using gitlint (mature Python solution)
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
- id: gitlint
stages: [commit-msg]
Loading