Diffinery

codician/diffinerypublic

Open-source, agent-first GitHub and GitHub Actions alternative that runs on your own Cloudflare account: git hosting, pull requests, code review and drop-in GitHub Actions YAML on Workers, Durable Objects, R2 and Containers.

19 lines · 1.7 KBRaw History
1import type { Json } from "./runner.js";
2/** Events flowing through the `events` queue. Payload shapes follow GitHub webhooks where practical. */
3export type DiffineryEvent =
4 | { type: "push"; repoId: string; owner: string; repo: string; ref: string; before: string; after: string; actor: Actor; forced: boolean; created: boolean; deleted: boolean; at: string }
5 | { type: "pull_request"; action: "opened" | "synchronize" | "closed" | "reopened" | "edited" | "merged"; repoId: string; owner: string; repo: string; number: number; headRef: string; headSha: string; baseRef: string; actor: Actor; at: string }
6 | { type: "issues"; action: "opened" | "closed" | "reopened" | "edited"; repoId: string; owner: string; repo: string; number: number; actor: Actor; at: string }
7 | { type: "issue_comment"; action: "created"; repoId: string; owner: string; repo: string; number: number; commentId: string; actor: Actor; at: string }
8 | { type: "pull_request_review"; action: "submitted"; repoId: string; owner: string; repo: string; number: number; state: string; actor: Actor; at: string }
9 | { type: "workflow_run"; action: "requested" | "completed"; repoId: string; owner: string; repo: string; runId: string; conclusion?: string; actor: Actor; at: string }
10 | { type: "workflow_dispatch"; repoId: string; owner: string; repo: string; ref: string; workflow: string; inputs: Record<string, Json>; actor: Actor; at: string }
11 | { type: "audit"; action: string; actor: Actor; target?: string; detail?: Record<string, Json>; at: string };
12
13export interface Actor {
14 id: string;
15 login: string;
16 kind: "user" | "agent" | "system";
17 /** For agents: the human or team that owns the agent. */
18 onBehalfOf?: string;
19}