claude-git-hooks 2.30.2 → 2.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,48 +5,119 @@ Todos los cambios notables en este proyecto se documentarán en este archivo.
5
5
  El formato está basado en [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  y este proyecto adhiere a [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.33.0] - 2026-03-20
9
+
10
+ ### ✨ Added
11
+ - Always-on metrics system for code quality observability (#41) - collects structured JSONL events locally with 90-day retention for trend analysis
12
+ - Team-based reviewer selection via GitHub Teams API (#115, #36) - automatically resolves team members and excludes PR author when selecting reviewers
13
+ - New metrics module (`lib/utils/metrics.js`) with fire-and-forget event recording that never blocks callers
14
+ - Metrics instrumentation for pre-commit analysis, commit message generation, PR creation, judge verdicts, and orchestration batches
15
+ - Documented proven implementation patterns in CLAUDE.md covering testability, git operations, and architecture best practices
16
+
17
+ ### 🔧 Changed
18
+ - Telemetry system now always enabled - removed opt-out toggle for consistent observability
19
+ - Existing telemetry events dual-write to unified metrics system for consolidated analysis
20
+ - PR statistics module now records to both legacy JSONL and new metrics system
21
+ - Judge module switched from telemetry to metrics recording with richer event data including false positives and unresolved issues
22
+
23
+ ### 🗑️ Removed
24
+ - Removed `system.telemetry` configuration option - metrics are now always collected locally
25
+ - Removed telemetry disabled warnings from `batch-info` and `telemetry-cmd` commands
26
+
27
+
28
+ ## [2.32.0] - 2026-03-19
29
+
30
+ ### ✨ Added
31
+ - Team-based reviewer selection using GitHub Teams API for Pull Requests (#36)
32
+ - New `reviewer-selector.js` module for intelligent team member resolution with PR author exclusion
33
+ - Support for `teamSlug` configuration in `config.github.pr` (defaults to 'automation')
34
+ - Support for `excludeReviewers` configuration with remote and local config merging
35
+ - New GitHub API methods: `listRepoTeams()` and `listTeamMembers()` for team resolution
36
+
37
+ ### 🔧 Changed
38
+ - PR reviewer selection now prioritizes GitHub Teams API over CODEOWNERS file
39
+ - Updated `createPullRequest()` to accept `teamReviewers` parameter for team-based review requests
40
+ - Refactored `github-client.js` to focus on config-based fallback reviewers only
41
+ - Enhanced reviewer exclusion logic to merge remote general, remote repo-specific, and local config sources
42
+ - Updated documentation to reflect team-based reviewer workflow in CLAUDE.md and README files
43
+
44
+ ### 🗑️ Removed
45
+ - CODEOWNERS file parsing and resolution logic from reviewer selection workflow
46
+ - Methods `readCodeowners()` and `parseCodeownersReviewers()` from `github-client.js`
47
+
48
+
49
+ ## [2.31.1] - 2026-03-19
50
+
51
+ ### 🔧 Changed
52
+ - Migrated authorization config repository from `claude-hooks-config` to `git-hooks-config` as the definitive source for permissions and labels
53
+ - Centralized existing permissions and labels configuration in the definitive repository
54
+ - Updated documentation in CLAUDE.md to reference the new `git-hooks-config` repository and document team-wide remote config pattern
55
+
56
+
57
+ ## [2.31.0] - 2026-03-19
58
+
59
+ ### ✨ Added
60
+
61
+ - Remote config fetcher (`remote-config.js`) for centralized configuration from `git-hooks-config` repository with in-memory caching and graceful degradation
62
+ - Label resolver (`label-resolver.js`) with 5-rule engine for automatic PR label resolution: preset, size (`size:S/M/L/XL`), quality (`breaking-change`, `security`, `performance`), merge strategy, and default labels
63
+ - Automatic label resolution in `create-pr` command with remote config priority and local fallback support
64
+ - Configurable size thresholds for PR size labels via remote config
65
+
66
+ ### 🔧 Changed
67
+
68
+ - Updated `close-release` command to use the new label resolver instead of hardcoded merge strategy label
69
+ - Refactored `create-pr` label handling to use dependency injection pattern for local fallback rules
70
+ - Documentation updates in CLAUDE.md, README.md, and README-NPM.md describing the new label resolution system
71
+
72
+ ### 🐛 Fixed
73
+
74
+ - Removed duplicate `authorization.js` entry in CLAUDE.md directory structure (#112)
75
+
8
76
  ## [2.30.2] - 2026-03-18
9
77
 
10
78
  ### 🔧 Changed
79
+
11
80
  - Authorization now uses GitHub's `role_name` field instead of legacy `permission` field for more accurate role mapping
12
81
  - Improved authorization error messages to show the actual GitHub permission that failed to map
13
82
 
14
83
  ### 🐛 Fixed
15
- - Fixed role mapping to use `write` instead of `push` to match GitHub's current API role names
16
84
 
85
+ - Fixed role mapping to use `write` instead of `push` to match GitHub's current API role names
17
86
 
18
87
  ## [2.30.1] - 2026-03-17
19
88
 
20
89
  ### ✨ Added
90
+
21
91
  - Comprehensive Release Workflow Guide in CLAUDE.md documenting all workflow automation commands (check-coupling, create-release, shadow, revert-feature, close-release, back-merge) with step-by-step lifecycle, command details, and authorization model
22
92
 
23
93
  ### 🔧 Changed
24
- - Increased timeout for AI help commands from 30s to 60s to improve reliability of claude-hooks help queries and issue reporting
25
94
 
95
+ - Increased timeout for AI help commands from 30s to 60s to improve reliability of claude-hooks help queries and issue reporting
26
96
 
27
97
  ## [2.30.0] - 2026-03-17
28
98
 
29
99
  ### ✨ Added
100
+
30
101
  - New `close-release` command for release-candidate finalization (#ISSUE-97) — soft-resets RC onto main, creates a single clean commit with feature list, force-pushes with lease, and creates PR to main with merge-commit strategy label
31
102
  - Support for `--auto-describe` flag to generate release description using Claude AI
32
103
  - Support for `--dry-run` flag to preview close-release actions without executing
33
104
  - Support for `--no-pr` flag to skip PR creation during release closure
34
105
  - New `back-merge` command for post-deploy branch synchronization (#105)
35
106
 
36
-
37
107
  ## [2.29.0] - 2026-03-17
38
108
 
39
109
  ### ✨ Added
110
+
40
111
  - Added `back-merge` command for post-deploy branch synchronization (#96) - automates the release close workflow: tags release, resets shadow to main, merges main into develop, deletes RC branches, and offers to restore reverted features for the next sprint
41
112
  - Added automatic conflict resolution for version files during back-merge (accepts source/main version)
42
113
  - Added CHANGELOG conflict handling during back-merge - stages with conflict markers and prompts user to continue or abort
43
114
  - Added revert follow-up feature that reads revert-log.json and offers to apply revert-the-revert for features removed from the closed RC
44
115
  - Added branch protection detection during back-merge push with helpful PR creation advice
45
116
 
46
-
47
117
  ## [2.28.0] - 2026-03-17
48
118
 
49
119
  ### ✨ Added
120
+
50
121
  - New `revert-feature` command to revert squash-merged features by task ID in release-candidate branches (#95)
51
122
  - Coupling detection when reverting features - warns if other RC commits share modified files
52
123
  - Revert log tracking at `.claude/revert-log.json` for back-merge workflows
@@ -55,12 +126,13 @@ y este proyecto adhiere a [Semantic Versioning](https://semver.org/spec/v2.0.0.h
55
126
  - New `getCommitFiles()` utility in git-operations for retrieving files changed in a specific commit
56
127
 
57
128
  ### 🐛 Fixed
58
- - Added debug logging for git log failures in revert-feature command to aid troubleshooting
59
129
 
130
+ - Added debug logging for git log failures in revert-feature command to aid troubleshooting
60
131
 
61
132
  ## [2.27.0] - 2026-03-17
62
133
 
63
134
  ### ✨ Added
135
+
64
136
  - New `create-release` command to automate release-candidate branch creation from develop (#94)
65
137
  - Automatic version file discovery and bump during release creation
66
138
  - Git tag creation with skip logic if tag already exists
@@ -71,23 +143,22 @@ y este proyecto adhiere a [Semantic Versioning](https://semver.org/spec/v2.0.0.h
71
143
  - Support for `--update-changelog` flag to generate CHANGELOG entry during release
72
144
  - Comprehensive precondition validation: clean working directory, develop branch check, remote sync verification, existing RC detection
73
145
 
74
-
75
146
  ## [2.26.0] - 2026-03-16
76
147
 
77
148
  ### ✨ Added
78
- - Merge strategy auto-detection in `create-pr` command - automatically detects required merge strategy (squash vs merge commit) from branch naming conventions (feature/* → squash, release-candidate/* → merge-commit, hotfix/* → merge-commit, any → main → merge-commit)
149
+
150
+ - Merge strategy auto-detection in `create-pr` command - automatically detects required merge strategy (squash vs merge commit) from branch naming conventions (feature/_ → squash, release-candidate/_ → merge-commit, hotfix/\* → merge-commit, any → main → merge-commit)
79
151
  - Merge strategy labels (`merge-strategy:squash` or `merge-strategy:merge-commit`) automatically added to created PRs
80
152
  - Merge strategy display in PR preview showing detected strategy before creation
81
153
  - Body reminder prepended to PR description for merge-commit PRs warning about required merge method
82
154
  - Interactive merge strategy selection prompt when branch pattern is unknown or ambiguous
83
155
  - Shadow branch lifecycle management command (`claude-hooks shadow <analyze|reset|sync>`) for managing shadow branches - analyze divergence vs main and active RC, reset shadow to clean copy of main, or sync shadow with source branch (#101)
84
156
 
85
-
86
157
  ## [2.25.0] - 2026-03-16
87
158
 
88
159
  ### ✨ Added
89
- - New `shadow` command to manage the shadow branch lifecycle — analyze divergence vs main and active RC, reset shadow to a clean copy of main, or sync shadow with a source branch (RC, develop, feature)
90
160
 
161
+ - New `shadow` command to manage the shadow branch lifecycle — analyze divergence vs main and active RC, reset shadow to a clean copy of main, or sync shadow with a source branch (RC, develop, feature)
91
162
 
92
163
  ## [2.24.0] - 2026-03-16
93
164