diff --git a/CHANGELOG.md b/CHANGELOG.md index fc02c3c..eb98d02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,9 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -### Changed +## [1.1.0] - 2026-03-08 -- Updated beta banner to v1 stable +### Added + +- Language scopes: ruby, go, javascript, rust +- Workflow scopes: security, changelog, release +- Explicit test cases for all new scopes + +### Fixed + +- Scope validation now matches all scopes documented in DEVELOPMENT.md ## [1.0.0] - 2026-02-20 diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index eb78f69..019fe9e 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -61,10 +61,14 @@ type(scope): description | `ruby` | Ruby tooling, configs, or standards | | `go` | Go tooling, configs, or standards | | `javascript` | JavaScript/TypeScript tooling, configs, or standards | +| `rust` | Rust tooling, configs, or standards | | `container` | Dev-toolchain container image | | `ci` | CI/CD pipeline configuration | | `makefile` | Makefile targets and patterns | | `standards` | DevRail standards documentation | +| `security` | Security tooling and configuration | +| `changelog` | Changelog and release notes | +| `release` | Release process and tagging | diff --git a/README.md b/README.md index 936730f..ca36f14 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ A [pre-commit](https://pre-commit.com/) hook that enforces [Conventional Commits ```yaml repos: - repo: https://github.com/devrail-dev/pre-commit-conventional-commits - rev: v1.0.0 + rev: v1.1.0 hooks: - id: conventional-commits ``` @@ -59,10 +59,17 @@ type(scope): description | `terraform` | Terraform tooling, configs, or standards | | `bash` | Bash tooling, configs, or standards | | `ansible` | Ansible tooling, configs, or standards | +| `ruby` | Ruby tooling, configs, or standards | +| `go` | Go tooling, configs, or standards | +| `javascript` | JavaScript/TypeScript tooling, configs, or standards | +| `rust` | Rust tooling, configs, or standards | | `container` | Dev-toolchain container image | | `ci` | CI/CD pipeline configuration | | `makefile` | Makefile targets and patterns | | `standards` | DevRail standards documentation | +| `security` | Security tooling and configuration | +| `changelog` | Changelog and release notes | +| `release` | Release process and tagging | ### Examples diff --git a/conventional_commits/config.py b/conventional_commits/config.py index 7705799..1afd40e 100644 --- a/conventional_commits/config.py +++ b/conventional_commits/config.py @@ -23,10 +23,17 @@ "terraform", "bash", "ansible", + "ruby", + "go", + "javascript", + "rust", "container", "ci", "makefile", "standards", + "security", + "changelog", + "release", }) # Regex pattern for the conventional commit subject line. diff --git a/tests/test_check.py b/tests/test_check.py index cbc1564..29fe94a 100644 --- a/tests/test_check.py +++ b/tests/test_check.py @@ -68,6 +68,48 @@ def test_test_terraform(self): ) assert is_valid + def test_feat_ruby(self): + is_valid, _ = validate_commit_message( + "feat(ruby): add brakeman security scanner" + ) + assert is_valid + + def test_feat_go(self): + is_valid, _ = validate_commit_message( + "feat(go): add golangci-lint configuration" + ) + assert is_valid + + def test_feat_javascript(self): + is_valid, _ = validate_commit_message( + "feat(javascript): add eslint flat config" + ) + assert is_valid + + def test_feat_rust(self): + is_valid, _ = validate_commit_message( + "feat(rust): add clippy and rustfmt checks" + ) + assert is_valid + + def test_chore_security(self): + is_valid, _ = validate_commit_message( + "chore(security): update gitleaks configuration" + ) + assert is_valid + + def test_docs_changelog(self): + is_valid, _ = validate_commit_message( + "docs(changelog): add v1.1.0 release notes" + ) + assert is_valid + + def test_chore_release(self): + is_valid, _ = validate_commit_message( + "chore(release): tag v1.1.0" + ) + assert is_valid + def test_description_with_numbers(self): is_valid, _ = validate_commit_message( "chore(container): bump python from 3.11 to 3.12" @@ -234,9 +276,16 @@ def test_error_shows_valid_scopes(self): assert "terraform" in error assert "bash" in error assert "ansible" in error + assert "ruby" in error + assert "go" in error + assert "javascript" in error + assert "rust" in error assert "container" in error assert "makefile" in error assert "standards" in error + assert "security" in error + assert "changelog" in error + assert "release" in error def test_error_shows_examples(self): _, error = validate_commit_message("bad message") diff --git a/tests/test_config.py b/tests/test_config.py index 78472cb..651d0da 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -32,10 +32,17 @@ def test_contains_all_required_scopes(self): "terraform", "bash", "ansible", + "ruby", + "go", + "javascript", + "rust", "container", "ci", "makefile", "standards", + "security", + "changelog", + "release", } assert VALID_SCOPES == expected @@ -48,10 +55,17 @@ def test_no_extra_scopes(self): "terraform", "bash", "ansible", + "ruby", + "go", + "javascript", + "rust", "container", "ci", "makefile", "standards", + "security", + "changelog", + "release", } assert VALID_SCOPES - expected == set()