mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-08-22 11:28:55 +08:00
feat: add review mode for PR code reviews
- Add 'review' as a new execution mode in action.yml - Use default GitHub Action token (ACTIONS_TOKEN) for review mode - Create review mode implementation with GitHub MCP tools included by default - Move review-specific prompt to review mode's generatePrompt method - Add comprehensive review workflow instructions for inline comments - Fix type safety with proper mode validation - Keep agent mode's simple inline prompt handling
This commit is contained in:
@@ -13,11 +13,12 @@
|
||||
import type { Mode, ModeName } from "./types";
|
||||
import { tagMode } from "./tag";
|
||||
import { agentMode } from "./agent";
|
||||
import { reviewMode } from "./review";
|
||||
import type { GitHubContext } from "../github/context";
|
||||
import { isAutomationContext } from "../github/context";
|
||||
|
||||
export const DEFAULT_MODE = "tag" as const;
|
||||
export const VALID_MODES = ["tag", "agent"] as const;
|
||||
export const VALID_MODES = ["tag", "agent", "review"] as const;
|
||||
|
||||
/**
|
||||
* All available modes.
|
||||
@@ -26,6 +27,7 @@ export const VALID_MODES = ["tag", "agent"] as const;
|
||||
const modes = {
|
||||
tag: tagMode,
|
||||
agent: agentMode,
|
||||
review: reviewMode,
|
||||
} as const satisfies Record<ModeName, Mode>;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user