claude-git-hooks 2.68.0 → 2.68.1

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,6 +5,12 @@ 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.68.1] - 2026-06-12
9
+
10
+ ### 🐛 Fixed
11
+ - Fixed gotcha solicitation receiving empty change context during PR creation, causing Claude to return no candidates for every book — the pipeline now attributes source files, commit messages, and modified comments to each changed book (#197)
12
+
13
+
8
14
  ## [2.68.0] - 2026-06-12
9
15
 
10
16
  ### ✨ Added
@@ -22,7 +22,7 @@ import {
22
22
  showWarning,
23
23
  promptConfirmation
24
24
  } from '../utils/interactive-ui.js';
25
- import { getBranchPushStatus, pushBranch, stageFiles, createCommit, getRepoRoot } from '../utils/git-operations.js';
25
+ import { getBranchPushStatus, pushBranch, stageFiles, createCommit, getRepoRoot, getCommitsBetweenRefs } from '../utils/git-operations.js';
26
26
  import logger from '../utils/logger.js';
27
27
  import { libraryModuleUrl } from '../utils/library-resolver.js';
28
28
  import { resolveLabels } from '../utils/label-resolver.js';
@@ -468,7 +468,25 @@ export async function runCreatePr(args) {
468
468
  showInfo('Running Library maintenance pipeline...');
469
469
  const { createPrPipeline } = await import(libraryModuleUrl('librarian/index.js'));
470
470
 
471
- const pipelineSummary = await createPrPipeline({ repoRoot: root });
471
+ // Gather change context for gotcha solicitation. Without this the
472
+ // generator gets empty changedFiles + no commit context and Claude
473
+ // returns no candidate for every book. Best-effort — git failures
474
+ // here must never block PR creation.
475
+ let pipelineCommitSha = '';
476
+ let pipelineCommitMessages = [];
477
+ try {
478
+ pipelineCommitSha = execSync('git rev-parse HEAD', { encoding: 'utf8' }).trim();
479
+ } catch { /* commitSha only keys the gotcha cache — non-fatal */ }
480
+ try {
481
+ const log = getCommitsBetweenRefs(baseBranch, 'HEAD', { format: '%s' });
482
+ pipelineCommitMessages = log.split(/\r?\n/).map(l => l.trim()).filter(Boolean);
483
+ } catch { /* commit messages are optional gotcha context — non-fatal */ }
484
+
485
+ const pipelineSummary = await createPrPipeline({
486
+ repoRoot: root,
487
+ commitSha: pipelineCommitSha,
488
+ commitMessages: pipelineCommitMessages,
489
+ });
472
490
  const {
473
491
  modifiedFiles: libraryFiles,
474
492
  perStep,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-git-hooks",
3
- "version": "2.68.0",
3
+ "version": "2.68.1",
4
4
  "description": "Git hooks with Claude CLI for code analysis and automatic commit messages",
5
5
  "type": "module",
6
6
  "bin": {