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.

46 lines · 1.1 KBRaw History
1/** One check on the pull request's head commit, as Diffinery reports it. */
2export type CheckState = 'pass' | 'fail' | 'run' | 'wait' | 'skip'
3
4export type Check = {
5 name: string
6 workflow: string | null
7 state: CheckState
8 url: string | null
9 startedAt: string | null
10 completedAt: string | null
11}
12
13/** What the checks come to: any failure fails, else anything unfinished runs. */
14export type Rollup = 'pass' | 'fail' | 'run' | 'none'
15
16/** The branch's pull request and its checks. */
17export type Pr = {
18 host: string
19 repo: string
20 branch: string
21 number: number
22 title: string
23 url: string
24 state: 'OPEN' | 'MERGED' | 'CLOSED'
25 isDraft: boolean
26 review: string | null
27 mergeState: string | null
28 autoMerge: boolean
29 sha: string
30 rollup: Rollup
31 checks: Check[]
32}
33
34/** Why the band has no pull request to show, when that is worth a word. */
35export type Note = { kind: 'signin' | 'error'; text: string }
36
37declare module 'claude-code' {
38 interface PluginState {
39 'diffinery-ci': {
40 pr: Shaped<Pr | null>
41 note: Shaped<Note | null>
42 watching: boolean
43 isHidden: boolean
44 }
45 }
46}