Repository navigation
fix(omp-hooks): inGitRepo bail-early, accept type!(scope): form, echo subject - #157
Merged
Merged
Conversation
…subject Fixes #147. Fixes #151. Three improvements to extensions/omp-hooks.ts: 1. inGitRepo(cwd) bail-early (#147): the tool_call handler now runs a cheap `git rev-parse --git-dir` with stdio:ignore before any branch query. If the session root is not a git repo, all git guards exit immediately — no more `fatal: not a git repository` stderr spam on every command outside a repo. 2. Accept type!(scope): form (#151): CONVENTIONAL_RE now matches the bang on either side of the optional scope group: /^(...)!?(?:\([^)]+\))?!?:\s.+/ `refactor!(config): ...` was previously hard-blocked; it now passes. `refactor(config)!: ...` and `refactor: ...` still pass unchanged. 3. Echo the rejected subject (#151): the blocked reason now includes the actual subject line so the author can see what was rejected without guessing. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 25, 2026
## [2.88.11](v2.88.10...v2.88.11) (2026-10-25) ### Bug Fixes * **guard:** resolve git branch per command target, not process cwd ([#154](#154)) ([07c7498](07c7498)) * **lockfile:** add missing slash in skill path + self-contained resolve_repo_root ([#156](#156)) ([04bda15](04bda15)) * **omp-hooks:** inGitRepo bail-early, accept type!(scope) form, echo subject ([#157](#157)) ([9e1b11a](9e1b11a)), closes [#147](#147) [#151](#151) [#151](#151) ### Performance Improvements * **sync:** render all skills in one bash process per adapter ([#155](#155)) ([1b56463](1b56463)), closes [#137](#137)
|
🎉 This PR is included in version 2.88.11 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #147. Fixes #151.
Changes
1.
inGitRepo(cwd)bail-early — fixes #147The
tool_callhandler now callsgit rev-parse --git-dirwithstdio: "ignore"before any other git work. If the session root is not a git repo, the handler returns immediately — no morefatal: not a git repositorystderr spam on every command when working outside a git repo.Credit: approach proposed by @ak-a-ra in #147.
2. Accept
type!(scope):breaking form — fixes #151CONVENTIONAL_REwas written for the spec-canonicaltype(scope)!:form. Many real-world repos usetype!(scope):instead. The updated regex accepts the bang on either side of the optional scope:3. Echo the rejected subject — fixes #151
The blocked message now includes the actual first line of the commit message so the author can see what was rejected:
Credit: analysis and proposed fix by @barbarum in #151.
🤖 Generated with Claude Code