feat: implement Claude Code GitHub Action v1.0 with auto-detection and slash commands

Major features:
- Mode auto-detection based on GitHub event type
- Unified prompt field replacing override_prompt and direct_prompt
- Slash command system with pre-built commands
- Full backward compatibility with v0.x

Key changes:
- Add mode detector for automatic mode selection
- Implement slash command loader with YAML frontmatter support
- Update action.yml with new prompt input
- Create pre-built slash commands for common tasks
- Update all tests for v1.0 compatibility

Breaking changes (with compatibility):
- Mode input now optional (auto-detected)
- override_prompt deprecated (use prompt)
- direct_prompt deprecated (use prompt)
This commit is contained in:
km-anthropic
2025-08-05 21:21:41 -07:00
parent 188d526721
commit 9a665625f7
18 changed files with 506 additions and 185 deletions

View File

@@ -6,8 +6,9 @@ export type CommonFields = {
customInstructions?: string;
allowedTools?: string;
disallowedTools?: string;
directPrompt?: string;
overridePrompt?: string;
prompt?: string; // v1.0: Unified prompt field
directPrompt?: string; // Deprecated
overridePrompt?: string; // Deprecated
};
type PullRequestReviewCommentEvent = {