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.

725 lines · 23.5 KBRaw History
1/**
2 * The part of GitHub's GraphQL schema (https://docs.github.com/graphql) that Diffinery answers at
3 * /api/graphql. Names, types and enum values are GitHub's, so the GitHub CLI and tools built on it
4 * (Claude Code's pull request badge, `gh pr view`, `gh pr checks`, `gh pr list`, `gh pr status`,
5 * `gh pr create`, `gh pr merge`, `gh pr ready`, `gh pr comment`) read and change Diffinery as a
6 * GitHub Enterprise Server host, and `gh issue list`, `view`, `create`, `comment`, `close`, `reopen`,
7 * `edit` and `status` work on its issues. release-please reads commit history (with each commit's
8 * pull requests), merged pull requests and releases from it. The mutations are the pull request and
9 * issue ones gh uses; everything else changes through the REST API.
10 */
11export const SCHEMA_SDL = /* GraphQL */ `
12"""Ids from the REST API, which can be wider than GraphQL's 32-bit Int (GitHub types these as Int)."""
13scalar BigInt
14scalar DateTime
15scalar URI
16scalar GitObjectID
17scalar HTML
18scalar GitTimestamp
19
20schema { query: Query, mutation: Mutation }
21
22type Mutation {
23 addAssigneesToAssignable(input: AddAssigneesToAssignableInput!): AddAssigneesToAssignablePayload
24 addComment(input: AddCommentInput!): AddCommentPayload
25 addLabelsToLabelable(input: AddLabelsToLabelableInput!): AddLabelsToLabelablePayload
26 closePullRequest(input: ClosePullRequestInput!): ClosePullRequestPayload
27 closeIssue(input: CloseIssueInput!): CloseIssuePayload
28 convertPullRequestToDraft(input: ConvertPullRequestToDraftInput!): ConvertPullRequestToDraftPayload
29 createIssue(input: CreateIssueInput!): CreateIssuePayload
30 createPullRequest(input: CreatePullRequestInput!): CreatePullRequestPayload
31 disablePullRequestAutoMerge(input: DisablePullRequestAutoMergeInput!): DisablePullRequestAutoMergePayload
32 enablePullRequestAutoMerge(input: EnablePullRequestAutoMergeInput!): EnablePullRequestAutoMergePayload
33 markPullRequestReadyForReview(input: MarkPullRequestReadyForReviewInput!): MarkPullRequestReadyForReviewPayload
34 mergePullRequest(input: MergePullRequestInput!): MergePullRequestPayload
35 removeAssigneesFromAssignable(input: RemoveAssigneesFromAssignableInput!): RemoveAssigneesFromAssignablePayload
36 removeLabelsFromLabelable(input: RemoveLabelsFromLabelableInput!): RemoveLabelsFromLabelablePayload
37 reopenIssue(input: ReopenIssueInput!): ReopenIssuePayload
38 reopenPullRequest(input: ReopenPullRequestInput!): ReopenPullRequestPayload
39 requestReviews(input: RequestReviewsInput!): RequestReviewsPayload
40 updateIssue(input: UpdateIssueInput!): UpdateIssuePayload
41 updatePullRequest(input: UpdatePullRequestInput!): UpdatePullRequestPayload
42}
43
44input CreateIssueInput {
45 assigneeIds: [ID!]
46 body: String
47 clientMutationId: String
48 issueTemplate: String
49 labelIds: [ID!]
50 milestoneId: ID
51 projectIds: [ID!]
52 repositoryId: ID!
53 title: String!
54}
55type CreateIssuePayload { clientMutationId: String, issue: Issue }
56
57input UpdateIssueInput {
58 assigneeIds: [ID!]
59 body: String
60 clientMutationId: String
61 id: ID!
62 labelIds: [ID!]
63 milestoneId: ID
64 projectIds: [ID!]
65 state: IssueState
66 title: String
67}
68type UpdateIssuePayload { actor: Actor, clientMutationId: String, issue: Issue }
69
70input CloseIssueInput { clientMutationId: String, duplicateIssueId: ID, issueId: ID!, stateReason: IssueClosedStateReason }
71type CloseIssuePayload { clientMutationId: String, issue: Issue }
72input ReopenIssueInput { clientMutationId: String, issueId: ID! }
73type ReopenIssuePayload { clientMutationId: String, issue: Issue }
74
75input CreatePullRequestInput {
76 baseRefName: String!
77 body: String
78 clientMutationId: String
79 draft: Boolean = false
80 headRefName: String!
81 headRepositoryId: ID
82 maintainerCanModify: Boolean = true
83 repositoryId: ID!
84 title: String!
85}
86type CreatePullRequestPayload { clientMutationId: String, pullRequest: PullRequest }
87
88input UpdatePullRequestInput {
89 assigneeIds: [ID!]
90 baseRefName: String
91 body: String
92 clientMutationId: String
93 labelIds: [ID!]
94 maintainerCanModify: Boolean
95 milestoneId: ID
96 projectIds: [ID!]
97 pullRequestId: ID!
98 state: PullRequestUpdateState
99 title: String
100}
101enum PullRequestUpdateState { OPEN CLOSED }
102type UpdatePullRequestPayload { actor: Actor, clientMutationId: String, pullRequest: PullRequest }
103
104input ClosePullRequestInput { clientMutationId: String, pullRequestId: ID! }
105type ClosePullRequestPayload { clientMutationId: String, pullRequest: PullRequest }
106input ReopenPullRequestInput { clientMutationId: String, pullRequestId: ID! }
107type ReopenPullRequestPayload { clientMutationId: String, pullRequest: PullRequest }
108input MarkPullRequestReadyForReviewInput { clientMutationId: String, pullRequestId: ID! }
109type MarkPullRequestReadyForReviewPayload { clientMutationId: String, pullRequest: PullRequest }
110input ConvertPullRequestToDraftInput { clientMutationId: String, pullRequestId: ID! }
111type ConvertPullRequestToDraftPayload { clientMutationId: String, pullRequest: PullRequest }
112
113input EnablePullRequestAutoMergeInput {
114 authorEmail: String
115 clientMutationId: String
116 commitBody: String
117 commitHeadline: String
118 expectedHeadOid: GitObjectID
119 mergeMethod: PullRequestMergeMethod = MERGE
120 pullRequestId: ID!
121}
122type EnablePullRequestAutoMergePayload { actor: Actor, clientMutationId: String, pullRequest: PullRequest }
123input DisablePullRequestAutoMergeInput { clientMutationId: String, pullRequestId: ID! }
124type DisablePullRequestAutoMergePayload { actor: Actor, clientMutationId: String, pullRequest: PullRequest }
125
126input MergePullRequestInput {
127 authorEmail: String
128 clientMutationId: String
129 commitBody: String
130 commitHeadline: String
131 expectedHeadOid: GitObjectID
132 mergeMethod: PullRequestMergeMethod = MERGE
133 pullRequestId: ID!
134}
135type MergePullRequestPayload { actor: Actor, clientMutationId: String, pullRequest: PullRequest }
136
137input AddCommentInput { body: String!, clientMutationId: String, subjectId: ID! }
138type IssueCommentEdge { cursor: String!, node: IssueComment }
139type AddCommentPayload { clientMutationId: String, commentEdge: IssueCommentEdge, subject: Node }
140
141input AddLabelsToLabelableInput { clientMutationId: String, labelableId: ID!, labelIds: [ID!]! }
142type AddLabelsToLabelablePayload { clientMutationId: String, labelable: Labelable }
143input RemoveLabelsFromLabelableInput { clientMutationId: String, labelableId: ID!, labelIds: [ID!]! }
144type RemoveLabelsFromLabelablePayload { clientMutationId: String, labelable: Labelable }
145input AddAssigneesToAssignableInput { clientMutationId: String, assignableId: ID!, assigneeIds: [ID!]! }
146type AddAssigneesToAssignablePayload { clientMutationId: String, assignable: Assignable }
147input RemoveAssigneesFromAssignableInput { clientMutationId: String, assignableId: ID!, assigneeIds: [ID!]! }
148type RemoveAssigneesFromAssignablePayload { clientMutationId: String, assignable: Assignable }
149
150input RequestReviewsInput {
151 clientMutationId: String
152 pullRequestId: ID!
153 teamIds: [ID!]
154 union: Boolean = false
155 userIds: [ID!]
156}
157type RequestReviewsPayload { actor: Actor, clientMutationId: String, pullRequest: PullRequest }
158
159type Query {
160 "The signed-in account."
161 viewer: User!
162 "A repository by owner and name."
163 repository(owner: String!, name: String!, followRenames: Boolean = true): Repository
164 "An account by login."
165 user(login: String!): User
166 "Request budget, reported as GitHub does. Diffinery limits requests per account rather than by query cost."
167 rateLimit(dryRun: Boolean = false): RateLimit
168 "A repository, issue or pull request by its global id."
169 node(id: ID!): Node
170 nodes(ids: [ID!]!): [Node]!
171 "Issues or pull requests in one repository (the query needs a repo: qualifier), as \`gh pr status\` and \`gh issue list --search\` ask for them."
172 search(query: String!, type: SearchType!, first: Int, last: Int, after: String, before: String): SearchResultItemConnection!
173}
174
175enum SearchType { ISSUE ISSUE_ADVANCED REPOSITORY USER DISCUSSION }
176union SearchResultItem = Issue | PullRequest
177type SearchResultItemEdge { cursor: String!, node: SearchResultItem }
178type SearchResultItemConnection {
179 edges: [SearchResultItemEdge]
180 issueCount: Int!
181 nodes: [SearchResultItem]
182 pageInfo: PageInfo!
183 repositoryCount: Int!
184 userCount: Int!
185}
186
187enum ReactionContent { THUMBS_UP THUMBS_DOWN LAUGH HOORAY CONFUSED HEART ROCKET EYES }
188type ReactingUserConnection { totalCount: Int! }
189type ReactionGroup {
190 content: ReactionContent!
191 users(first: Int, last: Int, after: String, before: String): ReactingUserConnection!
192 viewerHasReacted: Boolean!
193}
194
195type RateLimit {
196 cost: Int!
197 limit: Int!
198 nodeCount: Int!
199 remaining: Int!
200 resetAt: DateTime!
201 used: Int!
202}
203
204type PageInfo {
205 endCursor: String
206 hasNextPage: Boolean!
207 hasPreviousPage: Boolean!
208 startCursor: String
209}
210
211interface Node { id: ID! }
212
213interface Labelable {
214 labels(first: Int, last: Int, after: String, before: String): LabelConnection
215}
216
217interface Assignable {
218 assignees(first: Int, last: Int, after: String, before: String): UserConnection!
219}
220
221interface Actor {
222 avatarUrl(size: Int): URI!
223 login: String!
224 resourcePath: URI!
225 url: URI!
226}
227
228interface RepositoryOwner {
229 avatarUrl(size: Int): URI!
230 id: ID!
231 login: String!
232 resourcePath: URI!
233 url: URI!
234}
235
236type User implements Node & Actor & RepositoryOwner {
237 avatarUrl(size: Int): URI!
238 databaseId: BigInt
239 email: String!
240 id: ID!
241 isBot: Boolean!
242 login: String!
243 name: String
244 resourcePath: URI!
245 url: URI!
246}
247
248type Organization implements Node & Actor & RepositoryOwner {
249 avatarUrl(size: Int): URI!
250 databaseId: BigInt
251 id: ID!
252 login: String!
253 name: String
254 resourcePath: URI!
255 url: URI!
256}
257
258type Bot implements Node & Actor {
259 avatarUrl(size: Int): URI!
260 databaseId: BigInt
261 id: ID!
262 login: String!
263 resourcePath: URI!
264 url: URI!
265}
266
267"Someone brought over by a GitHub import who has no Diffinery account."
268type Mannequin implements Node & Actor {
269 avatarUrl(size: Int): URI!
270 id: ID!
271 login: String!
272 resourcePath: URI!
273 url: URI!
274}
275
276enum RepositoryPermission { ADMIN MAINTAIN WRITE TRIAGE READ }
277enum RepositoryVisibility { PRIVATE PUBLIC INTERNAL }
278enum PullRequestState { OPEN CLOSED MERGED }
279enum IssueState { OPEN CLOSED }
280enum IssueStateReason { COMPLETED DUPLICATE NOT_PLANNED REOPENED }
281enum IssueClosedStateReason { COMPLETED DUPLICATE NOT_PLANNED }
282input IssueFilters {
283 assignee: String
284 createdBy: String
285 labels: [String!]
286 mentioned: String
287 milestone: String
288 milestoneNumber: String
289 since: DateTime
290 states: [IssueState!]
291 viewerSubscribed: Boolean = false
292}
293enum OrderDirection { ASC DESC }
294enum IssueOrderField { CREATED_AT UPDATED_AT COMMENTS }
295input IssueOrder { field: IssueOrderField!, direction: OrderDirection! }
296enum LabelOrderField { NAME CREATED_AT }
297input LabelOrder { field: LabelOrderField!, direction: OrderDirection! }
298enum MilestoneState { OPEN CLOSED }
299enum MilestoneOrderField { DUE_DATE CREATED_AT UPDATED_AT NUMBER }
300input MilestoneOrder { field: MilestoneOrderField!, direction: OrderDirection! }
301enum PullRequestReviewDecision { CHANGES_REQUESTED APPROVED REVIEW_REQUIRED }
302enum PullRequestReviewState { PENDING COMMENTED APPROVED CHANGES_REQUESTED DISMISSED }
303enum MergeableState { MERGEABLE CONFLICTING UNKNOWN }
304enum MergeStateStatus { DIRTY UNKNOWN BLOCKED BEHIND DRAFT UNSTABLE HAS_HOOKS CLEAN }
305enum PullRequestMergeMethod { MERGE SQUASH REBASE }
306enum StatusState { EXPECTED ERROR FAILURE PENDING SUCCESS }
307enum CheckStatusState { REQUESTED QUEUED IN_PROGRESS COMPLETED WAITING PENDING }
308enum CheckConclusionState { ACTION_REQUIRED TIMED_OUT CANCELLED FAILURE SUCCESS NEUTRAL SKIPPED STARTUP_FAILURE STALE }
309enum CheckRunState { REQUESTED QUEUED IN_PROGRESS COMPLETED WAITING PENDING ACTION_REQUIRED TIMED_OUT CANCELLED FAILURE SUCCESS NEUTRAL SKIPPED STARTUP_FAILURE STALE }
310enum PatchStatus { ADDED DELETED RENAMED COPIED MODIFIED CHANGED }
311
312type Repository implements Node {
313 assignableUsers(first: Int, last: Int, after: String, before: String, query: String): UserConnection!
314 createdAt: DateTime!
315 databaseId: BigInt
316 defaultBranchRef: Ref
317 deleteBranchOnMerge: Boolean!
318 description: String
319 hasDiscussionsEnabled: Boolean!
320 hasIssuesEnabled: Boolean!
321 hasProjectsEnabled: Boolean!
322 hasWikiEnabled: Boolean!
323 homepageUrl: URI
324 id: ID!
325 isArchived: Boolean!
326 isEmpty: Boolean!
327 issue(number: Int!): Issue
328 issueOrPullRequest(number: Int!): IssueOrPullRequest
329 issues(first: Int, last: Int, after: String, before: String, states: [IssueState!], labels: [String!], orderBy: IssueOrder, filterBy: IssueFilters): IssueConnection!
330 isFork: Boolean!
331 isInOrganization: Boolean!
332 isLocked: Boolean!
333 isMirror: Boolean!
334 isPrivate: Boolean!
335 isTemplate: Boolean!
336 label(name: String!): Label
337 labels(first: Int, last: Int, after: String, before: String, query: String, orderBy: LabelOrder): LabelConnection
338 mentionableUsers(first: Int, last: Int, after: String, before: String, query: String): UserConnection!
339 mergeCommitAllowed: Boolean!
340 milestones(first: Int, last: Int, after: String, before: String, states: [MilestoneState!], orderBy: MilestoneOrder, query: String): MilestoneConnection
341 name: String!
342 nameWithOwner: String!
343 owner: RepositoryOwner!
344 parent: Repository
345 pullRequest(number: Int!): PullRequest
346 pullRequests(first: Int, last: Int, after: String, before: String, states: [PullRequestState!], headRefName: String, baseRefName: String, labels: [String!], orderBy: IssueOrder): PullRequestConnection!
347 pushedAt: DateTime
348 "A branch, tag or full ref name: refs/heads/main, refs/tags/v1.0.0, or main (a branch before a tag), as on GitHub."
349 ref(qualifiedName: String!): Ref
350 "Published releases, and drafts for those who can push. Oldest first unless orderBy says DESC, as on GitHub."
351 releases(first: Int, last: Int, after: String, before: String, orderBy: ReleaseOrder): ReleaseConnection!
352 release(tagName: String!): Release
353 latestRelease: Release
354 rebaseMergeAllowed: Boolean!
355 resourcePath: URI!
356 squashMergeAllowed: Boolean!
357 sshUrl: String!
358 updatedAt: DateTime!
359 url: URI!
360 viewerCanAdminister: Boolean!
361 viewerPermission: RepositoryPermission
362 visibility: RepositoryVisibility!
363}
364
365type Ref implements Node {
366 branchProtectionRule: BranchProtectionRule
367 id: ID!
368 name: String!
369 prefix: String!
370 target: Commit
371}
372
373type CommitHistoryConnection { edges: [CommitEdge], nodes: [Commit], pageInfo: PageInfo!, totalCount: Int! }
374type CommitEdge { cursor: String!, node: Commit }
375
376enum ReleaseOrderField { CREATED_AT }
377input ReleaseOrder { field: ReleaseOrderField!, direction: OrderDirection! }
378
379type Release implements Node {
380 author: User
381 createdAt: DateTime!
382 databaseId: Int
383 description: String
384 id: ID!
385 isDraft: Boolean!
386 isLatest: Boolean!
387 isPrerelease: Boolean!
388 name: String
389 publishedAt: DateTime
390 resourcePath: URI!
391 "The tag's ref, or null while a draft's tag doesn't exist yet."
392 tag: Ref
393 tagCommit: Commit
394 tagName: String!
395 updatedAt: DateTime!
396 url: URI!
397}
398type ReleaseEdge { cursor: String!, node: Release }
399type ReleaseConnection { edges: [ReleaseEdge], nodes: [Release], pageInfo: PageInfo!, totalCount: Int! }
400
401type BranchProtectionRule implements Node {
402 id: ID!
403 pattern: String!
404 requiredApprovingReviewCount: Int
405 requiredStatusCheckContexts: [String]
406 requiresApprovingReviews: Boolean!
407 requiresLinearHistory: Boolean!
408 requiresStatusChecks: Boolean!
409 requiresStrictStatusChecks: Boolean!
410}
411
412type PullRequestConnection {
413 edges: [PullRequestEdge]
414 nodes: [PullRequest]
415 pageInfo: PageInfo!
416 totalCount: Int!
417}
418type PullRequestEdge { cursor: String!, node: PullRequest }
419
420union IssueOrPullRequest = Issue | PullRequest
421
422type IssueConnection {
423 edges: [IssueEdge]
424 nodes: [Issue]
425 pageInfo: PageInfo!
426 totalCount: Int!
427}
428type IssueEdge { cursor: String!, node: Issue }
429
430type Issue implements Node & Labelable & Assignable {
431 assignees(first: Int, last: Int, after: String, before: String): UserConnection!
432 author: Actor
433 authorAssociation: String!
434 body: String!
435 closed: Boolean!
436 closedAt: DateTime
437 comments(first: Int, last: Int, after: String, before: String): IssueCommentConnection!
438 createdAt: DateTime!
439 databaseId: BigInt
440 id: ID!
441 labels(first: Int, last: Int, after: String, before: String): LabelConnection
442 locked: Boolean!
443 milestone: Milestone
444 number: Int!
445 projectItems(first: Int, last: Int, after: String, before: String): ProjectV2ItemConnection!
446 reactionGroups: [ReactionGroup!]
447 repository: Repository!
448 resourcePath: URI!
449 state: IssueState!
450 stateReason: IssueStateReason
451 title: String!
452 updatedAt: DateTime!
453 url: URI!
454 viewerCanUpdate: Boolean!
455}
456
457type PullRequest implements Node & Labelable & Assignable {
458 additions: Int!
459 assignees(first: Int, last: Int, after: String, before: String): UserConnection!
460 author: Actor
461 authorAssociation: String!
462 autoMergeRequest: AutoMergeRequest
463 baseRef: Ref
464 baseRefName: String!
465 baseRefOid: GitObjectID!
466 baseRepository: Repository
467 body: String!
468 changedFiles: Int!
469 closed: Boolean!
470 closedAt: DateTime
471 comments(first: Int, last: Int, after: String, before: String): IssueCommentConnection!
472 commits(first: Int, last: Int, after: String, before: String): PullRequestCommitConnection!
473 createdAt: DateTime!
474 databaseId: BigInt
475 deletions: Int!
476 files(first: Int, last: Int, after: String, before: String): PullRequestChangedFileConnection
477 headRef: Ref
478 headRefName: String!
479 headRefOid: GitObjectID!
480 headRepository: Repository
481 headRepositoryOwner: RepositoryOwner
482 id: ID!
483 isCrossRepository: Boolean!
484 isDraft: Boolean!
485 labels(first: Int, last: Int, after: String, before: String): LabelConnection
486 latestReviews(first: Int, last: Int, after: String, before: String): PullRequestReviewConnection
487 locked: Boolean!
488 maintainerCanModify: Boolean!
489 mergeCommit: Commit
490 mergeStateStatus: MergeStateStatus!
491 mergeable: MergeableState!
492 merged: Boolean!
493 mergedAt: DateTime
494 mergedBy: Actor
495 milestone: Milestone
496 number: Int!
497 permalink: URI!
498 projectItems(first: Int, last: Int, after: String, before: String): ProjectV2ItemConnection!
499 reactionGroups: [ReactionGroup!]
500 repository: Repository!
501 resourcePath: URI!
502 reviewDecision: PullRequestReviewDecision
503 reviewRequests(first: Int, last: Int, after: String, before: String): ReviewRequestConnection
504 reviews(first: Int, last: Int, after: String, before: String, states: [PullRequestReviewState!]): PullRequestReviewConnection
505 state: PullRequestState!
506 statusCheckRollup: StatusCheckRollup
507 title: String!
508 updatedAt: DateTime!
509 url: URI!
510}
511
512type AutoMergeRequest {
513 authorEmail: String
514 commitBody: String
515 commitHeadline: String
516 enabledAt: DateTime
517 enabledBy: Actor
518 mergeMethod: PullRequestMergeMethod!
519}
520
521type Milestone implements Node {
522 description: String
523 dueOn: DateTime
524 id: ID!
525 number: Int!
526 state: String!
527 title: String!
528}
529
530type MilestoneConnection { nodes: [Milestone], totalCount: Int!, pageInfo: PageInfo! }
531
532type UserConnection { nodes: [User], totalCount: Int!, pageInfo: PageInfo! }
533
534type Label implements Node {
535 color: String!
536 description: String
537 id: ID!
538 name: String!
539}
540type LabelConnection { nodes: [Label], totalCount: Int!, pageInfo: PageInfo! }
541
542type Team implements Node {
543 id: ID!
544 name: String!
545 organization: Organization!
546 slug: String!
547}
548union RequestedReviewer = User | Team | Bot | Mannequin
549type ReviewRequest { requestedReviewer: RequestedReviewer }
550type ReviewRequestConnection { nodes: [ReviewRequest], totalCount: Int!, pageInfo: PageInfo! }
551
552type PullRequestReview implements Node {
553 author: Actor
554 authorAssociation: String!
555 body: String!
556 commit: Commit
557 id: ID!
558 includesCreatedEdit: Boolean!
559 reactionGroups: [ReactionGroup!]
560 state: PullRequestReviewState!
561 submittedAt: DateTime
562}
563type PullRequestReviewConnection { nodes: [PullRequestReview], totalCount: Int!, pageInfo: PageInfo! }
564
565type IssueComment implements Node {
566 author: Actor
567 authorAssociation: String!
568 body: String!
569 createdAt: DateTime!
570 id: ID!
571 includesCreatedEdit: Boolean!
572 isMinimized: Boolean!
573 minimizedReason: String
574 reactionGroups: [ReactionGroup!]
575 url: URI!
576 viewerDidAuthor: Boolean!
577}
578type IssueCommentConnection { nodes: [IssueComment], totalCount: Int!, pageInfo: PageInfo! }
579
580type PullRequestChangedFile {
581 additions: Int!
582 changeType: PatchStatus!
583 deletions: Int!
584 path: String!
585}
586type PullRequestChangedFileConnection { nodes: [PullRequestChangedFile], totalCount: Int!, pageInfo: PageInfo! }
587
588type PullRequestCommit implements Node {
589 commit: Commit!
590 id: ID!
591 url: URI!
592}
593type PullRequestCommitEdge { cursor: String!, node: PullRequestCommit }
594type PullRequestCommitConnection {
595 edges: [PullRequestCommitEdge]
596 nodes: [PullRequestCommit]
597 pageInfo: PageInfo!
598 totalCount: Int!
599}
600
601type GitActor {
602 date: GitTimestamp
603 email: String
604 name: String
605 user: User
606}
607
608type GitActorConnection { nodes: [GitActor], totalCount: Int!, pageInfo: PageInfo! }
609
610"Projects aren't part of Diffinery: always empty."
611type ProjectV2Item implements Node { id: ID! }
612type ProjectV2ItemConnection { nodes: [ProjectV2Item], totalCount: Int!, pageInfo: PageInfo! }
613
614type Commit implements Node {
615 abbreviatedOid: String!
616 author: GitActor
617 authoredDate: DateTime!
618 authors(first: Int, last: Int, after: String, before: String): GitActorConnection!
619 commitUrl: URI!
620 committedDate: DateTime!
621 committer: GitActor
622 id: ID!
623 message: String!
624 "The merged pull request that brought this commit to the default branch; for a commit not on it, also the open pull requests that contain it."
625 associatedPullRequests(first: Int, last: Int, after: String, before: String): PullRequestConnection
626 "The commit and its ancestors, newest first (git log order). With path, only the commits that changed it."
627 history(first: Int, last: Int, after: String, before: String, path: String): CommitHistoryConnection!
628 messageBody: String!
629 messageHeadline: String!
630 oid: GitObjectID!
631 status: Status
632 statusCheckRollup: StatusCheckRollup
633 url: URI!
634}
635
636"The legacy combined commit status (commit statuses only, no check runs)."
637type Status implements Node {
638 contexts: [StatusContext!]!
639 id: ID!
640 state: StatusState!
641}
642
643type StatusCheckRollup implements Node {
644 commit: Commit
645 contexts(first: Int, last: Int, after: String, before: String): StatusCheckRollupContextConnection!
646 id: ID!
647 state: StatusState!
648}
649
650union StatusCheckRollupContext = CheckRun | StatusContext
651
652type CheckRunStateCount { count: Int!, state: CheckRunState! }
653type StatusContextStateCount { count: Int!, state: StatusState! }
654type StatusCheckRollupContextEdge { cursor: String!, node: StatusCheckRollupContext }
655
656type StatusCheckRollupContextConnection {
657 checkRunCount: Int!
658 checkRunCountsByState: [CheckRunStateCount!]
659 edges: [StatusCheckRollupContextEdge]
660 nodes: [StatusCheckRollupContext]
661 pageInfo: PageInfo!
662 statusContextCount: Int!
663 statusContextCountsByState: [StatusContextStateCount!]
664 totalCount: Int!
665}
666
667type App implements Node {
668 id: ID!
669 logoUrl(size: Int): URI!
670 name: String!
671 slug: String!
672}
673
674type Workflow implements Node {
675 id: ID!
676 name: String!
677}
678
679type WorkflowRun implements Node {
680 databaseId: BigInt
681 event: String!
682 id: ID!
683 runNumber: Int!
684 url: URI!
685 workflow: Workflow!
686}
687
688type CheckSuite implements Node {
689 app: App
690 conclusion: CheckConclusionState
691 id: ID!
692 status: CheckStatusState!
693 workflowRun: WorkflowRun
694}
695
696type CheckRun implements Node {
697 checkSuite: CheckSuite!
698 completedAt: DateTime
699 conclusion: CheckConclusionState
700 databaseId: BigInt
701 detailsUrl: URI
702 id: ID!
703 isRequired(pullRequestId: ID, pullRequestNumber: Int): Boolean!
704 name: String!
705 permalink: URI!
706 startedAt: DateTime
707 status: CheckStatusState!
708 summary: String
709 text: String
710 title: String
711 url: URI!
712}
713
714type StatusContext implements Node {
715 avatarUrl(size: Int): URI
716 context: String!
717 createdAt: DateTime!
718 creator: Actor
719 description: String
720 id: ID!
721 isRequired(pullRequestId: ID, pullRequestNumber: Int): Boolean!
722 state: StatusState!
723 targetUrl: URI
724}
725`;