Skip to content

fix: rename SessionStop to Stop for valid Claude Code hook event (GIT-62)#30

Merged
TonyCasey merged 1 commit intomainfrom
git-62
Feb 12, 2026
Merged

fix: rename SessionStop to Stop for valid Claude Code hook event (GIT-62)#30
TonyCasey merged 1 commit intomainfrom
git-62

Conversation

@TonyCasey
Copy link
Copy Markdown
Owner

@TonyCasey TonyCasey commented Feb 12, 2026

Summary

  • Renamed SessionStop to Stop in GIT_MEM_EVENT_TYPES, buildHooksConfig(), and console output
  • SessionStop is not a valid Claude Code hook event name — the correct name is Stop
  • Updated unit tests to match the corrected event name

Closes GIT-62

Test plan

  • All 311 tests pass (npm test)
  • Type-check and lint pass (npm run pre-commit)
  • Verify .claude/settings.json uses Stop after running git-mem init

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Renamed git hook session event identifier from SessionStop to Stop across configuration mappings and logging output.
  • Tests
    • Updated unit tests to align with the event naming changes.

…-62)

SessionStop is not a valid Claude Code hook event name. The correct
name is Stop. This fix ensures the stop hook actually fires.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 12, 2026 22:37
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

The PR renames the session-stop event key from "SessionStop" to "Stop" in the hooks configuration, updating the internal event type constant, hooks config mapping, and corresponding test assertions.

Changes

Cohort / File(s) Summary
Event key rename
src/commands/init-hooks.ts, tests/unit/commands/init-hooks.test.ts
Renamed session-stop event key from SessionStop to Stop across hooks configuration constant and test assertions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: renaming SessionStop to Stop for a valid Claude Code hook event, with clear reference to the issue (GIT-62).
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch git-62

No actionable comments were generated in the recent review. 🎉


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an incorrect Claude Code hook event name by renaming SessionStop to Stop in the Claude Code settings.json hook configuration. According to the PR description, SessionStop is not a valid Claude Code hook event name—the correct name is Stop. This change ensures that the git-mem hooks will be properly recognized by Claude Code.

Changes:

  • Updated GIT_MEM_EVENT_TYPES constant from 'SessionStop' to 'Stop'
  • Updated buildHooksConfig() to use Stop key instead of SessionStop
  • Updated console output to display Stop instead of SessionStop
  • Updated corresponding unit tests to reflect the corrected event name

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/commands/init-hooks.ts Updated constant, buildHooksConfig function, and console output to use correct Claude Code hook event name Stop
tests/unit/commands/init-hooks.test.ts Updated tests to verify correct handling of Stop event instead of SessionStop

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@TonyCasey TonyCasey merged commit 5c3f526 into main Feb 12, 2026
9 checks passed
@TonyCasey TonyCasey deleted the git-62 branch February 12, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants