mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 06:54:13 +08:00
More robust type checking
This commit is contained in:
@@ -265,7 +265,13 @@ export function isIssuesAssignedEvent(
|
||||
export function isEntityContext(
|
||||
context: GitHubContext,
|
||||
): context is ParsedGitHubContext {
|
||||
return "entityNumber" in context && "isPR" in context;
|
||||
return (
|
||||
context.eventName === "issues" ||
|
||||
context.eventName === "issue_comment" ||
|
||||
context.eventName === "pull_request" ||
|
||||
context.eventName === "pull_request_review" ||
|
||||
context.eventName === "pull_request_review_comment"
|
||||
);
|
||||
}
|
||||
|
||||
// Type guard to check if context is an automation context
|
||||
|
||||
Reference in New Issue
Block a user