Changes
helps automate code review and enforce team agreements.
It validates git diff with simple configuration and the CEL scripting language.
Visit project GH pages site for detail documentation.
commit:
# Commit message format validation. Example - `TEAM-123: fix something`
subject: '(issue): (type)? (title)'
values:
issue:
regexp: TEAM-\d+
check-functions:
- message: use separate PRs for fixes and features
# Function checks parsed commit types
func: 'commits.exists(c, c.type == "fix") && commits.exists(c, c.type == "feat")'
- message: page contains draft flag and will not be shown
# Function checks changed files and its content
func: changes.filter(c,
c.path.endsWith(".md") && c.chunks.exists(ch, ch.content.contains("draft:"))
)
Changes
-------
docs/content/docs/ADR/24.02-output-message.md
- draft page will not be shown
Commits
-------
12341324: test
- type: value must be one of [fix ref feat]
You can use it locally, as a CI step, and in combination with messages posting tools.
See working GitHub actions configuration
Danger and conventional-changelog - both great tools for JS and Ruby community.
Changes
brings advantages for users of other languages:
- yaml/toml configuration familiarity and simplicity
- One tool to rule. Validation and changelog generation use the same message format
- Well-designed configuration and scripting DSL
- Go code maintainability and execution speed
Note
Project has solid API and active maintenance.
Please provide your feedback and ideas in discussions.