mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 15:04:13 +08:00
ensure tag mode can't work with workflow dispatch and schedule tasks
This commit is contained in:
@@ -53,6 +53,17 @@ export const tagMode: Mode = {
|
||||
}: ModeOptions): Promise<ModeResult> {
|
||||
// Tag mode handles entity-based events (issues, PRs, comments)
|
||||
|
||||
// Validate this mode can handle the event
|
||||
if (
|
||||
context.eventName === "workflow_dispatch" ||
|
||||
context.eventName === "schedule"
|
||||
) {
|
||||
throw new Error(
|
||||
`Tag mode cannot handle ${context.eventName} events. ` +
|
||||
`Use 'agent' mode for automation events.`,
|
||||
);
|
||||
}
|
||||
|
||||
// Check if actor is human
|
||||
await checkHumanActor(octokit.rest, context);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user