Description
Webhook automations have a fixed repo and branch, set at creation. That breaks down for events that already carry a repo: CI failures, deploy events, monitoring alerts, internal platform events. You end up needing one automation per repo.
We want webhook automations to resolve the target repo, and optionally the branch, from the payload. Pull the values from configured JSON paths, validate them against an allowed repo set, then start the session against the resolved repo.
Out of scope
- Multi-repo fan-out from a single webhook event.
- Provider-specific parsers for every external system. Generic JSON payload paths first.
Acceptance criteria
- Users can configure a webhook automation to resolve repoOwner, repoName, and optionally branch from JSON payload paths.
- Resolved repos are validated against an explicit allowlist or the GitHub App's installed repos before any session is created.
- If repo resolution fails, the webhook returns a clear error and creates no session.
- If branch is missing, fall back to the resolved repo's default branch or a configured fallback branch.
- The resolved repo and branch are recorded on the automation run and the created session.
- Existing automations with fixed repo and branch keep working unchanged.
- The agent's webhook context includes the resolved repo and branch plus the original payload.
- Tests cover fixed repo behaviour, successful payload-based resolution, missing repo fields, unauthorized repo, invalid branch, fallback branch, and duplicate/idempotent delivery.
Related
Description
Webhook automations have a fixed repo and branch, set at creation. That breaks down for events that already carry a repo: CI failures, deploy events, monitoring alerts, internal platform events. You end up needing one automation per repo.
We want webhook automations to resolve the target repo, and optionally the branch, from the payload. Pull the values from configured JSON paths, validate them against an allowed repo set, then start the session against the resolved repo.
Out of scope
Acceptance criteria
Related