| 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 | */ |
| 11 | export 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).""" |
| 13 | scalar BigInt |
| 14 | scalar DateTime |
| 15 | scalar URI |
| 16 | scalar GitObjectID |
| 17 | scalar HTML |
| 18 | scalar GitTimestamp |
| 19 | |
| 20 | schema { query: Query, mutation: Mutation } |
| 21 | |
| 22 | type 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 | |
| 44 | input 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 | } |
| 55 | type CreateIssuePayload { clientMutationId: String, issue: Issue } |
| 56 | |
| 57 | input 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 | } |
| 68 | type UpdateIssuePayload { actor: Actor, clientMutationId: String, issue: Issue } |
| 69 | |
| 70 | input CloseIssueInput { clientMutationId: String, duplicateIssueId: ID, issueId: ID!, stateReason: IssueClosedStateReason } |
| 71 | type CloseIssuePayload { clientMutationId: String, issue: Issue } |
| 72 | input ReopenIssueInput { clientMutationId: String, issueId: ID! } |
| 73 | type ReopenIssuePayload { clientMutationId: String, issue: Issue } |
| 74 | |
| 75 | input 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 | } |
| 86 | type CreatePullRequestPayload { clientMutationId: String, pullRequest: PullRequest } |
| 87 | |
| 88 | input 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 | } |
| 101 | enum PullRequestUpdateState { OPEN CLOSED } |
| 102 | type UpdatePullRequestPayload { actor: Actor, clientMutationId: String, pullRequest: PullRequest } |
| 103 | |
| 104 | input ClosePullRequestInput { clientMutationId: String, pullRequestId: ID! } |
| 105 | type ClosePullRequestPayload { clientMutationId: String, pullRequest: PullRequest } |
| 106 | input ReopenPullRequestInput { clientMutationId: String, pullRequestId: ID! } |
| 107 | type ReopenPullRequestPayload { clientMutationId: String, pullRequest: PullRequest } |
| 108 | input MarkPullRequestReadyForReviewInput { clientMutationId: String, pullRequestId: ID! } |
| 109 | type MarkPullRequestReadyForReviewPayload { clientMutationId: String, pullRequest: PullRequest } |
| 110 | input ConvertPullRequestToDraftInput { clientMutationId: String, pullRequestId: ID! } |
| 111 | type ConvertPullRequestToDraftPayload { clientMutationId: String, pullRequest: PullRequest } |
| 112 | |
| 113 | input EnablePullRequestAutoMergeInput { |
| 114 | authorEmail: String |
| 115 | clientMutationId: String |
| 116 | commitBody: String |
| 117 | commitHeadline: String |
| 118 | expectedHeadOid: GitObjectID |
| 119 | mergeMethod: PullRequestMergeMethod = MERGE |
| 120 | pullRequestId: ID! |
| 121 | } |
| 122 | type EnablePullRequestAutoMergePayload { actor: Actor, clientMutationId: String, pullRequest: PullRequest } |
| 123 | input DisablePullRequestAutoMergeInput { clientMutationId: String, pullRequestId: ID! } |
| 124 | type DisablePullRequestAutoMergePayload { actor: Actor, clientMutationId: String, pullRequest: PullRequest } |
| 125 | |
| 126 | input MergePullRequestInput { |
| 127 | authorEmail: String |
| 128 | clientMutationId: String |
| 129 | commitBody: String |
| 130 | commitHeadline: String |
| 131 | expectedHeadOid: GitObjectID |
| 132 | mergeMethod: PullRequestMergeMethod = MERGE |
| 133 | pullRequestId: ID! |
| 134 | } |
| 135 | type MergePullRequestPayload { actor: Actor, clientMutationId: String, pullRequest: PullRequest } |
| 136 | |
| 137 | input AddCommentInput { body: String!, clientMutationId: String, subjectId: ID! } |
| 138 | type IssueCommentEdge { cursor: String!, node: IssueComment } |
| 139 | type AddCommentPayload { clientMutationId: String, commentEdge: IssueCommentEdge, subject: Node } |
| 140 | |
| 141 | input AddLabelsToLabelableInput { clientMutationId: String, labelableId: ID!, labelIds: [ID!]! } |
| 142 | type AddLabelsToLabelablePayload { clientMutationId: String, labelable: Labelable } |
| 143 | input RemoveLabelsFromLabelableInput { clientMutationId: String, labelableId: ID!, labelIds: [ID!]! } |
| 144 | type RemoveLabelsFromLabelablePayload { clientMutationId: String, labelable: Labelable } |
| 145 | input AddAssigneesToAssignableInput { clientMutationId: String, assignableId: ID!, assigneeIds: [ID!]! } |
| 146 | type AddAssigneesToAssignablePayload { clientMutationId: String, assignable: Assignable } |
| 147 | input RemoveAssigneesFromAssignableInput { clientMutationId: String, assignableId: ID!, assigneeIds: [ID!]! } |
| 148 | type RemoveAssigneesFromAssignablePayload { clientMutationId: String, assignable: Assignable } |
| 149 | |
| 150 | input RequestReviewsInput { |
| 151 | clientMutationId: String |
| 152 | pullRequestId: ID! |
| 153 | teamIds: [ID!] |
| 154 | union: Boolean = false |
| 155 | userIds: [ID!] |
| 156 | } |
| 157 | type RequestReviewsPayload { actor: Actor, clientMutationId: String, pullRequest: PullRequest } |
| 158 | |
| 159 | type 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 | |
| 175 | enum SearchType { ISSUE ISSUE_ADVANCED REPOSITORY USER DISCUSSION } |
| 176 | union SearchResultItem = Issue | PullRequest |
| 177 | type SearchResultItemEdge { cursor: String!, node: SearchResultItem } |
| 178 | type SearchResultItemConnection { |
| 179 | edges: [SearchResultItemEdge] |
| 180 | issueCount: Int! |
| 181 | nodes: [SearchResultItem] |
| 182 | pageInfo: PageInfo! |
| 183 | repositoryCount: Int! |
| 184 | userCount: Int! |
| 185 | } |
| 186 | |
| 187 | enum ReactionContent { THUMBS_UP THUMBS_DOWN LAUGH HOORAY CONFUSED HEART ROCKET EYES } |
| 188 | type ReactingUserConnection { totalCount: Int! } |
| 189 | type ReactionGroup { |
| 190 | content: ReactionContent! |
| 191 | users(first: Int, last: Int, after: String, before: String): ReactingUserConnection! |
| 192 | viewerHasReacted: Boolean! |
| 193 | } |
| 194 | |
| 195 | type RateLimit { |
| 196 | cost: Int! |
| 197 | limit: Int! |
| 198 | nodeCount: Int! |
| 199 | remaining: Int! |
| 200 | resetAt: DateTime! |
| 201 | used: Int! |
| 202 | } |
| 203 | |
| 204 | type PageInfo { |
| 205 | endCursor: String |
| 206 | hasNextPage: Boolean! |
| 207 | hasPreviousPage: Boolean! |
| 208 | startCursor: String |
| 209 | } |
| 210 | |
| 211 | interface Node { id: ID! } |
| 212 | |
| 213 | interface Labelable { |
| 214 | labels(first: Int, last: Int, after: String, before: String): LabelConnection |
| 215 | } |
| 216 | |
| 217 | interface Assignable { |
| 218 | assignees(first: Int, last: Int, after: String, before: String): UserConnection! |
| 219 | } |
| 220 | |
| 221 | interface Actor { |
| 222 | avatarUrl(size: Int): URI! |
| 223 | login: String! |
| 224 | resourcePath: URI! |
| 225 | url: URI! |
| 226 | } |
| 227 | |
| 228 | interface RepositoryOwner { |
| 229 | avatarUrl(size: Int): URI! |
| 230 | id: ID! |
| 231 | login: String! |
| 232 | resourcePath: URI! |
| 233 | url: URI! |
| 234 | } |
| 235 | |
| 236 | type 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 | |
| 248 | type 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 | |
| 258 | type 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." |
| 268 | type Mannequin implements Node & Actor { |
| 269 | avatarUrl(size: Int): URI! |
| 270 | id: ID! |
| 271 | login: String! |
| 272 | resourcePath: URI! |
| 273 | url: URI! |
| 274 | } |
| 275 | |
| 276 | enum RepositoryPermission { ADMIN MAINTAIN WRITE TRIAGE READ } |
| 277 | enum RepositoryVisibility { PRIVATE PUBLIC INTERNAL } |
| 278 | enum PullRequestState { OPEN CLOSED MERGED } |
| 279 | enum IssueState { OPEN CLOSED } |
| 280 | enum IssueStateReason { COMPLETED DUPLICATE NOT_PLANNED REOPENED } |
| 281 | enum IssueClosedStateReason { COMPLETED DUPLICATE NOT_PLANNED } |
| 282 | input 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 | } |
| 293 | enum OrderDirection { ASC DESC } |
| 294 | enum IssueOrderField { CREATED_AT UPDATED_AT COMMENTS } |
| 295 | input IssueOrder { field: IssueOrderField!, direction: OrderDirection! } |
| 296 | enum LabelOrderField { NAME CREATED_AT } |
| 297 | input LabelOrder { field: LabelOrderField!, direction: OrderDirection! } |
| 298 | enum MilestoneState { OPEN CLOSED } |
| 299 | enum MilestoneOrderField { DUE_DATE CREATED_AT UPDATED_AT NUMBER } |
| 300 | input MilestoneOrder { field: MilestoneOrderField!, direction: OrderDirection! } |
| 301 | enum PullRequestReviewDecision { CHANGES_REQUESTED APPROVED REVIEW_REQUIRED } |
| 302 | enum PullRequestReviewState { PENDING COMMENTED APPROVED CHANGES_REQUESTED DISMISSED } |
| 303 | enum MergeableState { MERGEABLE CONFLICTING UNKNOWN } |
| 304 | enum MergeStateStatus { DIRTY UNKNOWN BLOCKED BEHIND DRAFT UNSTABLE HAS_HOOKS CLEAN } |
| 305 | enum PullRequestMergeMethod { MERGE SQUASH REBASE } |
| 306 | enum StatusState { EXPECTED ERROR FAILURE PENDING SUCCESS } |
| 307 | enum CheckStatusState { REQUESTED QUEUED IN_PROGRESS COMPLETED WAITING PENDING } |
| 308 | enum CheckConclusionState { ACTION_REQUIRED TIMED_OUT CANCELLED FAILURE SUCCESS NEUTRAL SKIPPED STARTUP_FAILURE STALE } |
| 309 | enum CheckRunState { REQUESTED QUEUED IN_PROGRESS COMPLETED WAITING PENDING ACTION_REQUIRED TIMED_OUT CANCELLED FAILURE SUCCESS NEUTRAL SKIPPED STARTUP_FAILURE STALE } |
| 310 | enum PatchStatus { ADDED DELETED RENAMED COPIED MODIFIED CHANGED } |
| 311 | |
| 312 | type 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 | |
| 365 | type Ref implements Node { |
| 366 | branchProtectionRule: BranchProtectionRule |
| 367 | id: ID! |
| 368 | name: String! |
| 369 | prefix: String! |
| 370 | target: Commit |
| 371 | } |
| 372 | |
| 373 | type CommitHistoryConnection { edges: [CommitEdge], nodes: [Commit], pageInfo: PageInfo!, totalCount: Int! } |
| 374 | type CommitEdge { cursor: String!, node: Commit } |
| 375 | |
| 376 | enum ReleaseOrderField { CREATED_AT } |
| 377 | input ReleaseOrder { field: ReleaseOrderField!, direction: OrderDirection! } |
| 378 | |
| 379 | type 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 | } |
| 398 | type ReleaseEdge { cursor: String!, node: Release } |
| 399 | type ReleaseConnection { edges: [ReleaseEdge], nodes: [Release], pageInfo: PageInfo!, totalCount: Int! } |
| 400 | |
| 401 | type 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 | |
| 412 | type PullRequestConnection { |
| 413 | edges: [PullRequestEdge] |
| 414 | nodes: [PullRequest] |
| 415 | pageInfo: PageInfo! |
| 416 | totalCount: Int! |
| 417 | } |
| 418 | type PullRequestEdge { cursor: String!, node: PullRequest } |
| 419 | |
| 420 | union IssueOrPullRequest = Issue | PullRequest |
| 421 | |
| 422 | type IssueConnection { |
| 423 | edges: [IssueEdge] |
| 424 | nodes: [Issue] |
| 425 | pageInfo: PageInfo! |
| 426 | totalCount: Int! |
| 427 | } |
| 428 | type IssueEdge { cursor: String!, node: Issue } |
| 429 | |
| 430 | type 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 | |
| 457 | type 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 | |
| 512 | type AutoMergeRequest { |
| 513 | authorEmail: String |
| 514 | commitBody: String |
| 515 | commitHeadline: String |
| 516 | enabledAt: DateTime |
| 517 | enabledBy: Actor |
| 518 | mergeMethod: PullRequestMergeMethod! |
| 519 | } |
| 520 | |
| 521 | type Milestone implements Node { |
| 522 | description: String |
| 523 | dueOn: DateTime |
| 524 | id: ID! |
| 525 | number: Int! |
| 526 | state: String! |
| 527 | title: String! |
| 528 | } |
| 529 | |
| 530 | type MilestoneConnection { nodes: [Milestone], totalCount: Int!, pageInfo: PageInfo! } |
| 531 | |
| 532 | type UserConnection { nodes: [User], totalCount: Int!, pageInfo: PageInfo! } |
| 533 | |
| 534 | type Label implements Node { |
| 535 | color: String! |
| 536 | description: String |
| 537 | id: ID! |
| 538 | name: String! |
| 539 | } |
| 540 | type LabelConnection { nodes: [Label], totalCount: Int!, pageInfo: PageInfo! } |
| 541 | |
| 542 | type Team implements Node { |
| 543 | id: ID! |
| 544 | name: String! |
| 545 | organization: Organization! |
| 546 | slug: String! |
| 547 | } |
| 548 | union RequestedReviewer = User | Team | Bot | Mannequin |
| 549 | type ReviewRequest { requestedReviewer: RequestedReviewer } |
| 550 | type ReviewRequestConnection { nodes: [ReviewRequest], totalCount: Int!, pageInfo: PageInfo! } |
| 551 | |
| 552 | type 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 | } |
| 563 | type PullRequestReviewConnection { nodes: [PullRequestReview], totalCount: Int!, pageInfo: PageInfo! } |
| 564 | |
| 565 | type 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 | } |
| 578 | type IssueCommentConnection { nodes: [IssueComment], totalCount: Int!, pageInfo: PageInfo! } |
| 579 | |
| 580 | type PullRequestChangedFile { |
| 581 | additions: Int! |
| 582 | changeType: PatchStatus! |
| 583 | deletions: Int! |
| 584 | path: String! |
| 585 | } |
| 586 | type PullRequestChangedFileConnection { nodes: [PullRequestChangedFile], totalCount: Int!, pageInfo: PageInfo! } |
| 587 | |
| 588 | type PullRequestCommit implements Node { |
| 589 | commit: Commit! |
| 590 | id: ID! |
| 591 | url: URI! |
| 592 | } |
| 593 | type PullRequestCommitEdge { cursor: String!, node: PullRequestCommit } |
| 594 | type PullRequestCommitConnection { |
| 595 | edges: [PullRequestCommitEdge] |
| 596 | nodes: [PullRequestCommit] |
| 597 | pageInfo: PageInfo! |
| 598 | totalCount: Int! |
| 599 | } |
| 600 | |
| 601 | type GitActor { |
| 602 | date: GitTimestamp |
| 603 | email: String |
| 604 | name: String |
| 605 | user: User |
| 606 | } |
| 607 | |
| 608 | type GitActorConnection { nodes: [GitActor], totalCount: Int!, pageInfo: PageInfo! } |
| 609 | |
| 610 | "Projects aren't part of Diffinery: always empty." |
| 611 | type ProjectV2Item implements Node { id: ID! } |
| 612 | type ProjectV2ItemConnection { nodes: [ProjectV2Item], totalCount: Int!, pageInfo: PageInfo! } |
| 613 | |
| 614 | type 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)." |
| 637 | type Status implements Node { |
| 638 | contexts: [StatusContext!]! |
| 639 | id: ID! |
| 640 | state: StatusState! |
| 641 | } |
| 642 | |
| 643 | type 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 | |
| 650 | union StatusCheckRollupContext = CheckRun | StatusContext |
| 651 | |
| 652 | type CheckRunStateCount { count: Int!, state: CheckRunState! } |
| 653 | type StatusContextStateCount { count: Int!, state: StatusState! } |
| 654 | type StatusCheckRollupContextEdge { cursor: String!, node: StatusCheckRollupContext } |
| 655 | |
| 656 | type 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 | |
| 667 | type App implements Node { |
| 668 | id: ID! |
| 669 | logoUrl(size: Int): URI! |
| 670 | name: String! |
| 671 | slug: String! |
| 672 | } |
| 673 | |
| 674 | type Workflow implements Node { |
| 675 | id: ID! |
| 676 | name: String! |
| 677 | } |
| 678 | |
| 679 | type WorkflowRun implements Node { |
| 680 | databaseId: BigInt |
| 681 | event: String! |
| 682 | id: ID! |
| 683 | runNumber: Int! |
| 684 | url: URI! |
| 685 | workflow: Workflow! |
| 686 | } |
| 687 | |
| 688 | type CheckSuite implements Node { |
| 689 | app: App |
| 690 | conclusion: CheckConclusionState |
| 691 | id: ID! |
| 692 | status: CheckStatusState! |
| 693 | workflowRun: WorkflowRun |
| 694 | } |
| 695 | |
| 696 | type 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 | |
| 714 | type 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 | `; |