mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
Split ParsedGitHubContext into entity-specific and automation contexts: - ParsedGitHubContext: For entity events (issues/PRs) with required entityNumber and isPR - AutomationContext: For workflow_dispatch/schedule events without entity fields - GitHubContext: Union type for all contexts This eliminates ~20 null checks throughout the codebase and provides better type safety. Entity-specific code paths are now guaranteed to have the required fields. Co-Authored-By: Claude <noreply@anthropic.com>
21 lines
449 B
TypeScript
21 lines
449 B
TypeScript
import type { GitHubContext } from "../github/context";
|
|
import type { Octokits } from "../github/api/client";
|
|
import type { Mode } from "../modes/types";
|
|
|
|
export type PrepareResult = {
|
|
commentId?: number;
|
|
branchInfo: {
|
|
baseBranch: string;
|
|
claudeBranch?: string;
|
|
currentBranch: string;
|
|
};
|
|
mcpConfig: string;
|
|
};
|
|
|
|
export type PrepareOptions = {
|
|
context: GitHubContext;
|
|
octokit: Octokits;
|
|
mode: Mode;
|
|
githubToken: string;
|
|
};
|