Skip to content

Add prefix matching support for hooks#124

Merged
hideack merged 1 commit into
masterfrom
feature/hook-prefix-match
Apr 23, 2026
Merged

Add prefix matching support for hooks#124
hideack merged 1 commit into
masterfrom
feature/hook-prefix-match

Conversation

@hideack
Copy link
Copy Markdown
Owner

@hideack hideack commented Apr 23, 2026

Summary

  • hooks 設定に prefix フィールドを追加し、特定の文字列で始まるメッセージに対してコマンドを発火できるようにした
  • 既存の keyword(完全一致)との AND 条件として動作する
  • keywordprefix を同時指定した場合は両方の条件を満たすメッセージのみ反応する

設定例

hooks:
  - user: hideack
    channel: general
    prefix: "!deploy"
    hook: /path/to/deploy.sh

Test plan

  • npm test 全55件パス
  • prefix が一致した場合にコマンドが返ること
  • prefix が一致しない場合にコマンドが返らないこと

🤖 Generated with Claude Code

Allow hooks to fire when a message starts with a specified string via
a new `prefix` field, in addition to the existing exact-match `keyword` field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@hideack hideack merged commit ac07b7a into master Apr 23, 2026
2 checks passed
@hideack hideack deleted the feature/hook-prefix-match branch April 23, 2026 23:22
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.

1 participant