Skip to content

fix(context): treat push as an automation event#1464

Open
syf2211 wants to merge 1 commit into
anthropics:mainfrom
syf2211:fix/push-automation-event-1456
Open

fix(context): treat push as an automation event#1464
syf2211 wants to merge 1 commit into
anthropics:mainfrom
syf2211:fix/push-automation-event-1456

Conversation

@syf2211

@syf2211 syf2211 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Register GitHub push as a supported automation event so push-triggered workflows can run configured prompts without PR or issue context.

Motivation

Fixes #1456. Workflows triggered by on: push (including reusable workflows invoked from a push) failed immediately with Unsupported event type: push before Claude could run. This blocked post-merge doc regeneration and similar automation that intentionally runs after merge rather than on pull requests.

Changes

  • Add push to AUTOMATION_EVENT_NAMES and handle it in parseGitHubContext()
  • Include PushEvent in the AutomationContext payload union
  • Add regression tests for context parsing, isAutomationContext, and agent mode detection

Tests

  • bun test — 771 pass
  • bun run typecheck — pass
  • bun run format:check — pass on changed files (one pre-existing warning in unrelated file)

Notes

Push now follows the same agent-mode path as workflow_dispatch, schedule, and workflow_run: a prompt is required to trigger execution, and existing human-actor / allowed_bots checks still apply. Reviewed with composer-2.5 — APPROVE.

Fixes anthropics#1456

Push-triggered workflows (including reusable workflows called from
push) failed at startup with 'Unsupported event type: push'. Register
push alongside workflow_dispatch, schedule, and workflow_run so agent
mode can run configured prompts without PR/issue context.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unsupported event type: push — action exits 1 on push-triggered workflows

1 participant