Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

pullRequestReads.graphql.ts

1,498 lines72.0 KB

1// Generated by @effect/graphql-generator from pullRequestReads.graphql. Do not edit.
2import { GraphQL, GraphQLGroup } from "effect/graphql"
3import * as Schema from "effect/Schema"
4import * as Shared from "../../schema/github.graphql.ts"
5​
6/** Represents an individual commit status context */
7export const StatusContext = Schema.Struct({
8 __typename: Schema.Literal("StatusContext"),
9 /** The name of this status context. */
10 context: Schema.String,
11 /** The state of this status context. */
12 state: GraphQL.enumLiterals(Shared.StatusState.literals),
13 /** The URL for this status context. */
14 targetUrl: Schema.NullOr(Shared.URI),
15 /** Identifies the date and time when the object was created. */
16 createdAt: Shared.DateTime,
17 /** The description for this status context. */
18 description: Schema.NullOr(Schema.String),
19 /** Whether this is required to pass before merging for a specific pull request. */
20 isRequired: Schema.optionalKey(Schema.Boolean)
21})
22export interface StatusContext extends Schema.Struct.Type<typeof StatusContext.fields> {}
23​
24/** A workflow contains meta information about an Actions workflow file. */
25export const Workflow = Schema.Struct({
26 /** The name of the workflow. */
27 name: Schema.String
28})
29export interface Workflow extends Schema.Struct.Type<typeof Workflow.fields> {}
30​
31/** A workflow run. */
32export const WorkflowRun = Schema.Struct({
33 /** The workflow executed in this workflow run. */
34 workflow: Workflow
35})
36export interface WorkflowRun extends Schema.Struct.Type<typeof WorkflowRun.fields> {}
37​
38/** A check suite. */
39export const CheckSuite = Schema.Struct({
40 /** The workflow run associated with this check suite. */
41 workflowRun: Schema.NullOr(WorkflowRun)
42})
43export interface CheckSuite extends Schema.Struct.Type<typeof CheckSuite.fields> {}
44​
45/** A check run. */
46export const CheckRun = Schema.Struct({
47 __typename: Schema.Literal("CheckRun"),
48 /** The name of the check for this check run. */
49 name: Schema.String,
50 /** The current status of the check run. */
51 status: GraphQL.enumLiterals(Shared.CheckStatusState.literals),
52 /** The conclusion of the check run. */
53 conclusion: Schema.NullOr(GraphQL.enumLiterals(Shared.CheckConclusionState.literals)),
54 /** Identifies the date and time when the check run was started. */
55 startedAt: Schema.NullOr(Shared.DateTime),
56 /** Identifies the date and time when the check run was completed. */
57 completedAt: Schema.NullOr(Shared.DateTime),
58 /** The URL from which to find full details of the check run on the integrator's site. */
59 detailsUrl: Schema.NullOr(Shared.URI),
60 /** Whether this is required to pass before merging for a specific pull request. */
61 isRequired: Schema.optionalKey(Schema.Boolean),
62 /** The check suite that this run is a part of. */
63 checkSuite: CheckSuite
64})
65export interface CheckRun extends Schema.Struct.Type<typeof CheckRun.fields> {}
66​
67/** Types that can be inside a StatusCheckRollup context. */
68export const StatusCheckRollupContextOther = Schema.Struct({
69 __typename: GraphQL.otherTypename<Shared.Typename.StatusCheckRollupContext>()(["StatusContext", "CheckRun"])
70})
71export interface StatusCheckRollupContextOther extends Schema.Struct.Type<typeof StatusCheckRollupContextOther.fields> {}
72​
73/**
74 * `fragment CheckContext on StatusCheckRollupContext`
75 *
76 * Types that can be inside a StatusCheckRollup context.
77 */
78export const CheckContext = Schema.Union([
79 StatusContext,
80 CheckRun,
81 StatusCheckRollupContextOther
82])
83export type CheckContext = typeof CheckContext.Type
84​
85/** A user is an individual's account on GitHub that owns repositories and can make new content. */
86export const ActorAvatarsNodesUser = Schema.Struct({
87 __typename: Schema.Literal("User"),
88 /** The username used to login. */
89 login: Schema.String,
90 /** A URL pointing to the user's public avatar. */
91 avatarUrl: Shared.URI
92})
93export interface ActorAvatarsNodesUser extends Schema.Struct.Type<typeof ActorAvatarsNodesUser.fields> {}
94​
95/** A special type of user which takes actions on behalf of GitHub Apps. */
96export const NodesBot = Schema.Struct({
97 __typename: Schema.Literal("Bot"),
98 /** The username of the actor. */
99 login: Schema.String,
100 /** A URL pointing to the GitHub App's public avatar. */
101 avatarUrl: Shared.URI
102})
103export interface NodesBot extends Schema.Struct.Type<typeof NodesBot.fields> {}
104​
105/** An object with an ID. */
106export const NodesNodeOther = Schema.Struct({
107 __typename: GraphQL.otherTypename<Shared.Typename.Node>()(["User", "Bot"])
108})
109export interface NodesNodeOther extends Schema.Struct.Type<typeof NodesNodeOther.fields> {}
110​
111/** `query ActorAvatars` */
112export const ActorAvatars = GraphQL.query("ActorAvatars", {
113 document: {
114 variables: [
115 { name: "ids", body: "[ID!]!" }
116 ],
117 selections: [
118 { name: "nodes", body: ["(ids:$", "ids", "){__typename...on User{login avatarUrl}...on Bot{login avatarUrl}}"] }
119 ],
120 fragments: []
121 },
122 variables: {
123 ids: Schema.Array(Shared.ID)
124 },
125 result: Schema.Struct({
126 /** Lookup nodes by a list of IDs. */
127 nodes: Schema.Array(Schema.NullOr(Schema.Union([
128 ActorAvatarsNodesUser,
129 NodesBot,
130 NodesNodeOther
131 ])))
132 })
133})
134export declare namespace ActorAvatars {
135 export type Variables = typeof ActorAvatars.variables.Type
136 export type Result = typeof ActorAvatars.result.Type
138​
139/** Represents an owner of a Repository. */
140export const RepositoryOwner = Schema.Struct({
141 __typename: GraphQL.otherTypename<Shared.Typename.RepositoryOwner>()([]),
142 /** The username used to login. */
143 login: Schema.String
144})
145export interface RepositoryOwner extends Schema.Struct.Type<typeof RepositoryOwner.fields> {}
146​
147/** A repository contains the content for a project. */
148export const PullRequestCoreRepositoryPullRequestHeadRepositoryRepository = Schema.Struct({
149 /** The repository's name with owner. */
150 nameWithOwner: Schema.String,
151 /** The users permission level on the repository. Will return null if authenticated as an GitHub App. */
152 viewerPermission: Schema.NullOr(GraphQL.enumLiterals(Shared.RepositoryPermission.literals))
153})
154export interface PullRequestCoreRepositoryPullRequestHeadRepositoryRepository extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestHeadRepositoryRepository.fields> {}
155​
156/** Represents a Git reference. */
157export const HeadRefRef = Schema.Struct({
158 /** The Node ID of the Ref object */
159 id: Shared.ID
160})
161export interface HeadRefRef extends Schema.Struct.Type<typeof HeadRefRef.fields> {}
162​
163/** A user is an individual's account on GitHub that owns repositories and can make new content. */
164export const PullRequestCoreRepositoryPullRequestAuthorUser = Schema.Struct({
165 __typename: Schema.Literal("User"),
166 /** The username used to login. */
167 login: Schema.String,
168 /** A URL pointing to the user's public avatar. */
169 avatarUrl: Shared.URI,
170 /** The Node ID of the User object */
171 id: Shared.ID,
172 /** The user's public profile name. */
173 name: Schema.NullOr(Schema.String)
174})
175export interface PullRequestCoreRepositoryPullRequestAuthorUser extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestAuthorUser.fields> {}
176​
177/** Represents an object which can take actions on GitHub. Typically a User or Bot. */
178export const ActorOther = Schema.Struct({
179 __typename: GraphQL.otherTypename<Shared.Typename.Actor>()(["User"]),
180 /** The username of the actor. */
181 login: Schema.String,
182 /** A URL pointing to the actor's public avatar. */
183 avatarUrl: Shared.URI
184})
185export interface ActorOther extends Schema.Struct.Type<typeof ActorOther.fields> {}
186​
187/** Represents an auto-merge request for a pull request */
188export const AutoMergeRequest = Schema.Struct({
189 /**
190 * The merge method of the auto-merge request. If a merge queue is required by
191 * the base branch, this value will be set by the merge queue when merging.
192 */
193 mergeMethod: GraphQL.enumLiterals(Shared.PullRequestMergeMethod.literals)
194})
195export interface AutoMergeRequest extends Schema.Struct.Type<typeof AutoMergeRequest.fields> {}
196​
197/** Represents a comparison between two commit revisions. */
198export const Comparison = Schema.Struct({
199 /** The number of commits behind the base branch. */
200 behindBy: Shared.Int
201})
202export interface Comparison extends Schema.Struct.Type<typeof Comparison.fields> {}
203​
204/** Represents a Git reference. */
205export const BaseRefRef = Schema.Struct({
206 /** Compares the current ref as a base ref to another head ref, if the comparison can be made. */
207 compare: Schema.NullOr(Comparison)
208})
209export interface BaseRefRef extends Schema.Struct.Type<typeof BaseRefRef.fields> {}
210​
211/** A user is an individual's account on GitHub that owns repositories and can make new content. */
212export const RequestedReviewerUser = Schema.Struct({
213 __typename: Schema.Literal("User"),
214 /** The username used to login. */
215 login: Schema.String,
216 /** The user's public profile name. */
217 name: Schema.NullOr(Schema.String)
218})
219export interface RequestedReviewerUser extends Schema.Struct.Type<typeof RequestedReviewerUser.fields> {}
220​
221/** A special type of user which takes actions on behalf of GitHub Apps. */
222export const RequestedReviewerBot = Schema.Struct({
223 __typename: Schema.Literal("Bot"),
224 /** The username of the actor. */
225 login: Schema.String
226})
227export interface RequestedReviewerBot extends Schema.Struct.Type<typeof RequestedReviewerBot.fields> {}
228​
229/** A team of users in an organization. */
230export const Team = Schema.Struct({
231 __typename: Schema.Literal("Team"),
232 /** The slug corresponding to the team. */
233 slug: Schema.String,
234 /** The slug corresponding to the organization and team. */
235 combinedSlug: Schema.String,
236 /** The name of the team. */
237 teamName: Schema.String,
238 /** A URL pointing to the team's avatar. */
239 teamAvatarUrl: Schema.NullOr(Shared.URI)
240})
241export interface Team extends Schema.Struct.Type<typeof Team.fields> {}
242​
243/** Types that can be requested reviewers. */
244export const RequestedReviewerOther = Schema.Struct({
245 __typename: GraphQL.otherTypename<Shared.Typename.RequestedReviewer>()(["User", "Bot", "Team"])
246})
247export interface RequestedReviewerOther extends Schema.Struct.Type<typeof RequestedReviewerOther.fields> {}
248​
249/** A request for a user to review a pull request. */
250export const PullRequestCoreRepositoryPullRequestReviewRequestsNodesReviewRequest = Schema.Struct({
251 /** The reviewer that is requested. */
252 requestedReviewer: Schema.NullOr(Schema.Union([
253 RequestedReviewerUser,
254 RequestedReviewerBot,
255 Team,
256 RequestedReviewerOther
257 ]))
258})
259export interface PullRequestCoreRepositoryPullRequestReviewRequestsNodesReviewRequest extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestReviewRequestsNodesReviewRequest.fields> {}
260​
261/** The connection type for ReviewRequest. */
262export const PullRequestCoreRepositoryPullRequestReviewRequestsReviewRequestConnection = Schema.Struct({
263 /** A list of nodes. */
264 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PullRequestCoreRepositoryPullRequestReviewRequestsNodesReviewRequest)))
265})
266export interface PullRequestCoreRepositoryPullRequestReviewRequestsReviewRequestConnection extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestReviewRequestsReviewRequestConnection.fields> {}
267​
268/** A label for categorizing Issues, Pull Requests, Milestones, or Discussions with a given Repository. */
269export const PullRequestCoreRepositoryPullRequestLabelsNodesLabel = Schema.Struct({
270 /** Identifies the label name. */
271 name: Schema.String,
272 /** Identifies the label color. */
273 color: Schema.String
274})
275export interface PullRequestCoreRepositoryPullRequestLabelsNodesLabel extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestLabelsNodesLabel.fields> {}
276​
277/** The connection type for Label. */
278export const PullRequestCoreRepositoryPullRequestLabelsLabelConnection = Schema.Struct({
279 /** A list of nodes. */
280 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PullRequestCoreRepositoryPullRequestLabelsNodesLabel)))
281})
282export interface PullRequestCoreRepositoryPullRequestLabelsLabelConnection extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestLabelsLabelConnection.fields> {}
283​
284/** Information about pagination in a connection. */
285export const PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo = Schema.Struct({
286 /** When paginating forwards, are there more items? */
287 hasNextPage: Schema.Boolean
288})
289export interface PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo.fields> {}
290​
291/** The connection type for StatusCheckRollupContext. */
292export const PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsStatusCheckRollupContextConnection = Schema.Struct({
293 /** A list of nodes. */
294 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(CheckContext))),
295 /** Information to aid in pagination. */
296 pageInfo: PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo
297})
298export interface PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsStatusCheckRollupContextConnection extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsStatusCheckRollupContextConnection.fields> {}
299​
300/** Represents the rollup for both the check runs and status for a commit. */
301export const PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupStatusCheckRollup = Schema.Struct({
302 /** A list of status contexts and check runs for this commit. */
303 contexts: PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsStatusCheckRollupContextConnection
304})
305export interface PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupStatusCheckRollup extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupStatusCheckRollup.fields> {}
306​
307/** Represents a Git commit. */
308export const PullRequestCoreRepositoryPullRequestCommitsNodesCommitCommit = Schema.Struct({
309 /** Check and Status rollup information for this commit. */
310 statusCheckRollup: Schema.NullOr(PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupStatusCheckRollup)
311})
312export interface PullRequestCoreRepositoryPullRequestCommitsNodesCommitCommit extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestCommitsNodesCommitCommit.fields> {}
313​
314/** Represents a Git commit part of a pull request. */
315export const PullRequestCoreRepositoryPullRequestCommitsNodesPullRequestCommit = Schema.Struct({
316 /** The Git commit object */
317 commit: PullRequestCoreRepositoryPullRequestCommitsNodesCommitCommit
318})
319export interface PullRequestCoreRepositoryPullRequestCommitsNodesPullRequestCommit extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestCommitsNodesPullRequestCommit.fields> {}
320​
321/** The connection type for PullRequestCommit. */
322export const PullRequestCoreRepositoryPullRequestCommitsPullRequestCommitConnection = Schema.Struct({
323 /** A list of nodes. */
324 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PullRequestCoreRepositoryPullRequestCommitsNodesPullRequestCommit)))
325})
326export interface PullRequestCoreRepositoryPullRequestCommitsPullRequestCommitConnection extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestCommitsPullRequestCommitConnection.fields> {}
327​
328/** A repository pull request. */
329export const PullRequestCoreRepositoryPullRequestPullRequest = Schema.Struct({
330 /** Identifies the pull request number. */
331 number: Shared.Int,
332 /** Identifies the pull request title. */
333 title: Schema.String,
334 /** The HTTP URL for this pull request. */
335 url: Shared.URI,
336 /** The body as Markdown. */
337 body: Schema.String,
338 /** Identifies the state of the pull request. */
339 state: GraphQL.enumLiterals(Shared.PullRequestState.literals),
340 /** Identifies if the pull request is a draft. */
341 isDraft: Schema.Boolean,
342 /** Whether or not the pull request can be merged based on the existence of merge conflicts. */
343 mergeable: GraphQL.enumLiterals(Shared.MergeableState.literals),
344 /** Detailed information about the current pull request merge state status. */
345 mergeStateStatus: GraphQL.enumLiterals(Shared.MergeStateStatus.literals),
346 /** The current status of this pull request with respect to code review. */
347 reviewDecision: Schema.NullOr(GraphQL.enumLiterals(Shared.PullRequestReviewDecision.literals)),
348 /** The number of additions in this pull request. */
349 additions: Shared.Int,
350 /** The number of deletions in this pull request. */
351 deletions: Shared.Int,
352 /** The number of changed files in this pull request. */
353 changedFiles: Shared.Int,
354 /** Identifies the date and time when the object was created. */
355 createdAt: Shared.DateTime,
356 /** Identifies the date and time when the object was last updated. */
357 updatedAt: Shared.DateTime,
358 /** The date and time that the pull request was merged. */
359 mergedAt: Schema.NullOr(Shared.DateTime),
360 /** Identifies the date and time when the object was closed. */
361 closedAt: Schema.NullOr(Shared.DateTime),
362 /** Identifies the name of the head Ref associated with the pull request, even if the ref has been deleted. */
363 headRefName: Schema.String,
364 /** Identifies the name of the base Ref associated with the pull request, even if the ref has been deleted. */
365 baseRefName: Schema.String,
366 /** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
367 headRefOid: Shared.GitObjectID,
368 /** The head and base repositories are different. */
369 isCrossRepository: Schema.Boolean,
370 /** The owner of the repository associated with this pull request's head Ref. */
371 headRepositoryOwner: Schema.NullOr(RepositoryOwner),
372 /** The repository associated with this pull request's head Ref. */
373 headRepository: Schema.NullOr(PullRequestCoreRepositoryPullRequestHeadRepositoryRepository),
374 /** Identifies the head Ref associated with the pull request. */
375 headRef: Schema.NullOr(HeadRefRef),
376 /** The actor who authored the comment. */
377 author: Schema.NullOr(Schema.Union([
378 PullRequestCoreRepositoryPullRequestAuthorUser,
379 ActorOther
380 ])),
381 /** Returns the auto-merge request object if one exists for this pull request. */
382 autoMergeRequest: Schema.NullOr(AutoMergeRequest),
383 /** Check if the current viewer can update this object. */
384 viewerCanUpdate: Schema.Boolean,
385 /** Did the viewer author this comment. */
386 viewerDidAuthor: Schema.Boolean,
387 /**
388 * Whether or not the viewer can update the head ref of this PR, by merging or rebasing the base ref.
389 * If the head ref is up to date or unable to be updated by this user, this will return false.
390 */
391 viewerCanUpdateBranch: Schema.Boolean,
392 /** Identifies the base Ref associated with the pull request. */
393 baseRef: Schema.NullOr(BaseRefRef),
394 /** A list of review requests associated with the pull request. */
395 reviewRequests: Schema.NullOr(PullRequestCoreRepositoryPullRequestReviewRequestsReviewRequestConnection),
396 /** A list of labels associated with the object. */
397 labels: Schema.NullOr(PullRequestCoreRepositoryPullRequestLabelsLabelConnection),
398 /** A list of commits present in this pull request's head branch not present in the base branch. */
399 commits: PullRequestCoreRepositoryPullRequestCommitsPullRequestCommitConnection
400})
401export interface PullRequestCoreRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestPullRequest.fields> {}
402​
403/** A repository contains the content for a project. */
404export const PullRequestCoreRepositoryRepository = Schema.Struct({
405 /** Whether or not PRs are merged with a merge commit on this repository. */
406 mergeCommitAllowed: Schema.Boolean,
407 /** Whether or not squash-merging is enabled on this repository. */
408 squashMergeAllowed: Schema.Boolean,
409 /** Whether or not rebase-merging is enabled on this repository. */
410 rebaseMergeAllowed: Schema.Boolean,
411 /** Whether or not Auto-merge can be enabled on pull requests in this repository. */
412 autoMergeAllowed: Schema.Boolean,
413 /** The users permission level on the repository. Will return null if authenticated as an GitHub App. */
414 viewerPermission: Schema.NullOr(GraphQL.enumLiterals(Shared.RepositoryPermission.literals)),
415 /** Returns a single pull request from the current repository by number. */
416 pullRequest: Schema.NullOr(PullRequestCoreRepositoryPullRequestPullRequest)
417})
418export interface PullRequestCoreRepositoryRepository extends Schema.Struct.Type<typeof PullRequestCoreRepositoryRepository.fields> {}
419​
420/** `query PullRequestCore` */
421export const PullRequestCore = GraphQL.query("PullRequestCore", {
422 document: {
423 variables: [
424 { name: "owner", body: "String!" },
425 { name: "name", body: "String!" },
426 { name: "number", body: "Int!" },
427 { name: "headRef", body: "String!" },
428 { name: "required", body: "Boolean!" },
429 { name: "requestedReviewers", body: "Int!" }
430 ],
431 selections: [
432 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){mergeCommitAllowed squashMergeAllowed rebaseMergeAllowed autoMergeAllowed viewerPermission pullRequest(number:$", "number", "){number title url body state isDraft mergeable mergeStateStatus reviewDecision additions deletions changedFiles createdAt updatedAt mergedAt closedAt headRefName baseRefName headRefOid isCrossRepository headRepositoryOwner{__typename login}headRepository{nameWithOwner viewerPermission}headRef{id}author{__typename login avatarUrl...on User{id name}}autoMergeRequest{mergeMethod}viewerCanUpdate viewerDidAuthor viewerCanUpdateBranch baseRef{compare(headRef:$", "headRef", "){behindBy}}reviewRequests(first:$", "requestedReviewers", "){nodes{requestedReviewer{__typename...on User{login name}...on Bot{login}...on Team{slug combinedSlug teamName:name teamAvatarUrl:avatarUrl}}}}labels(first:100){nodes{name color}}commits(last:1){nodes{commit{statusCheckRollup{contexts(first:100){nodes{__typename...", "CheckContext", "}pageInfo{hasNextPage}}}}}}}}"] }
433 ],
434 fragments: [
435 { name: "CheckContext", body: ["on StatusCheckRollupContext{__typename...on StatusContext{context state targetUrl createdAt description isRequired(pullRequestNumber:$", "number", ")@include(if:$", "required", ")}...on CheckRun{name status conclusion startedAt completedAt detailsUrl isRequired(pullRequestNumber:$", "number", ")@include(if:$", "required", ")checkSuite{workflowRun{workflow{name}}}}}"] }
436 ]
437 },
438 variables: {
439 owner: Schema.String,
440 name: Schema.String,
441 number: Shared.Int,
442 headRef: Schema.String,
443 required: Schema.Boolean,
444 requestedReviewers: Shared.Int
445 },
446 result: Schema.Struct({
447 /** Lookup a given repository by the owner and repository name. */
448 repository: Schema.NullOr(PullRequestCoreRepositoryRepository)
449 })
450})
451export declare namespace PullRequestCore {
452 export type Variables = typeof PullRequestCore.variables.Type
453 export type Result = typeof PullRequestCore.result.Type
455​
456/** Information about pagination in a connection. */
457export const PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo = Schema.Struct({
458 /** When paginating forwards, are there more items? */
459 hasNextPage: Schema.Boolean,
460 /** When paginating forwards, the cursor to continue. */
461 endCursor: Schema.NullOr(Schema.String)
462})
463export interface PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo.fields> {}
464​
465/** The connection type for StatusCheckRollupContext. */
466export const PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsStatusCheckRollupContextConnection = Schema.Struct({
467 /** A list of nodes. */
468 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(CheckContext))),
469 /** Information to aid in pagination. */
470 pageInfo: PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo
471})
472export interface PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsStatusCheckRollupContextConnection extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsStatusCheckRollupContextConnection.fields> {}
473​
474/** Represents the rollup for both the check runs and status for a commit. */
475export const PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupStatusCheckRollup = Schema.Struct({
476 /** A list of status contexts and check runs for this commit. */
477 contexts: PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsStatusCheckRollupContextConnection
478})
479export interface PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupStatusCheckRollup extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupStatusCheckRollup.fields> {}
480​
481/** Represents a Git commit. */
482export const PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitCommit = Schema.Struct({
483 /** Check and Status rollup information for this commit. */
484 statusCheckRollup: Schema.NullOr(PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupStatusCheckRollup)
485})
486export interface PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitCommit extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitCommit.fields> {}
487​
488/** Represents a Git commit part of a pull request. */
489export const PullRequestCheckContextsRepositoryPullRequestCommitsNodesPullRequestCommit = Schema.Struct({
490 /** The Git commit object */
491 commit: PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitCommit
492})
493export interface PullRequestCheckContextsRepositoryPullRequestCommitsNodesPullRequestCommit extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryPullRequestCommitsNodesPullRequestCommit.fields> {}
494​
495/** The connection type for PullRequestCommit. */
496export const PullRequestCheckContextsRepositoryPullRequestCommitsPullRequestCommitConnection = Schema.Struct({
497 /** A list of nodes. */
498 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PullRequestCheckContextsRepositoryPullRequestCommitsNodesPullRequestCommit)))
499})
500export interface PullRequestCheckContextsRepositoryPullRequestCommitsPullRequestCommitConnection extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryPullRequestCommitsPullRequestCommitConnection.fields> {}
501​
502/** A repository pull request. */
503export const PullRequestCheckContextsRepositoryPullRequestPullRequest = Schema.Struct({
504 /** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
505 headRefOid: Shared.GitObjectID,
506 /** A list of commits present in this pull request's head branch not present in the base branch. */
507 commits: PullRequestCheckContextsRepositoryPullRequestCommitsPullRequestCommitConnection
508})
509export interface PullRequestCheckContextsRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryPullRequestPullRequest.fields> {}
510​
511/** A repository contains the content for a project. */
512export const PullRequestCheckContextsRepositoryRepository = Schema.Struct({
513 /** Returns a single pull request from the current repository by number. */
514 pullRequest: Schema.NullOr(PullRequestCheckContextsRepositoryPullRequestPullRequest)
515})
516export interface PullRequestCheckContextsRepositoryRepository extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryRepository.fields> {}
517​
518/** `query PullRequestCheckContexts` */
519export const PullRequestCheckContexts = GraphQL.query("PullRequestCheckContexts", {
520 document: {
521 variables: [
522 { name: "owner", body: "String!" },
523 { name: "name", body: "String!" },
524 { name: "number", body: "Int!" },
525 { name: "required", body: "Boolean!" },
526 { name: "after", body: "String" }
527 ],
528 selections: [
529 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){headRefOid commits(last:1){nodes{commit{statusCheckRollup{contexts(first:100 after:$", "after", "){nodes{__typename...", "CheckContext", "}pageInfo{hasNextPage endCursor}}}}}}}}"] }
530 ],
531 fragments: [
532 { name: "CheckContext", body: ["on StatusCheckRollupContext{__typename...on StatusContext{context state targetUrl createdAt description isRequired(pullRequestNumber:$", "number", ")@include(if:$", "required", ")}...on CheckRun{name status conclusion startedAt completedAt detailsUrl isRequired(pullRequestNumber:$", "number", ")@include(if:$", "required", ")checkSuite{workflowRun{workflow{name}}}}}"] }
533 ]
534 },
535 variables: {
536 owner: Schema.String,
537 name: Schema.String,
538 number: Shared.Int,
539 required: Schema.Boolean,
540 after: Schema.optional(Schema.NullOr(Schema.String))
541 },
542 result: Schema.Struct({
543 /** Lookup a given repository by the owner and repository name. */
544 repository: Schema.NullOr(PullRequestCheckContextsRepositoryRepository)
545 })
546})
547export declare namespace PullRequestCheckContexts {
548 export type Variables = typeof PullRequestCheckContexts.variables.Type
549 export type Result = typeof PullRequestCheckContexts.result.Type
551​
552/** A user is an individual's account on GitHub that owns repositories and can make new content. */
553export const PullRequestPreviewRepositoryPullRequestAuthorUser = Schema.Struct({
554 __typename: Schema.Literal("User"),
555 /** The username used to login. */
556 login: Schema.String,
557 /** A URL pointing to the user's public avatar. */
558 avatarUrl: Shared.URI,
559 /** The user's public profile name. */
560 name: Schema.NullOr(Schema.String)
561})
562export interface PullRequestPreviewRepositoryPullRequestAuthorUser extends Schema.Struct.Type<typeof PullRequestPreviewRepositoryPullRequestAuthorUser.fields> {}
563​
564/** A repository pull request. */
565export const PullRequestPreviewRepositoryPullRequestPullRequest = Schema.Struct({
566 /** Identifies the pull request number. */
567 number: Shared.Int,
568 /** Identifies the pull request title. */
569 title: Schema.String,
570 /** The HTTP URL for this pull request. */
571 url: Shared.URI,
572 /** Identifies the state of the pull request. */
573 state: GraphQL.enumLiterals(Shared.PullRequestState.literals),
574 /** Identifies if the pull request is a draft. */
575 isDraft: Schema.Boolean,
576 /** Identifies the date and time when the object was created. */
577 createdAt: Shared.DateTime,
578 /** The actor who authored the comment. */
579 author: Schema.NullOr(Schema.Union([
580 PullRequestPreviewRepositoryPullRequestAuthorUser,
581 ActorOther
582 ]))
583})
584export interface PullRequestPreviewRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestPreviewRepositoryPullRequestPullRequest.fields> {}
585​
586/** A repository contains the content for a project. */
587export const PullRequestPreviewRepositoryRepository = Schema.Struct({
588 /** Returns a single pull request from the current repository by number. */
589 pullRequest: Schema.NullOr(PullRequestPreviewRepositoryPullRequestPullRequest)
590})
591export interface PullRequestPreviewRepositoryRepository extends Schema.Struct.Type<typeof PullRequestPreviewRepositoryRepository.fields> {}
592​
593/** `query PullRequestPreview` */
594export const PullRequestPreview = GraphQL.query("PullRequestPreview", {
595 document: {
596 variables: [
597 { name: "owner", body: "String!" },
598 { name: "name", body: "String!" },
599 { name: "number", body: "Int!" }
600 ],
601 selections: [
602 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){number title url state isDraft createdAt author{__typename login avatarUrl...on User{name}}}}"] }
603 ],
604 fragments: []
605 },
606 variables: {
607 owner: Schema.String,
608 name: Schema.String,
609 number: Shared.Int
610 },
611 result: Schema.Struct({
612 /** Lookup a given repository by the owner and repository name. */
613 repository: Schema.NullOr(PullRequestPreviewRepositoryRepository)
614 })
615})
616export declare namespace PullRequestPreview {
617 export type Variables = typeof PullRequestPreview.variables.Type
618 export type Result = typeof PullRequestPreview.result.Type
620​
621/** A user is an individual's account on GitHub that owns repositories and can make new content. */
622export const UserUser = Schema.Struct({
623 /** The username used to login. */
624 login: Schema.String
625})
626export interface UserUser extends Schema.Struct.Type<typeof UserUser.fields> {}
627​
628/** Represents an actor in a Git commit (ie. an author or committer). */
629export const GitActor = Schema.Struct({
630 /** The name in the Git commit. */
631 name: Schema.NullOr(Schema.String),
632 /** The email in the Git commit. */
633 email: Schema.NullOr(Schema.String),
634 /** The GitHub user corresponding to the email field. Null if no such user exists. */
635 user: Schema.NullOr(UserUser)
636})
637export interface GitActor extends Schema.Struct.Type<typeof GitActor.fields> {}
638​
639/** The connection type for GitActor. */
640export const GitActorConnection = Schema.Struct({
641 /** A list of nodes. */
642 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(GitActor)))
643})
644export interface GitActorConnection extends Schema.Struct.Type<typeof GitActorConnection.fields> {}
645​
646/** Represents a Git commit. */
647export const PullRequestActivityRepositoryPullRequestCommitsNodesCommitCommit = Schema.Struct({
648 /** The Git object ID */
649 oid: Shared.GitObjectID,
650 /** The Git commit message headline */
651 messageHeadline: Schema.String,
652 /** The datetime when this commit was committed. */
653 committedDate: Shared.DateTime,
654 /**
655 * The list of authors for this commit based on the git author and the Co-authored-by
656 * message trailer. The git author will always be first.
657 */
658 authors: GitActorConnection
659})
660export interface PullRequestActivityRepositoryPullRequestCommitsNodesCommitCommit extends Schema.Struct.Type<typeof PullRequestActivityRepositoryPullRequestCommitsNodesCommitCommit.fields> {}
661​
662/** Represents a Git commit part of a pull request. */
663export const PullRequestActivityRepositoryPullRequestCommitsNodesPullRequestCommit = Schema.Struct({
664 /** The Git commit object */
665 commit: PullRequestActivityRepositoryPullRequestCommitsNodesCommitCommit
666})
667export interface PullRequestActivityRepositoryPullRequestCommitsNodesPullRequestCommit extends Schema.Struct.Type<typeof PullRequestActivityRepositoryPullRequestCommitsNodesPullRequestCommit.fields> {}
668​
669/** The connection type for PullRequestCommit. */
670export const PullRequestActivityRepositoryPullRequestCommitsPullRequestCommitConnection = Schema.Struct({
671 /** A list of nodes. */
672 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PullRequestActivityRepositoryPullRequestCommitsNodesPullRequestCommit)))
673})
674export interface PullRequestActivityRepositoryPullRequestCommitsPullRequestCommitConnection extends Schema.Struct.Type<typeof PullRequestActivityRepositoryPullRequestCommitsPullRequestCommitConnection.fields> {}
675​
676/** Represents a comment on an Issue. */
677export const NodesIssueComment = Schema.Struct({
678 /** The Node ID of the IssueComment object */
679 id: Shared.ID,
680 /** The body as Markdown. */
681 body: Schema.String,
682 /** Identifies the date and time when the object was created. */
683 createdAt: Shared.DateTime,
684 /** The moment the editor made the last edit */
685 lastEditedAt: Schema.NullOr(Shared.DateTime),
686 /** The HTTP URL for this issue comment */
687 url: Shared.URI,
688 /** The actor who authored the comment. */
689 author: Schema.NullOr(Schema.Union([
690 PullRequestPreviewRepositoryPullRequestAuthorUser,
691 ActorOther
692 ]))
693})
694export interface NodesIssueComment extends Schema.Struct.Type<typeof NodesIssueComment.fields> {}
695​
696/** The connection type for IssueComment. */
697export const IssueCommentConnection = Schema.Struct({
698 /** Information to aid in pagination. */
699 pageInfo: PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo,
700 /** A list of nodes. */
701 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(NodesIssueComment)))
702})
703export interface IssueCommentConnection extends Schema.Struct.Type<typeof IssueCommentConnection.fields> {}
704​
705/** A review object for a given pull request. */
706export const NodesPullRequestReview = Schema.Struct({
707 /** The Node ID of the PullRequestReview object */
708 id: Shared.ID,
709 /** Identifies the pull request review body. */
710 body: Schema.String,
711 /** Identifies the current state of the pull request review. */
712 state: GraphQL.enumLiterals(Shared.PullRequestReviewState.literals),
713 /** Identifies when the Pull Request Review was submitted */
714 submittedAt: Schema.NullOr(Shared.DateTime),
715 /** The moment the editor made the last edit */
716 lastEditedAt: Schema.NullOr(Shared.DateTime),
717 /** The HTTP URL permalink for this PullRequestReview. */
718 url: Shared.URI,
719 /** The actor who authored the comment. */
720 author: Schema.NullOr(Schema.Union([
721 PullRequestPreviewRepositoryPullRequestAuthorUser,
722 ActorOther
723 ]))
724})
725export interface NodesPullRequestReview extends Schema.Struct.Type<typeof NodesPullRequestReview.fields> {}
726​
727/** The connection type for PullRequestReview. */
728export const PullRequestReviewConnection = Schema.Struct({
729 /** Information to aid in pagination. */
730 pageInfo: PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo,
731 /** A list of nodes. */
732 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(NodesPullRequestReview)))
733})
734export interface PullRequestReviewConnection extends Schema.Struct.Type<typeof PullRequestReviewConnection.fields> {}
735​
736/** A repository pull request. */
737export const PullRequestActivityRepositoryPullRequestPullRequest = Schema.Struct({
738 /** The actor who authored the comment. */
739 author: Schema.optionalKey(Schema.NullOr(Schema.Union([
740 PullRequestPreviewRepositoryPullRequestAuthorUser,
741 ActorOther
742 ]))),
743 /** A list of commits present in this pull request's head branch not present in the base branch. */
744 commits: Schema.optionalKey(PullRequestActivityRepositoryPullRequestCommitsPullRequestCommitConnection),
745 /** A list of comments associated with the pull request. */
746 comments: Schema.optionalKey(IssueCommentConnection),
747 /** A list of reviews associated with the pull request. */
748 reviews: Schema.optionalKey(Schema.NullOr(PullRequestReviewConnection))
749})
750export interface PullRequestActivityRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestActivityRepositoryPullRequestPullRequest.fields> {}
751​
752/** A repository contains the content for a project. */
753export const PullRequestActivityRepositoryRepository = Schema.Struct({
754 /** Returns a single pull request from the current repository by number. */
755 pullRequest: Schema.NullOr(PullRequestActivityRepositoryPullRequestPullRequest)
756})
757export interface PullRequestActivityRepositoryRepository extends Schema.Struct.Type<typeof PullRequestActivityRepositoryRepository.fields> {}
758​
759/** `query PullRequestActivity` */
760export const PullRequestActivity = GraphQL.query("PullRequestActivity", {
761 document: {
762 variables: [
763 { name: "owner", body: "String!" },
764 { name: "name", body: "String!" },
765 { name: "number", body: "Int!" },
766 { name: "head", body: "Boolean!" },
767 { name: "withComments", body: "Boolean!" },
768 { name: "commentsAfter", body: "String" },
769 { name: "withReviews", body: "Boolean!" },
770 { name: "reviewsAfter", body: "String" }
771 ],
772 selections: [
773 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){author@include(if:$", "head", "){__typename login avatarUrl...on User{name}}commits(last:100)@include(if:$", "head", "){nodes{commit{oid messageHeadline committedDate authors(first:10){nodes{name email user{login}}}}}}comments(first:100 after:$", "commentsAfter", ")@include(if:$", "withComments", "){pageInfo{hasNextPage endCursor}nodes{id body createdAt lastEditedAt url author{__typename login avatarUrl...on User{name}}}}reviews(first:100 after:$", "reviewsAfter", ")@include(if:$", "withReviews", "){pageInfo{hasNextPage endCursor}nodes{id body state submittedAt lastEditedAt url author{__typename login avatarUrl...on User{name}}}}}}"] }
774 ],
775 fragments: []
776 },
777 variables: {
778 owner: Schema.String,
779 name: Schema.String,
780 number: Shared.Int,
781 head: Schema.Boolean,
782 withComments: Schema.Boolean,
783 commentsAfter: Schema.optional(Schema.NullOr(Schema.String)),
784 withReviews: Schema.Boolean,
785 reviewsAfter: Schema.optional(Schema.NullOr(Schema.String))
786 },
787 result: Schema.Struct({
788 /** Lookup a given repository by the owner and repository name. */
789 repository: Schema.NullOr(PullRequestActivityRepositoryRepository)
790 })
791})
792export declare namespace PullRequestActivity {
793 export type Variables = typeof PullRequestActivity.variables.Type
794 export type Result = typeof PullRequestActivity.result.Type
796​
797/** A repository pull request. */
798export const NodesPullRequest = Schema.Struct({
799 /** Identifies the pull request number. */
800 number: Shared.Int,
801 /** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
802 headRefOid: Shared.GitObjectID,
803 /** The head and base repositories are different. */
804 isCrossRepository: Schema.Boolean,
805 /** The owner of the repository associated with this pull request's head Ref. */
806 headRepositoryOwner: Schema.NullOr(RepositoryOwner)
807})
808export interface NodesPullRequest extends Schema.Struct.Type<typeof NodesPullRequest.fields> {}
809​
810/** The connection type for PullRequest. */
811export const PullRequestConnection = Schema.Struct({
812 /** Information to aid in pagination. */
813 pageInfo: PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo,
814 /** A list of nodes. */
815 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(NodesPullRequest)))
816})
817export interface PullRequestConnection extends Schema.Struct.Type<typeof PullRequestConnection.fields> {}
818​
819/** A repository contains the content for a project. */
820export const PullRequestHeadsRepositoryRepository = Schema.Struct({
821 /** A list of pull requests that have been opened in the repository. */
822 pullRequests: PullRequestConnection
823})
824export interface PullRequestHeadsRepositoryRepository extends Schema.Struct.Type<typeof PullRequestHeadsRepositoryRepository.fields> {}
825​
826/** `query PullRequestHeads` */
827export const PullRequestHeads = GraphQL.query("PullRequestHeads", {
828 document: {
829 variables: [
830 { name: "owner", body: "String!" },
831 { name: "name", body: "String!" },
832 { name: "head", body: "String!" },
833 { name: "after", body: "String" }
834 ],
835 selections: [
836 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequests(first:100 after:$", "after", " states:[OPEN]headRefName:$", "head", "){pageInfo{hasNextPage endCursor}nodes{number headRefOid isCrossRepository headRepositoryOwner{__typename login}}}}"] }
837 ],
838 fragments: []
839 },
840 variables: {
841 owner: Schema.String,
842 name: Schema.String,
843 head: Schema.String,
844 after: Schema.optional(Schema.NullOr(Schema.String))
845 },
846 result: Schema.Struct({
847 /** Lookup a given repository by the owner and repository name. */
848 repository: Schema.NullOr(PullRequestHeadsRepositoryRepository)
849 })
850})
851export declare namespace PullRequestHeads {
852 export type Variables = typeof PullRequestHeads.variables.Type
853 export type Result = typeof PullRequestHeads.result.Type
855​
856/** A repository pull request. */
857export const PullRequestNodeIdRepositoryPullRequestPullRequest = Schema.Struct({
858 /** The Node ID of the PullRequest object */
859 id: Shared.ID
860})
861export interface PullRequestNodeIdRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestNodeIdRepositoryPullRequestPullRequest.fields> {}
862​
863/** A repository contains the content for a project. */
864export const PullRequestNodeIdRepositoryRepository = Schema.Struct({
865 /** Returns a single pull request from the current repository by number. */
866 pullRequest: Schema.NullOr(PullRequestNodeIdRepositoryPullRequestPullRequest)
867})
868export interface PullRequestNodeIdRepositoryRepository extends Schema.Struct.Type<typeof PullRequestNodeIdRepositoryRepository.fields> {}
869​
870/** `query PullRequestNodeId` */
871export const PullRequestNodeId = GraphQL.query("PullRequestNodeId", {
872 document: {
873 variables: [
874 { name: "owner", body: "String!" },
875 { name: "name", body: "String!" },
876 { name: "number", body: "Int!" }
877 ],
878 selections: [
879 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){id}}"] }
880 ],
881 fragments: []
882 },
883 variables: {
884 owner: Schema.String,
885 name: Schema.String,
886 number: Shared.Int
887 },
888 result: Schema.Struct({
889 /** Lookup a given repository by the owner and repository name. */
890 repository: Schema.NullOr(PullRequestNodeIdRepositoryRepository)
891 })
892})
893export declare namespace PullRequestNodeId {
894 export type Variables = typeof PullRequestNodeId.variables.Type
895 export type Result = typeof PullRequestNodeId.result.Type
897​
898/** Represents a comment on an Issue. */
899export const NodeIssueComment = Schema.Struct({
900 __typename: Schema.Literal("IssueComment"),
901 /** The Node ID of the IssueComment object */
902 id: Shared.ID,
903 /**
904 * Returns the pull request associated with the comment, if this comment was made on a
905 * pull request.
906 */
907 pullRequest: Schema.NullOr(PullRequestNodeIdRepositoryPullRequestPullRequest)
908})
909export interface NodeIssueComment extends Schema.Struct.Type<typeof NodeIssueComment.fields> {}
910​
911/** A review comment associated with a given repository pull request. */
912export const PullRequestReviewComment = Schema.Struct({
913 __typename: Schema.Literal("PullRequestReviewComment"),
914 /** The Node ID of the PullRequestReviewComment object */
915 id: Shared.ID,
916 /** The pull request associated with this review comment. */
917 reviewCommentPullRequest: PullRequestNodeIdRepositoryPullRequestPullRequest
918})
919export interface PullRequestReviewComment extends Schema.Struct.Type<typeof PullRequestReviewComment.fields> {}
920​
921/** A review object for a given pull request. */
922export const NodePullRequestReview = Schema.Struct({
923 __typename: Schema.Literal("PullRequestReview"),
924 /** The Node ID of the PullRequestReview object */
925 id: Shared.ID,
926 /** Identifies the pull request associated with this pull request review. */
927 reviewPullRequest: PullRequestNodeIdRepositoryPullRequestPullRequest
928})
929export interface NodePullRequestReview extends Schema.Struct.Type<typeof NodePullRequestReview.fields> {}
930​
931/** An object with an ID. */
932export const PullRequestSubjectNodeNodeOther = Schema.Struct({
933 __typename: GraphQL.otherTypename<Shared.Typename.Node>()(["IssueComment", "PullRequestReviewComment", "PullRequestReview"]),
934 /** ID of the object. */
935 id: Shared.ID
936})
937export interface PullRequestSubjectNodeNodeOther extends Schema.Struct.Type<typeof PullRequestSubjectNodeNodeOther.fields> {}
938​
939/** `query PullRequestSubject` */
940export const PullRequestSubject = GraphQL.query("PullRequestSubject", {
941 document: {
942 variables: [
943 { name: "owner", body: "String!" },
944 { name: "name", body: "String!" },
945 { name: "number", body: "Int!" },
946 { name: "subjectId", body: "ID!" }
947 ],
948 selections: [
949 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){id}}"] },
950 { name: "node", body: ["(id:$", "subjectId", "){__typename id...on IssueComment{pullRequest{id}}...on PullRequestReviewComment{reviewCommentPullRequest:pullRequest{id}}...on PullRequestReview{reviewPullRequest:pullRequest{id}}}"] }
951 ],
952 fragments: []
953 },
954 variables: {
955 owner: Schema.String,
956 name: Schema.String,
957 number: Shared.Int,
958 subjectId: Shared.ID
959 },
960 result: Schema.Struct({
961 /** Lookup a given repository by the owner and repository name. */
962 repository: Schema.NullOr(PullRequestNodeIdRepositoryRepository),
963 /** Fetches an object given its ID. */
964 node: Schema.NullOr(Schema.Union([
965 NodeIssueComment,
966 PullRequestReviewComment,
967 NodePullRequestReview,
968 PullRequestSubjectNodeNodeOther
969 ]))
970 })
971})
972export declare namespace PullRequestSubject {
973 export type Variables = typeof PullRequestSubject.variables.Type
974 export type Result = typeof PullRequestSubject.result.Type
976​
977/** A repository contains the content for a project. */
978export const ViewerPermissionsRepositoryPullRequestHeadRepositoryRepository = Schema.Struct({
979 /** The users permission level on the repository. Will return null if authenticated as an GitHub App. */
980 viewerPermission: Schema.NullOr(GraphQL.enumLiterals(Shared.RepositoryPermission.literals))
981})
982export interface ViewerPermissionsRepositoryPullRequestHeadRepositoryRepository extends Schema.Struct.Type<typeof ViewerPermissionsRepositoryPullRequestHeadRepositoryRepository.fields> {}
983​
984/** A repository pull request. */
985export const ViewerPermissionsRepositoryPullRequestPullRequest = Schema.Struct({
986 /** Check if the current viewer can update this object. */
987 viewerCanUpdate: Schema.Boolean,
988 /** Did the viewer author this comment. */
989 viewerDidAuthor: Schema.Boolean,
990 /** The repository associated with this pull request's head Ref. */
991 headRepository: Schema.NullOr(ViewerPermissionsRepositoryPullRequestHeadRepositoryRepository)
992})
993export interface ViewerPermissionsRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof ViewerPermissionsRepositoryPullRequestPullRequest.fields> {}
994​
995/** A repository contains the content for a project. */
996export const ViewerPermissionsRepositoryRepository = Schema.Struct({
997 /** Whether or not PRs are merged with a merge commit on this repository. */
998 mergeCommitAllowed: Schema.Boolean,
999 /** Whether or not squash-merging is enabled on this repository. */
1000 squashMergeAllowed: Schema.Boolean,
1001 /** Whether or not rebase-merging is enabled on this repository. */
1002 rebaseMergeAllowed: Schema.Boolean,
1003 /** Whether or not Auto-merge can be enabled on pull requests in this repository. */
1004 autoMergeAllowed: Schema.Boolean,
1005 /** The users permission level on the repository. Will return null if authenticated as an GitHub App. */
1006 viewerPermission: Schema.NullOr(GraphQL.enumLiterals(Shared.RepositoryPermission.literals)),
1007 /** Returns a single pull request from the current repository by number. */
1008 pullRequest: Schema.NullOr(ViewerPermissionsRepositoryPullRequestPullRequest)
1010export interface ViewerPermissionsRepositoryRepository extends Schema.Struct.Type<typeof ViewerPermissionsRepositoryRepository.fields> {}
1011​
1012/** `query ViewerPermissions` */
1013export const ViewerPermissions = GraphQL.query("ViewerPermissions", {
1014 document: {
1015 variables: [
1016 { name: "owner", body: "String!" },
1017 { name: "name", body: "String!" },
1018 { name: "number", body: "Int!" }
1019 ],
1020 selections: [
1021 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){mergeCommitAllowed squashMergeAllowed rebaseMergeAllowed autoMergeAllowed viewerPermission pullRequest(number:$", "number", "){viewerCanUpdate viewerDidAuthor headRepository{viewerPermission}}}"] }
1022 ],
1023 fragments: []
1024 },
1025 variables: {
1026 owner: Schema.String,
1027 name: Schema.String,
1028 number: Shared.Int
1029 },
1030 result: Schema.Struct({
1031 /** Lookup a given repository by the owner and repository name. */
1032 repository: Schema.NullOr(ViewerPermissionsRepositoryRepository)
1033 })
1035export declare namespace ViewerPermissions {
1036 export type Variables = typeof ViewerPermissions.variables.Type
1037 export type Result = typeof ViewerPermissions.result.Type
1039​
1040/** A user is an individual's account on GitHub that owns repositories and can make new content. */
1041export const AssignableUsersNodesUser = Schema.Struct({
1042 /** The username used to login. */
1043 login: Schema.String,
1044 /** The user's public profile name. */
1045 name: Schema.NullOr(Schema.String),
1046 /** A URL pointing to the user's public avatar. */
1047 avatarUrl: Shared.URI
1049export interface AssignableUsersNodesUser extends Schema.Struct.Type<typeof AssignableUsersNodesUser.fields> {}
1050​
1051/** A list of users. */
1052export const UserConnection = Schema.Struct({
1053 /** Information to aid in pagination. */
1054 pageInfo: PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo,
1055 /** A list of nodes. */
1056 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(AssignableUsersNodesUser)))
1058export interface UserConnection extends Schema.Struct.Type<typeof UserConnection.fields> {}
1059​
1060/** Represents an object which can take actions on GitHub. Typically a User or Bot. */
1061export const Actor = Schema.Struct({
1062 __typename: GraphQL.otherTypename<Shared.Typename.Actor>()([]),
1063 /** The username of the actor. */
1064 login: Schema.String
1066export interface Actor extends Schema.Struct.Type<typeof Actor.fields> {}
1067​
1068/** A request for a user to review a pull request. */
1069export const ReviewerCandidatesRepositoryPullRequestReviewRequestsNodesReviewRequest = Schema.Struct({
1070 /** The reviewer that is requested. */
1071 requestedReviewer: Schema.NullOr(Schema.Union([
1072 PullRequestPreviewRepositoryPullRequestAuthorUser,
1073 Team,
1074 NodesBot,
1075 RequestedReviewerOther
1076 ]))
1078export interface ReviewerCandidatesRepositoryPullRequestReviewRequestsNodesReviewRequest extends Schema.Struct.Type<typeof ReviewerCandidatesRepositoryPullRequestReviewRequestsNodesReviewRequest.fields> {}
1079​
1080/** The connection type for ReviewRequest. */
1081export const ReviewerCandidatesRepositoryPullRequestReviewRequestsReviewRequestConnection = Schema.Struct({
1082 /** A list of nodes. */
1083 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(ReviewerCandidatesRepositoryPullRequestReviewRequestsNodesReviewRequest)))
1085export interface ReviewerCandidatesRepositoryPullRequestReviewRequestsReviewRequestConnection extends Schema.Struct.Type<typeof ReviewerCandidatesRepositoryPullRequestReviewRequestsReviewRequestConnection.fields> {}
1086​
1087/** A repository pull request. */
1088export const ReviewerCandidatesRepositoryPullRequestPullRequest = Schema.Struct({
1089 /** The actor who authored the comment. */
1090 author: Schema.NullOr(Actor),
1091 /** A list of review requests associated with the pull request. */
1092 reviewRequests: Schema.NullOr(ReviewerCandidatesRepositoryPullRequestReviewRequestsReviewRequestConnection)
1094export interface ReviewerCandidatesRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof ReviewerCandidatesRepositoryPullRequestPullRequest.fields> {}
1095​
1096/** A repository contains the content for a project. */
1097export const ReviewerCandidatesRepositoryRepository = Schema.Struct({
1098 /** A list of users that can be assigned to issues in this repository. */
1099 assignableUsers: UserConnection,
1100 /** Returns a single pull request from the current repository by number. */
1101 pullRequest: Schema.NullOr(ReviewerCandidatesRepositoryPullRequestPullRequest)
1103export interface ReviewerCandidatesRepositoryRepository extends Schema.Struct.Type<typeof ReviewerCandidatesRepositoryRepository.fields> {}
1104​
1105/** `query ReviewerCandidates` */
1106export const ReviewerCandidates = GraphQL.query("ReviewerCandidates", {
1107 document: {
1108 variables: [
1109 { name: "owner", body: "String!" },
1110 { name: "name", body: "String!" },
1111 { name: "number", body: "Int!" }
1112 ],
1113 selections: [
1114 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){assignableUsers(first:100){pageInfo{hasNextPage}nodes{login name avatarUrl}}pullRequest(number:$", "number", "){author{__typename login}reviewRequests(first:100){nodes{requestedReviewer{__typename...on User{login name avatarUrl}...on Team{slug combinedSlug teamName:name teamAvatarUrl:avatarUrl}...on Bot{login avatarUrl}}}}}}"] }
1115 ],
1116 fragments: []
1117 },
1118 variables: {
1119 owner: Schema.String,
1120 name: Schema.String,
1121 number: Shared.Int
1122 },
1123 result: Schema.Struct({
1124 /** Lookup a given repository by the owner and repository name. */
1125 repository: Schema.NullOr(ReviewerCandidatesRepositoryRepository)
1126 })
1128export declare namespace ReviewerCandidates {
1129 export type Variables = typeof ReviewerCandidates.variables.Type
1130 export type Result = typeof ReviewerCandidates.result.Type
1132​
1133/** A label for categorizing Issues, Pull Requests, Milestones, or Discussions with a given Repository. */
1134export const RepositoryLabelsNodesLabel = Schema.Struct({
1135 /** Identifies the label name. */
1136 name: Schema.String,
1137 /** Identifies the label color. */
1138 color: Schema.String,
1139 /** A brief description of this label. */
1140 description: Schema.NullOr(Schema.String)
1142export interface RepositoryLabelsNodesLabel extends Schema.Struct.Type<typeof RepositoryLabelsNodesLabel.fields> {}
1143​
1144/** The connection type for Label. */
1145export const RepositoryLabelsLabelConnection = Schema.Struct({
1146 /** Information to aid in pagination. */
1147 pageInfo: PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo,
1148 /** A list of nodes. */
1149 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(RepositoryLabelsNodesLabel)))
1151export interface RepositoryLabelsLabelConnection extends Schema.Struct.Type<typeof RepositoryLabelsLabelConnection.fields> {}
1152​
1153/** A label for categorizing Issues, Pull Requests, Milestones, or Discussions with a given Repository. */
1154export const LabelCandidatesRepositoryPullRequestLabelsNodesLabel = Schema.Struct({
1155 /** Identifies the label name. */
1156 name: Schema.String
1158export interface LabelCandidatesRepositoryPullRequestLabelsNodesLabel extends Schema.Struct.Type<typeof LabelCandidatesRepositoryPullRequestLabelsNodesLabel.fields> {}
1159​
1160/** The connection type for Label. */
1161export const LabelCandidatesRepositoryPullRequestLabelsLabelConnection = Schema.Struct({
1162 /** A list of nodes. */
1163 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(LabelCandidatesRepositoryPullRequestLabelsNodesLabel)))
1165export interface LabelCandidatesRepositoryPullRequestLabelsLabelConnection extends Schema.Struct.Type<typeof LabelCandidatesRepositoryPullRequestLabelsLabelConnection.fields> {}
1166​
1167/** A repository pull request. */
1168export const LabelCandidatesRepositoryPullRequestPullRequest = Schema.Struct({
1169 /** A list of labels associated with the object. */
1170 labels: Schema.NullOr(LabelCandidatesRepositoryPullRequestLabelsLabelConnection)
1172export interface LabelCandidatesRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof LabelCandidatesRepositoryPullRequestPullRequest.fields> {}
1173​
1174/** A repository contains the content for a project. */
1175export const LabelCandidatesRepositoryRepository = Schema.Struct({
1176 /** A list of labels associated with the repository. */
1177 labels: Schema.NullOr(RepositoryLabelsLabelConnection),
1178 /** Returns a single pull request from the current repository by number. */
1179 pullRequest: Schema.NullOr(LabelCandidatesRepositoryPullRequestPullRequest)
1181export interface LabelCandidatesRepositoryRepository extends Schema.Struct.Type<typeof LabelCandidatesRepositoryRepository.fields> {}
1182​
1183/** `query LabelCandidates` */
1184export const LabelCandidates = GraphQL.query("LabelCandidates", {
1185 document: {
1186 variables: [
1187 { name: "owner", body: "String!" },
1188 { name: "name", body: "String!" },
1189 { name: "number", body: "Int!" }
1190 ],
1191 selections: [
1192 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){labels(first:100 orderBy:{field:NAME direction:ASC}){pageInfo{hasNextPage}nodes{name color description}}pullRequest(number:$", "number", "){labels(first:100){nodes{name}}}}"] }
1193 ],
1194 fragments: []
1195 },
1196 variables: {
1197 owner: Schema.String,
1198 name: Schema.String,
1199 number: Shared.Int
1200 },
1201 result: Schema.Struct({
1202 /** Lookup a given repository by the owner and repository name. */
1203 repository: Schema.NullOr(LabelCandidatesRepositoryRepository)
1204 })
1206export declare namespace LabelCandidates {
1207 export type Variables = typeof LabelCandidates.variables.Type
1208 export type Result = typeof LabelCandidates.result.Type
1210​
1211/** A file changed in a pull request. */
1212export const PullRequestChangedFile = Schema.Struct({
1213 /** The path of the file. */
1214 path: Schema.String,
1215 /** The state of the file for the viewer. */
1216 viewerViewedState: GraphQL.enumLiterals(Shared.FileViewedState.literals)
1218export interface PullRequestChangedFile extends Schema.Struct.Type<typeof PullRequestChangedFile.fields> {}
1219​
1220/** The connection type for PullRequestChangedFile. */
1221export const PullRequestChangedFileConnection = Schema.Struct({
1222 /** Information to aid in pagination. */
1223 pageInfo: PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo,
1224 /** A list of nodes. */
1225 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PullRequestChangedFile)))
1227export interface PullRequestChangedFileConnection extends Schema.Struct.Type<typeof PullRequestChangedFileConnection.fields> {}
1228​
1229/** A repository pull request. */
1230export const PullRequestFilesViewedRepositoryPullRequestPullRequest = Schema.Struct({
1231 /** Lists the files changed within this pull request. */
1232 files: Schema.NullOr(PullRequestChangedFileConnection)
1234export interface PullRequestFilesViewedRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestFilesViewedRepositoryPullRequestPullRequest.fields> {}
1235​
1236/** A repository contains the content for a project. */
1237export const PullRequestFilesViewedRepositoryRepository = Schema.Struct({
1238 /** Returns a single pull request from the current repository by number. */
1239 pullRequest: Schema.NullOr(PullRequestFilesViewedRepositoryPullRequestPullRequest)
1241export interface PullRequestFilesViewedRepositoryRepository extends Schema.Struct.Type<typeof PullRequestFilesViewedRepositoryRepository.fields> {}
1242​
1243/** `query PullRequestFilesViewed` */
1244export const PullRequestFilesViewed = GraphQL.query("PullRequestFilesViewed", {
1245 document: {
1246 variables: [
1247 { name: "owner", body: "String!" },
1248 { name: "name", body: "String!" },
1249 { name: "number", body: "Int!" },
1250 { name: "after", body: "String" }
1251 ],
1252 selections: [
1253 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){files(first:100 after:$", "after", "){pageInfo{hasNextPage endCursor}nodes{path viewerViewedState}}}}"] }
1254 ],
1255 fragments: []
1256 },
1257 variables: {
1258 owner: Schema.String,
1259 name: Schema.String,
1260 number: Shared.Int,
1261 after: Schema.optional(Schema.NullOr(Schema.String))
1262 },
1263 result: Schema.Struct({
1264 /** Lookup a given repository by the owner and repository name. */
1265 repository: Schema.NullOr(PullRequestFilesViewedRepositoryRepository)
1266 })
1268export declare namespace PullRequestFilesViewed {
1269 export type Variables = typeof PullRequestFilesViewed.variables.Type
1270 export type Result = typeof PullRequestFilesViewed.result.Type
1272​
1273/** A repository pull request. */
1274export const PullRequestMergeMessageRepositoryPullRequestPullRequest = Schema.Struct({
1275 /** Indicates whether the pull request's base ref has a merge queue enabled. */
1276 isMergeQueueEnabled: Schema.Boolean,
1277 /** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
1278 headRefOid: Shared.GitObjectID,
1279 /** The merge body text for the viewer and method. */
1280 viewerMergeBodyText: Schema.String
1282export interface PullRequestMergeMessageRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestMergeMessageRepositoryPullRequestPullRequest.fields> {}
1283​
1284/** A repository contains the content for a project. */
1285export const PullRequestMergeMessageRepositoryRepository = Schema.Struct({
1286 /** Returns a single pull request from the current repository by number. */
1287 pullRequest: Schema.NullOr(PullRequestMergeMessageRepositoryPullRequestPullRequest)
1289export interface PullRequestMergeMessageRepositoryRepository extends Schema.Struct.Type<typeof PullRequestMergeMessageRepositoryRepository.fields> {}
1290​
1291/** `query PullRequestMergeMessage` */
1292export const PullRequestMergeMessage = GraphQL.query("PullRequestMergeMessage", {
1293 document: {
1294 variables: [
1295 { name: "owner", body: "String!" },
1296 { name: "name", body: "String!" },
1297 { name: "number", body: "Int!" },
1298 { name: "method", body: "PullRequestMergeMethod!" }
1299 ],
1300 selections: [
1301 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){isMergeQueueEnabled headRefOid viewerMergeBodyText(mergeType:$", "method", ")}}"] }
1302 ],
1303 fragments: []
1304 },
1305 variables: {
1306 owner: Schema.String,
1307 name: Schema.String,
1308 number: Shared.Int,
1309 method: Shared.PullRequestMergeMethod
1310 },
1311 result: Schema.Struct({
1312 /** Lookup a given repository by the owner and repository name. */
1313 repository: Schema.NullOr(PullRequestMergeMessageRepositoryRepository)
1314 })
1316export declare namespace PullRequestMergeMessage {
1317 export type Variables = typeof PullRequestMergeMessage.variables.Type
1318 export type Result = typeof PullRequestMergeMessage.result.Type
1320​
1321/** A repository pull request. */
1322export const PullRequestActionStateRepositoryPullRequestPullRequest = Schema.Struct({
1323 /** The Node ID of the PullRequest object */
1324 id: Shared.ID,
1325 /** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
1326 headRefOid: Shared.GitObjectID,
1327 /** Indicates whether the pull request's base ref has a merge queue enabled. */
1328 isMergeQueueEnabled: Schema.Boolean,
1329 /** Detailed information about the current pull request merge state status. */
1330 mergeStateStatus: GraphQL.enumLiterals(Shared.MergeStateStatus.literals),
1331 /** Identifies the base Ref associated with the pull request. */
1332 baseRef: Schema.NullOr(BaseRefRef)
1334export interface PullRequestActionStateRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestActionStateRepositoryPullRequestPullRequest.fields> {}
1335​
1336/** A repository contains the content for a project. */
1337export const PullRequestActionStateRepositoryRepository = Schema.Struct({
1338 /** Returns a single pull request from the current repository by number. */
1339 pullRequest: Schema.NullOr(PullRequestActionStateRepositoryPullRequestPullRequest)
1341export interface PullRequestActionStateRepositoryRepository extends Schema.Struct.Type<typeof PullRequestActionStateRepositoryRepository.fields> {}
1342​
1343/** `query PullRequestActionState` */
1344export const PullRequestActionState = GraphQL.query("PullRequestActionState", {
1345 document: {
1346 variables: [
1347 { name: "owner", body: "String!" },
1348 { name: "name", body: "String!" },
1349 { name: "number", body: "Int!" },
1350 { name: "headRef", body: "String!" }
1351 ],
1352 selections: [
1353 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){id headRefOid isMergeQueueEnabled mergeStateStatus baseRef{compare(headRef:$", "headRef", "){behindBy}}}}"] }
1354 ],
1355 fragments: []
1356 },
1357 variables: {
1358 owner: Schema.String,
1359 name: Schema.String,
1360 number: Shared.Int,
1361 headRef: Schema.String
1362 },
1363 result: Schema.Struct({
1364 /** Lookup a given repository by the owner and repository name. */
1365 repository: Schema.NullOr(PullRequestActionStateRepositoryRepository)
1366 })
1368export declare namespace PullRequestActionState {
1369 export type Variables = typeof PullRequestActionState.variables.Type
1370 export type Result = typeof PullRequestActionState.result.Type
1372​
1373/** A repository contains the content for a project. */
1374export const PullRequestBranchToDeleteRepositoryPullRequestHeadRepositoryRepository = Schema.Struct({
1375 /** The Node ID of the Repository object */
1376 id: Shared.ID
1378export interface PullRequestBranchToDeleteRepositoryPullRequestHeadRepositoryRepository extends Schema.Struct.Type<typeof PullRequestBranchToDeleteRepositoryPullRequestHeadRepositoryRepository.fields> {}
1379​
1380/** A repository pull request. */
1381export const PullRequestBranchToDeleteRepositoryPullRequestPullRequest = Schema.Struct({
1382 /** Identifies the state of the pull request. */
1383 state: GraphQL.enumLiterals(Shared.PullRequestState.literals),
1384 /** Identifies the name of the head Ref associated with the pull request, even if the ref has been deleted. */
1385 headRefName: Schema.String,
1386 /** Identifies the name of the base Ref associated with the pull request, even if the ref has been deleted. */
1387 baseRefName: Schema.String,
1388 /** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
1389 headRefOid: Shared.GitObjectID,
1390 /** The repository associated with this pull request's head Ref. */
1391 headRepository: Schema.NullOr(PullRequestBranchToDeleteRepositoryPullRequestHeadRepositoryRepository)
1393export interface PullRequestBranchToDeleteRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestBranchToDeleteRepositoryPullRequestPullRequest.fields> {}
1394​
1395/** A repository contains the content for a project. */
1396export const PullRequestBranchToDeleteRepositoryRepository = Schema.Struct({
1397 /** Returns a single pull request from the current repository by number. */
1398 pullRequest: Schema.NullOr(PullRequestBranchToDeleteRepositoryPullRequestPullRequest)
1400export interface PullRequestBranchToDeleteRepositoryRepository extends Schema.Struct.Type<typeof PullRequestBranchToDeleteRepositoryRepository.fields> {}
1401​
1402/** `query PullRequestBranchToDelete` */
1403export const PullRequestBranchToDelete = GraphQL.query("PullRequestBranchToDelete", {
1404 document: {
1405 variables: [
1406 { name: "owner", body: "String!" },
1407 { name: "name", body: "String!" },
1408 { name: "number", body: "Int!" }
1409 ],
1410 selections: [
1411 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){state headRefName baseRefName headRefOid headRepository{id}}}"] }
1412 ],
1413 fragments: []
1414 },
1415 variables: {
1416 owner: Schema.String,
1417 name: Schema.String,
1418 number: Shared.Int
1419 },
1420 result: Schema.Struct({
1421 /** Lookup a given repository by the owner and repository name. */
1422 repository: Schema.NullOr(PullRequestBranchToDeleteRepositoryRepository)
1423 })
1425export declare namespace PullRequestBranchToDelete {
1426 export type Variables = typeof PullRequestBranchToDelete.variables.Type
1427 export type Result = typeof PullRequestBranchToDelete.result.Type
1429​
1430/** Represents a Git reference. */
1431export const DefaultBranchRefRef = Schema.Struct({
1432 /** The ref name. */
1433 name: Schema.String
1435export interface DefaultBranchRefRef extends Schema.Struct.Type<typeof DefaultBranchRefRef.fields> {}
1436​
1437/** Represents a Git object. */
1438export const GitObject = Schema.Struct({
1439 __typename: GraphQL.otherTypename<Shared.Typename.GitObject>()([]),
1440 /** The Git object ID */
1441 oid: Shared.GitObjectID
1443export interface GitObject extends Schema.Struct.Type<typeof GitObject.fields> {}
1444​
1445/** Represents a Git reference. */
1446export const RefRef = Schema.Struct({
1447 /** The object the ref points to. Returns null when object does not exist. */
1448 target: Schema.NullOr(GitObject)
1450export interface RefRef extends Schema.Struct.Type<typeof RefRef.fields> {}
1451​
1452/** A repository contains the content for a project. */
1453export const NodeRepository = Schema.Struct({
1454 __typename: Schema.Literal("Repository"),
1455 /** The Ref associated with the repository's default branch. */
1456 defaultBranchRef: Schema.NullOr(DefaultBranchRefRef),
1457 /** Fetch a given ref from the repository */
1458 ref: Schema.NullOr(RefRef)
1460export interface NodeRepository extends Schema.Struct.Type<typeof NodeRepository.fields> {}
1461​
1462/** An object with an ID. */
1463export const PullRequestSourceBranchNodeNodeOther = Schema.Struct({
1464 __typename: GraphQL.otherTypename<Shared.Typename.Node>()(["Repository"])
1466export interface PullRequestSourceBranchNodeNodeOther extends Schema.Struct.Type<typeof PullRequestSourceBranchNodeNodeOther.fields> {}
1467​
1468/** `query PullRequestSourceBranch` */
1469export const PullRequestSourceBranch = GraphQL.query("PullRequestSourceBranch", {
1470 document: {
1471 variables: [
1472 { name: "repositoryId", body: "ID!" },
1473 { name: "ref", body: "String!" }
1474 ],
1475 selections: [
1476 { name: "node", body: ["(id:$", "repositoryId", "){__typename...on Repository{defaultBranchRef{name}ref(qualifiedName:$", "ref", "){target{__typename oid}}}}"] }
1477 ],
1478 fragments: []
1479 },
1480 variables: {
1481 repositoryId: Shared.ID,
1482 ref: Schema.String
1483 },
1484 result: Schema.Struct({
1485 /** Fetches an object given its ID. */
1486 node: Schema.NullOr(Schema.Union([
1487 NodeRepository,
1488 PullRequestSourceBranchNodeNodeOther
1489 ]))
1490 })
1492export declare namespace PullRequestSourceBranch {
1493 export type Variables = typeof PullRequestSourceBranch.variables.Type
1494 export type Result = typeof PullRequestSourceBranch.result.Type
1496​
1497/** Every operation in pullRequestReads.graphql. */
1498export const PullRequestReadsGraphQLGroup = GraphQLGroup.make(ActorAvatars, PullRequestCore, PullRequestCheckContexts, PullRequestPreview, PullRequestActivity, PullRequestHeads, PullRequestNodeId, PullRequestSubject, ViewerPermissions, ReviewerCandidates, LabelCandidates, PullRequestFilesViewed, PullRequestMergeMessage, PullRequestActionState, PullRequestBranchToDelete, PullRequestSourceBranch)