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

pullRequestReads.graphql.ts

1,490 lines71.5 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 /** The current status of this pull request with respect to code review. */
345 reviewDecision: Schema.NullOr(GraphQL.enumLiterals(Shared.PullRequestReviewDecision.literals)),
346 /** The number of additions in this pull request. */
347 additions: Shared.Int,
348 /** The number of deletions in this pull request. */
349 deletions: Shared.Int,
350 /** The number of changed files in this pull request. */
351 changedFiles: Shared.Int,
352 /** Identifies the date and time when the object was created. */
353 createdAt: Shared.DateTime,
354 /** Identifies the date and time when the object was last updated. */
355 updatedAt: Shared.DateTime,
356 /** The date and time that the pull request was merged. */
357 mergedAt: Schema.NullOr(Shared.DateTime),
358 /** Identifies the date and time when the object was closed. */
359 closedAt: Schema.NullOr(Shared.DateTime),
360 /** Identifies the name of the head Ref associated with the pull request, even if the ref has been deleted. */
361 headRefName: Schema.String,
362 /** Identifies the name of the base Ref associated with the pull request, even if the ref has been deleted. */
363 baseRefName: Schema.String,
364 /** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
365 headRefOid: Shared.GitObjectID,
366 /** The head and base repositories are different. */
367 isCrossRepository: Schema.Boolean,
368 /** The owner of the repository associated with this pull request's head Ref. */
369 headRepositoryOwner: Schema.NullOr(RepositoryOwner),
370 /** The repository associated with this pull request's head Ref. */
371 headRepository: Schema.NullOr(PullRequestCoreRepositoryPullRequestHeadRepositoryRepository),
372 /** Identifies the head Ref associated with the pull request. */
373 headRef: Schema.NullOr(HeadRefRef),
374 /** The actor who authored the comment. */
375 author: Schema.NullOr(Schema.Union([
376 PullRequestCoreRepositoryPullRequestAuthorUser,
377 ActorOther
378 ])),
379 /** Returns the auto-merge request object if one exists for this pull request. */
380 autoMergeRequest: Schema.NullOr(AutoMergeRequest),
381 /** Check if the current viewer can update this object. */
382 viewerCanUpdate: Schema.Boolean,
383 /** Did the viewer author this comment. */
384 viewerDidAuthor: Schema.Boolean,
385 /**
386 * Whether or not the viewer can update the head ref of this PR, by merging or rebasing the base ref.
387 * If the head ref is up to date or unable to be updated by this user, this will return false.
388 */
389 viewerCanUpdateBranch: Schema.Boolean,
390 /** Identifies the base Ref associated with the pull request. */
391 baseRef: Schema.NullOr(BaseRefRef),
392 /** A list of review requests associated with the pull request. */
393 reviewRequests: Schema.NullOr(PullRequestCoreRepositoryPullRequestReviewRequestsReviewRequestConnection),
394 /** A list of labels associated with the object. */
395 labels: Schema.NullOr(PullRequestCoreRepositoryPullRequestLabelsLabelConnection),
396 /** A list of commits present in this pull request's head branch not present in the base branch. */
397 commits: PullRequestCoreRepositoryPullRequestCommitsPullRequestCommitConnection
398})
399export interface PullRequestCoreRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestPullRequest.fields> {}
400​
401/** A repository contains the content for a project. */
402export const PullRequestCoreRepositoryRepository = Schema.Struct({
403 /** Whether or not PRs are merged with a merge commit on this repository. */
404 mergeCommitAllowed: Schema.Boolean,
405 /** Whether or not squash-merging is enabled on this repository. */
406 squashMergeAllowed: Schema.Boolean,
407 /** Whether or not rebase-merging is enabled on this repository. */
408 rebaseMergeAllowed: Schema.Boolean,
409 /** The users permission level on the repository. Will return null if authenticated as an GitHub App. */
410 viewerPermission: Schema.NullOr(GraphQL.enumLiterals(Shared.RepositoryPermission.literals)),
411 /** Returns a single pull request from the current repository by number. */
412 pullRequest: Schema.NullOr(PullRequestCoreRepositoryPullRequestPullRequest)
413})
414export interface PullRequestCoreRepositoryRepository extends Schema.Struct.Type<typeof PullRequestCoreRepositoryRepository.fields> {}
415​
416/** `query PullRequestCore` */
417export const PullRequestCore = GraphQL.query("PullRequestCore", {
418 document: {
419 variables: [
420 { name: "owner", body: "String!" },
421 { name: "name", body: "String!" },
422 { name: "number", body: "Int!" },
423 { name: "headRef", body: "String!" },
424 { name: "required", body: "Boolean!" }
425 ],
426 selections: [
427 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){mergeCommitAllowed squashMergeAllowed rebaseMergeAllowed viewerPermission pullRequest(number:$", "number", "){number title url body state isDraft mergeable 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:100){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}}}}}}}}"] }
428 ],
429 fragments: [
430 { 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}}}}}"] }
431 ]
432 },
433 variables: {
434 owner: Schema.String,
435 name: Schema.String,
436 number: Shared.Int,
437 headRef: Schema.String,
438 required: Schema.Boolean
439 },
440 result: Schema.Struct({
441 /** Lookup a given repository by the owner and repository name. */
442 repository: Schema.NullOr(PullRequestCoreRepositoryRepository)
443 })
444})
445export declare namespace PullRequestCore {
446 export type Variables = typeof PullRequestCore.variables.Type
447 export type Result = typeof PullRequestCore.result.Type
449​
450/** Information about pagination in a connection. */
451export const PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo = Schema.Struct({
452 /** When paginating forwards, are there more items? */
453 hasNextPage: Schema.Boolean,
454 /** When paginating forwards, the cursor to continue. */
455 endCursor: Schema.NullOr(Schema.String)
456})
457export interface PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo.fields> {}
458​
459/** The connection type for StatusCheckRollupContext. */
460export const PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsStatusCheckRollupContextConnection = Schema.Struct({
461 /** A list of nodes. */
462 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(CheckContext))),
463 /** Information to aid in pagination. */
464 pageInfo: PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo
465})
466export interface PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsStatusCheckRollupContextConnection extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsStatusCheckRollupContextConnection.fields> {}
467​
468/** Represents the rollup for both the check runs and status for a commit. */
469export const PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupStatusCheckRollup = Schema.Struct({
470 /** A list of status contexts and check runs for this commit. */
471 contexts: PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsStatusCheckRollupContextConnection
472})
473export interface PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupStatusCheckRollup extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupStatusCheckRollup.fields> {}
474​
475/** Represents a Git commit. */
476export const PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitCommit = Schema.Struct({
477 /** Check and Status rollup information for this commit. */
478 statusCheckRollup: Schema.NullOr(PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupStatusCheckRollup)
479})
480export interface PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitCommit extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitCommit.fields> {}
481​
482/** Represents a Git commit part of a pull request. */
483export const PullRequestCheckContextsRepositoryPullRequestCommitsNodesPullRequestCommit = Schema.Struct({
484 /** The Git commit object */
485 commit: PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitCommit
486})
487export interface PullRequestCheckContextsRepositoryPullRequestCommitsNodesPullRequestCommit extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryPullRequestCommitsNodesPullRequestCommit.fields> {}
488​
489/** The connection type for PullRequestCommit. */
490export const PullRequestCheckContextsRepositoryPullRequestCommitsPullRequestCommitConnection = Schema.Struct({
491 /** A list of nodes. */
492 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PullRequestCheckContextsRepositoryPullRequestCommitsNodesPullRequestCommit)))
493})
494export interface PullRequestCheckContextsRepositoryPullRequestCommitsPullRequestCommitConnection extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryPullRequestCommitsPullRequestCommitConnection.fields> {}
495​
496/** A repository pull request. */
497export const PullRequestCheckContextsRepositoryPullRequestPullRequest = Schema.Struct({
498 /** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
499 headRefOid: Shared.GitObjectID,
500 /** A list of commits present in this pull request's head branch not present in the base branch. */
501 commits: PullRequestCheckContextsRepositoryPullRequestCommitsPullRequestCommitConnection
502})
503export interface PullRequestCheckContextsRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryPullRequestPullRequest.fields> {}
504​
505/** A repository contains the content for a project. */
506export const PullRequestCheckContextsRepositoryRepository = Schema.Struct({
507 /** Returns a single pull request from the current repository by number. */
508 pullRequest: Schema.NullOr(PullRequestCheckContextsRepositoryPullRequestPullRequest)
509})
510export interface PullRequestCheckContextsRepositoryRepository extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryRepository.fields> {}
511​
512/** `query PullRequestCheckContexts` */
513export const PullRequestCheckContexts = GraphQL.query("PullRequestCheckContexts", {
514 document: {
515 variables: [
516 { name: "owner", body: "String!" },
517 { name: "name", body: "String!" },
518 { name: "number", body: "Int!" },
519 { name: "required", body: "Boolean!" },
520 { name: "after", body: "String" }
521 ],
522 selections: [
523 { 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}}}}}}}}"] }
524 ],
525 fragments: [
526 { 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}}}}}"] }
527 ]
528 },
529 variables: {
530 owner: Schema.String,
531 name: Schema.String,
532 number: Shared.Int,
533 required: Schema.Boolean,
534 after: Schema.optional(Schema.NullOr(Schema.String))
535 },
536 result: Schema.Struct({
537 /** Lookup a given repository by the owner and repository name. */
538 repository: Schema.NullOr(PullRequestCheckContextsRepositoryRepository)
539 })
540})
541export declare namespace PullRequestCheckContexts {
542 export type Variables = typeof PullRequestCheckContexts.variables.Type
543 export type Result = typeof PullRequestCheckContexts.result.Type
545​
546/** A user is an individual's account on GitHub that owns repositories and can make new content. */
547export const PullRequestPreviewRepositoryPullRequestAuthorUser = Schema.Struct({
548 __typename: Schema.Literal("User"),
549 /** The username used to login. */
550 login: Schema.String,
551 /** A URL pointing to the user's public avatar. */
552 avatarUrl: Shared.URI,
553 /** The user's public profile name. */
554 name: Schema.NullOr(Schema.String)
555})
556export interface PullRequestPreviewRepositoryPullRequestAuthorUser extends Schema.Struct.Type<typeof PullRequestPreviewRepositoryPullRequestAuthorUser.fields> {}
557​
558/** A repository pull request. */
559export const PullRequestPreviewRepositoryPullRequestPullRequest = Schema.Struct({
560 /** Identifies the pull request number. */
561 number: Shared.Int,
562 /** Identifies the pull request title. */
563 title: Schema.String,
564 /** The HTTP URL for this pull request. */
565 url: Shared.URI,
566 /** Identifies the state of the pull request. */
567 state: GraphQL.enumLiterals(Shared.PullRequestState.literals),
568 /** Identifies if the pull request is a draft. */
569 isDraft: Schema.Boolean,
570 /** Identifies the date and time when the object was created. */
571 createdAt: Shared.DateTime,
572 /** The actor who authored the comment. */
573 author: Schema.NullOr(Schema.Union([
574 PullRequestPreviewRepositoryPullRequestAuthorUser,
575 ActorOther
576 ]))
577})
578export interface PullRequestPreviewRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestPreviewRepositoryPullRequestPullRequest.fields> {}
579​
580/** A repository contains the content for a project. */
581export const PullRequestPreviewRepositoryRepository = Schema.Struct({
582 /** Returns a single pull request from the current repository by number. */
583 pullRequest: Schema.NullOr(PullRequestPreviewRepositoryPullRequestPullRequest)
584})
585export interface PullRequestPreviewRepositoryRepository extends Schema.Struct.Type<typeof PullRequestPreviewRepositoryRepository.fields> {}
586​
587/** `query PullRequestPreview` */
588export const PullRequestPreview = GraphQL.query("PullRequestPreview", {
589 document: {
590 variables: [
591 { name: "owner", body: "String!" },
592 { name: "name", body: "String!" },
593 { name: "number", body: "Int!" }
594 ],
595 selections: [
596 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){number title url state isDraft createdAt author{__typename login avatarUrl...on User{name}}}}"] }
597 ],
598 fragments: []
599 },
600 variables: {
601 owner: Schema.String,
602 name: Schema.String,
603 number: Shared.Int
604 },
605 result: Schema.Struct({
606 /** Lookup a given repository by the owner and repository name. */
607 repository: Schema.NullOr(PullRequestPreviewRepositoryRepository)
608 })
609})
610export declare namespace PullRequestPreview {
611 export type Variables = typeof PullRequestPreview.variables.Type
612 export type Result = typeof PullRequestPreview.result.Type
614​
615/** A user is an individual's account on GitHub that owns repositories and can make new content. */
616export const UserUser = Schema.Struct({
617 /** The username used to login. */
618 login: Schema.String
619})
620export interface UserUser extends Schema.Struct.Type<typeof UserUser.fields> {}
621​
622/** Represents an actor in a Git commit (ie. an author or committer). */
623export const GitActor = Schema.Struct({
624 /** The name in the Git commit. */
625 name: Schema.NullOr(Schema.String),
626 /** The email in the Git commit. */
627 email: Schema.NullOr(Schema.String),
628 /** The GitHub user corresponding to the email field. Null if no such user exists. */
629 user: Schema.NullOr(UserUser)
630})
631export interface GitActor extends Schema.Struct.Type<typeof GitActor.fields> {}
632​
633/** The connection type for GitActor. */
634export const GitActorConnection = Schema.Struct({
635 /** A list of nodes. */
636 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(GitActor)))
637})
638export interface GitActorConnection extends Schema.Struct.Type<typeof GitActorConnection.fields> {}
639​
640/** Represents a Git commit. */
641export const PullRequestActivityRepositoryPullRequestCommitsNodesCommitCommit = Schema.Struct({
642 /** The Git object ID */
643 oid: Shared.GitObjectID,
644 /** The Git commit message headline */
645 messageHeadline: Schema.String,
646 /** The datetime when this commit was committed. */
647 committedDate: Shared.DateTime,
648 /**
649 * The list of authors for this commit based on the git author and the Co-authored-by
650 * message trailer. The git author will always be first.
651 */
652 authors: GitActorConnection
653})
654export interface PullRequestActivityRepositoryPullRequestCommitsNodesCommitCommit extends Schema.Struct.Type<typeof PullRequestActivityRepositoryPullRequestCommitsNodesCommitCommit.fields> {}
655​
656/** Represents a Git commit part of a pull request. */
657export const PullRequestActivityRepositoryPullRequestCommitsNodesPullRequestCommit = Schema.Struct({
658 /** The Git commit object */
659 commit: PullRequestActivityRepositoryPullRequestCommitsNodesCommitCommit
660})
661export interface PullRequestActivityRepositoryPullRequestCommitsNodesPullRequestCommit extends Schema.Struct.Type<typeof PullRequestActivityRepositoryPullRequestCommitsNodesPullRequestCommit.fields> {}
662​
663/** The connection type for PullRequestCommit. */
664export const PullRequestActivityRepositoryPullRequestCommitsPullRequestCommitConnection = Schema.Struct({
665 /** A list of nodes. */
666 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PullRequestActivityRepositoryPullRequestCommitsNodesPullRequestCommit)))
667})
668export interface PullRequestActivityRepositoryPullRequestCommitsPullRequestCommitConnection extends Schema.Struct.Type<typeof PullRequestActivityRepositoryPullRequestCommitsPullRequestCommitConnection.fields> {}
669​
670/** Represents a comment on an Issue. */
671export const NodesIssueComment = Schema.Struct({
672 /** The Node ID of the IssueComment object */
673 id: Shared.ID,
674 /** The body as Markdown. */
675 body: Schema.String,
676 /** Identifies the date and time when the object was created. */
677 createdAt: Shared.DateTime,
678 /** The moment the editor made the last edit */
679 lastEditedAt: Schema.NullOr(Shared.DateTime),
680 /** The HTTP URL for this issue comment */
681 url: Shared.URI,
682 /** The actor who authored the comment. */
683 author: Schema.NullOr(Schema.Union([
684 PullRequestPreviewRepositoryPullRequestAuthorUser,
685 ActorOther
686 ]))
687})
688export interface NodesIssueComment extends Schema.Struct.Type<typeof NodesIssueComment.fields> {}
689​
690/** The connection type for IssueComment. */
691export const IssueCommentConnection = Schema.Struct({
692 /** Information to aid in pagination. */
693 pageInfo: PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo,
694 /** A list of nodes. */
695 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(NodesIssueComment)))
696})
697export interface IssueCommentConnection extends Schema.Struct.Type<typeof IssueCommentConnection.fields> {}
698​
699/** A review object for a given pull request. */
700export const NodesPullRequestReview = Schema.Struct({
701 /** The Node ID of the PullRequestReview object */
702 id: Shared.ID,
703 /** Identifies the pull request review body. */
704 body: Schema.String,
705 /** Identifies the current state of the pull request review. */
706 state: GraphQL.enumLiterals(Shared.PullRequestReviewState.literals),
707 /** Identifies when the Pull Request Review was submitted */
708 submittedAt: Schema.NullOr(Shared.DateTime),
709 /** The moment the editor made the last edit */
710 lastEditedAt: Schema.NullOr(Shared.DateTime),
711 /** The HTTP URL permalink for this PullRequestReview. */
712 url: Shared.URI,
713 /** The actor who authored the comment. */
714 author: Schema.NullOr(Schema.Union([
715 PullRequestPreviewRepositoryPullRequestAuthorUser,
716 ActorOther
717 ]))
718})
719export interface NodesPullRequestReview extends Schema.Struct.Type<typeof NodesPullRequestReview.fields> {}
720​
721/** The connection type for PullRequestReview. */
722export const PullRequestReviewConnection = Schema.Struct({
723 /** Information to aid in pagination. */
724 pageInfo: PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo,
725 /** A list of nodes. */
726 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(NodesPullRequestReview)))
727})
728export interface PullRequestReviewConnection extends Schema.Struct.Type<typeof PullRequestReviewConnection.fields> {}
729​
730/** A repository pull request. */
731export const PullRequestActivityRepositoryPullRequestPullRequest = Schema.Struct({
732 /** The actor who authored the comment. */
733 author: Schema.optionalKey(Schema.NullOr(Schema.Union([
734 PullRequestPreviewRepositoryPullRequestAuthorUser,
735 ActorOther
736 ]))),
737 /** A list of commits present in this pull request's head branch not present in the base branch. */
738 commits: Schema.optionalKey(PullRequestActivityRepositoryPullRequestCommitsPullRequestCommitConnection),
739 /** A list of comments associated with the pull request. */
740 comments: Schema.optionalKey(IssueCommentConnection),
741 /** A list of reviews associated with the pull request. */
742 reviews: Schema.optionalKey(Schema.NullOr(PullRequestReviewConnection))
743})
744export interface PullRequestActivityRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestActivityRepositoryPullRequestPullRequest.fields> {}
745​
746/** A repository contains the content for a project. */
747export const PullRequestActivityRepositoryRepository = Schema.Struct({
748 /** Returns a single pull request from the current repository by number. */
749 pullRequest: Schema.NullOr(PullRequestActivityRepositoryPullRequestPullRequest)
750})
751export interface PullRequestActivityRepositoryRepository extends Schema.Struct.Type<typeof PullRequestActivityRepositoryRepository.fields> {}
752​
753/** `query PullRequestActivity` */
754export const PullRequestActivity = GraphQL.query("PullRequestActivity", {
755 document: {
756 variables: [
757 { name: "owner", body: "String!" },
758 { name: "name", body: "String!" },
759 { name: "number", body: "Int!" },
760 { name: "head", body: "Boolean!" },
761 { name: "withComments", body: "Boolean!" },
762 { name: "commentsAfter", body: "String" },
763 { name: "withReviews", body: "Boolean!" },
764 { name: "reviewsAfter", body: "String" }
765 ],
766 selections: [
767 { 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}}}}}}"] }
768 ],
769 fragments: []
770 },
771 variables: {
772 owner: Schema.String,
773 name: Schema.String,
774 number: Shared.Int,
775 head: Schema.Boolean,
776 withComments: Schema.Boolean,
777 commentsAfter: Schema.optional(Schema.NullOr(Schema.String)),
778 withReviews: Schema.Boolean,
779 reviewsAfter: Schema.optional(Schema.NullOr(Schema.String))
780 },
781 result: Schema.Struct({
782 /** Lookup a given repository by the owner and repository name. */
783 repository: Schema.NullOr(PullRequestActivityRepositoryRepository)
784 })
785})
786export declare namespace PullRequestActivity {
787 export type Variables = typeof PullRequestActivity.variables.Type
788 export type Result = typeof PullRequestActivity.result.Type
790​
791/** A repository pull request. */
792export const NodesPullRequest = Schema.Struct({
793 /** Identifies the pull request number. */
794 number: Shared.Int,
795 /** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
796 headRefOid: Shared.GitObjectID,
797 /** The head and base repositories are different. */
798 isCrossRepository: Schema.Boolean,
799 /** The owner of the repository associated with this pull request's head Ref. */
800 headRepositoryOwner: Schema.NullOr(RepositoryOwner)
801})
802export interface NodesPullRequest extends Schema.Struct.Type<typeof NodesPullRequest.fields> {}
803​
804/** The connection type for PullRequest. */
805export const PullRequestConnection = Schema.Struct({
806 /** Information to aid in pagination. */
807 pageInfo: PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo,
808 /** A list of nodes. */
809 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(NodesPullRequest)))
810})
811export interface PullRequestConnection extends Schema.Struct.Type<typeof PullRequestConnection.fields> {}
812​
813/** A repository contains the content for a project. */
814export const PullRequestHeadsRepositoryRepository = Schema.Struct({
815 /** A list of pull requests that have been opened in the repository. */
816 pullRequests: PullRequestConnection
817})
818export interface PullRequestHeadsRepositoryRepository extends Schema.Struct.Type<typeof PullRequestHeadsRepositoryRepository.fields> {}
819​
820/** `query PullRequestHeads` */
821export const PullRequestHeads = GraphQL.query("PullRequestHeads", {
822 document: {
823 variables: [
824 { name: "owner", body: "String!" },
825 { name: "name", body: "String!" },
826 { name: "head", body: "String!" },
827 { name: "after", body: "String" }
828 ],
829 selections: [
830 { 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}}}}"] }
831 ],
832 fragments: []
833 },
834 variables: {
835 owner: Schema.String,
836 name: Schema.String,
837 head: Schema.String,
838 after: Schema.optional(Schema.NullOr(Schema.String))
839 },
840 result: Schema.Struct({
841 /** Lookup a given repository by the owner and repository name. */
842 repository: Schema.NullOr(PullRequestHeadsRepositoryRepository)
843 })
844})
845export declare namespace PullRequestHeads {
846 export type Variables = typeof PullRequestHeads.variables.Type
847 export type Result = typeof PullRequestHeads.result.Type
849​
850/** A repository pull request. */
851export const PullRequestNodeIdRepositoryPullRequestPullRequest = Schema.Struct({
852 /** The Node ID of the PullRequest object */
853 id: Shared.ID
854})
855export interface PullRequestNodeIdRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestNodeIdRepositoryPullRequestPullRequest.fields> {}
856​
857/** A repository contains the content for a project. */
858export const PullRequestNodeIdRepositoryRepository = Schema.Struct({
859 /** Returns a single pull request from the current repository by number. */
860 pullRequest: Schema.NullOr(PullRequestNodeIdRepositoryPullRequestPullRequest)
861})
862export interface PullRequestNodeIdRepositoryRepository extends Schema.Struct.Type<typeof PullRequestNodeIdRepositoryRepository.fields> {}
863​
864/** `query PullRequestNodeId` */
865export const PullRequestNodeId = GraphQL.query("PullRequestNodeId", {
866 document: {
867 variables: [
868 { name: "owner", body: "String!" },
869 { name: "name", body: "String!" },
870 { name: "number", body: "Int!" }
871 ],
872 selections: [
873 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){id}}"] }
874 ],
875 fragments: []
876 },
877 variables: {
878 owner: Schema.String,
879 name: Schema.String,
880 number: Shared.Int
881 },
882 result: Schema.Struct({
883 /** Lookup a given repository by the owner and repository name. */
884 repository: Schema.NullOr(PullRequestNodeIdRepositoryRepository)
885 })
886})
887export declare namespace PullRequestNodeId {
888 export type Variables = typeof PullRequestNodeId.variables.Type
889 export type Result = typeof PullRequestNodeId.result.Type
891​
892/** Represents a comment on an Issue. */
893export const NodeIssueComment = Schema.Struct({
894 __typename: Schema.Literal("IssueComment"),
895 /** The Node ID of the IssueComment object */
896 id: Shared.ID,
897 /**
898 * Returns the pull request associated with the comment, if this comment was made on a
899 * pull request.
900 */
901 pullRequest: Schema.NullOr(PullRequestNodeIdRepositoryPullRequestPullRequest)
902})
903export interface NodeIssueComment extends Schema.Struct.Type<typeof NodeIssueComment.fields> {}
904​
905/** A review comment associated with a given repository pull request. */
906export const PullRequestReviewComment = Schema.Struct({
907 __typename: Schema.Literal("PullRequestReviewComment"),
908 /** The Node ID of the PullRequestReviewComment object */
909 id: Shared.ID,
910 /** The pull request associated with this review comment. */
911 reviewCommentPullRequest: PullRequestNodeIdRepositoryPullRequestPullRequest
912})
913export interface PullRequestReviewComment extends Schema.Struct.Type<typeof PullRequestReviewComment.fields> {}
914​
915/** A review object for a given pull request. */
916export const NodePullRequestReview = Schema.Struct({
917 __typename: Schema.Literal("PullRequestReview"),
918 /** The Node ID of the PullRequestReview object */
919 id: Shared.ID,
920 /** Identifies the pull request associated with this pull request review. */
921 reviewPullRequest: PullRequestNodeIdRepositoryPullRequestPullRequest
922})
923export interface NodePullRequestReview extends Schema.Struct.Type<typeof NodePullRequestReview.fields> {}
924​
925/** An object with an ID. */
926export const PullRequestSubjectNodeNodeOther = Schema.Struct({
927 __typename: GraphQL.otherTypename<Shared.Typename.Node>()(["IssueComment", "PullRequestReviewComment", "PullRequestReview"]),
928 /** ID of the object. */
929 id: Shared.ID
930})
931export interface PullRequestSubjectNodeNodeOther extends Schema.Struct.Type<typeof PullRequestSubjectNodeNodeOther.fields> {}
932​
933/** `query PullRequestSubject` */
934export const PullRequestSubject = GraphQL.query("PullRequestSubject", {
935 document: {
936 variables: [
937 { name: "owner", body: "String!" },
938 { name: "name", body: "String!" },
939 { name: "number", body: "Int!" },
940 { name: "subjectId", body: "ID!" }
941 ],
942 selections: [
943 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){id}}"] },
944 { name: "node", body: ["(id:$", "subjectId", "){__typename id...on IssueComment{pullRequest{id}}...on PullRequestReviewComment{reviewCommentPullRequest:pullRequest{id}}...on PullRequestReview{reviewPullRequest:pullRequest{id}}}"] }
945 ],
946 fragments: []
947 },
948 variables: {
949 owner: Schema.String,
950 name: Schema.String,
951 number: Shared.Int,
952 subjectId: Shared.ID
953 },
954 result: Schema.Struct({
955 /** Lookup a given repository by the owner and repository name. */
956 repository: Schema.NullOr(PullRequestNodeIdRepositoryRepository),
957 /** Fetches an object given its ID. */
958 node: Schema.NullOr(Schema.Union([
959 NodeIssueComment,
960 PullRequestReviewComment,
961 NodePullRequestReview,
962 PullRequestSubjectNodeNodeOther
963 ]))
964 })
965})
966export declare namespace PullRequestSubject {
967 export type Variables = typeof PullRequestSubject.variables.Type
968 export type Result = typeof PullRequestSubject.result.Type
970​
971/** A repository contains the content for a project. */
972export const ViewerPermissionsRepositoryPullRequestHeadRepositoryRepository = Schema.Struct({
973 /** The users permission level on the repository. Will return null if authenticated as an GitHub App. */
974 viewerPermission: Schema.NullOr(GraphQL.enumLiterals(Shared.RepositoryPermission.literals))
975})
976export interface ViewerPermissionsRepositoryPullRequestHeadRepositoryRepository extends Schema.Struct.Type<typeof ViewerPermissionsRepositoryPullRequestHeadRepositoryRepository.fields> {}
977​
978/** A repository pull request. */
979export const ViewerPermissionsRepositoryPullRequestPullRequest = Schema.Struct({
980 /** Check if the current viewer can update this object. */
981 viewerCanUpdate: Schema.Boolean,
982 /** Did the viewer author this comment. */
983 viewerDidAuthor: Schema.Boolean,
984 /** The repository associated with this pull request's head Ref. */
985 headRepository: Schema.NullOr(ViewerPermissionsRepositoryPullRequestHeadRepositoryRepository)
986})
987export interface ViewerPermissionsRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof ViewerPermissionsRepositoryPullRequestPullRequest.fields> {}
988​
989/** A repository contains the content for a project. */
990export const ViewerPermissionsRepositoryRepository = Schema.Struct({
991 /** Whether or not PRs are merged with a merge commit on this repository. */
992 mergeCommitAllowed: Schema.Boolean,
993 /** Whether or not squash-merging is enabled on this repository. */
994 squashMergeAllowed: Schema.Boolean,
995 /** Whether or not rebase-merging is enabled on this repository. */
996 rebaseMergeAllowed: Schema.Boolean,
997 /** The users permission level on the repository. Will return null if authenticated as an GitHub App. */
998 viewerPermission: Schema.NullOr(GraphQL.enumLiterals(Shared.RepositoryPermission.literals)),
999 /** Returns a single pull request from the current repository by number. */
1000 pullRequest: Schema.NullOr(ViewerPermissionsRepositoryPullRequestPullRequest)
1002export interface ViewerPermissionsRepositoryRepository extends Schema.Struct.Type<typeof ViewerPermissionsRepositoryRepository.fields> {}
1003​
1004/** `query ViewerPermissions` */
1005export const ViewerPermissions = GraphQL.query("ViewerPermissions", {
1006 document: {
1007 variables: [
1008 { name: "owner", body: "String!" },
1009 { name: "name", body: "String!" },
1010 { name: "number", body: "Int!" }
1011 ],
1012 selections: [
1013 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){mergeCommitAllowed squashMergeAllowed rebaseMergeAllowed viewerPermission pullRequest(number:$", "number", "){viewerCanUpdate viewerDidAuthor headRepository{viewerPermission}}}"] }
1014 ],
1015 fragments: []
1016 },
1017 variables: {
1018 owner: Schema.String,
1019 name: Schema.String,
1020 number: Shared.Int
1021 },
1022 result: Schema.Struct({
1023 /** Lookup a given repository by the owner and repository name. */
1024 repository: Schema.NullOr(ViewerPermissionsRepositoryRepository)
1025 })
1027export declare namespace ViewerPermissions {
1028 export type Variables = typeof ViewerPermissions.variables.Type
1029 export type Result = typeof ViewerPermissions.result.Type
1031​
1032/** A user is an individual's account on GitHub that owns repositories and can make new content. */
1033export const AssignableUsersNodesUser = Schema.Struct({
1034 /** The username used to login. */
1035 login: Schema.String,
1036 /** The user's public profile name. */
1037 name: Schema.NullOr(Schema.String),
1038 /** A URL pointing to the user's public avatar. */
1039 avatarUrl: Shared.URI
1041export interface AssignableUsersNodesUser extends Schema.Struct.Type<typeof AssignableUsersNodesUser.fields> {}
1042​
1043/** A list of users. */
1044export const UserConnection = Schema.Struct({
1045 /** Information to aid in pagination. */
1046 pageInfo: PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo,
1047 /** A list of nodes. */
1048 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(AssignableUsersNodesUser)))
1050export interface UserConnection extends Schema.Struct.Type<typeof UserConnection.fields> {}
1051​
1052/** Represents an object which can take actions on GitHub. Typically a User or Bot. */
1053export const Actor = Schema.Struct({
1054 __typename: GraphQL.otherTypename<Shared.Typename.Actor>()([]),
1055 /** The username of the actor. */
1056 login: Schema.String
1058export interface Actor extends Schema.Struct.Type<typeof Actor.fields> {}
1059​
1060/** A request for a user to review a pull request. */
1061export const ReviewerCandidatesRepositoryPullRequestReviewRequestsNodesReviewRequest = Schema.Struct({
1062 /** The reviewer that is requested. */
1063 requestedReviewer: Schema.NullOr(Schema.Union([
1064 PullRequestPreviewRepositoryPullRequestAuthorUser,
1065 Team,
1066 NodesBot,
1067 RequestedReviewerOther
1068 ]))
1070export interface ReviewerCandidatesRepositoryPullRequestReviewRequestsNodesReviewRequest extends Schema.Struct.Type<typeof ReviewerCandidatesRepositoryPullRequestReviewRequestsNodesReviewRequest.fields> {}
1071​
1072/** The connection type for ReviewRequest. */
1073export const ReviewerCandidatesRepositoryPullRequestReviewRequestsReviewRequestConnection = Schema.Struct({
1074 /** A list of nodes. */
1075 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(ReviewerCandidatesRepositoryPullRequestReviewRequestsNodesReviewRequest)))
1077export interface ReviewerCandidatesRepositoryPullRequestReviewRequestsReviewRequestConnection extends Schema.Struct.Type<typeof ReviewerCandidatesRepositoryPullRequestReviewRequestsReviewRequestConnection.fields> {}
1078​
1079/** A repository pull request. */
1080export const ReviewerCandidatesRepositoryPullRequestPullRequest = Schema.Struct({
1081 /** The actor who authored the comment. */
1082 author: Schema.NullOr(Actor),
1083 /** A list of review requests associated with the pull request. */
1084 reviewRequests: Schema.NullOr(ReviewerCandidatesRepositoryPullRequestReviewRequestsReviewRequestConnection)
1086export interface ReviewerCandidatesRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof ReviewerCandidatesRepositoryPullRequestPullRequest.fields> {}
1087​
1088/** A repository contains the content for a project. */
1089export const ReviewerCandidatesRepositoryRepository = Schema.Struct({
1090 /** A list of users that can be assigned to issues in this repository. */
1091 assignableUsers: UserConnection,
1092 /** Returns a single pull request from the current repository by number. */
1093 pullRequest: Schema.NullOr(ReviewerCandidatesRepositoryPullRequestPullRequest)
1095export interface ReviewerCandidatesRepositoryRepository extends Schema.Struct.Type<typeof ReviewerCandidatesRepositoryRepository.fields> {}
1096​
1097/** `query ReviewerCandidates` */
1098export const ReviewerCandidates = GraphQL.query("ReviewerCandidates", {
1099 document: {
1100 variables: [
1101 { name: "owner", body: "String!" },
1102 { name: "name", body: "String!" },
1103 { name: "number", body: "Int!" }
1104 ],
1105 selections: [
1106 { 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}}}}}}"] }
1107 ],
1108 fragments: []
1109 },
1110 variables: {
1111 owner: Schema.String,
1112 name: Schema.String,
1113 number: Shared.Int
1114 },
1115 result: Schema.Struct({
1116 /** Lookup a given repository by the owner and repository name. */
1117 repository: Schema.NullOr(ReviewerCandidatesRepositoryRepository)
1118 })
1120export declare namespace ReviewerCandidates {
1121 export type Variables = typeof ReviewerCandidates.variables.Type
1122 export type Result = typeof ReviewerCandidates.result.Type
1124​
1125/** A label for categorizing Issues, Pull Requests, Milestones, or Discussions with a given Repository. */
1126export const RepositoryLabelsNodesLabel = Schema.Struct({
1127 /** Identifies the label name. */
1128 name: Schema.String,
1129 /** Identifies the label color. */
1130 color: Schema.String,
1131 /** A brief description of this label. */
1132 description: Schema.NullOr(Schema.String)
1134export interface RepositoryLabelsNodesLabel extends Schema.Struct.Type<typeof RepositoryLabelsNodesLabel.fields> {}
1135​
1136/** The connection type for Label. */
1137export const RepositoryLabelsLabelConnection = Schema.Struct({
1138 /** Information to aid in pagination. */
1139 pageInfo: PullRequestCoreRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo,
1140 /** A list of nodes. */
1141 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(RepositoryLabelsNodesLabel)))
1143export interface RepositoryLabelsLabelConnection extends Schema.Struct.Type<typeof RepositoryLabelsLabelConnection.fields> {}
1144​
1145/** A label for categorizing Issues, Pull Requests, Milestones, or Discussions with a given Repository. */
1146export const LabelCandidatesRepositoryPullRequestLabelsNodesLabel = Schema.Struct({
1147 /** Identifies the label name. */
1148 name: Schema.String
1150export interface LabelCandidatesRepositoryPullRequestLabelsNodesLabel extends Schema.Struct.Type<typeof LabelCandidatesRepositoryPullRequestLabelsNodesLabel.fields> {}
1151​
1152/** The connection type for Label. */
1153export const LabelCandidatesRepositoryPullRequestLabelsLabelConnection = Schema.Struct({
1154 /** A list of nodes. */
1155 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(LabelCandidatesRepositoryPullRequestLabelsNodesLabel)))
1157export interface LabelCandidatesRepositoryPullRequestLabelsLabelConnection extends Schema.Struct.Type<typeof LabelCandidatesRepositoryPullRequestLabelsLabelConnection.fields> {}
1158​
1159/** A repository pull request. */
1160export const LabelCandidatesRepositoryPullRequestPullRequest = Schema.Struct({
1161 /** A list of labels associated with the object. */
1162 labels: Schema.NullOr(LabelCandidatesRepositoryPullRequestLabelsLabelConnection)
1164export interface LabelCandidatesRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof LabelCandidatesRepositoryPullRequestPullRequest.fields> {}
1165​
1166/** A repository contains the content for a project. */
1167export const LabelCandidatesRepositoryRepository = Schema.Struct({
1168 /** A list of labels associated with the repository. */
1169 labels: Schema.NullOr(RepositoryLabelsLabelConnection),
1170 /** Returns a single pull request from the current repository by number. */
1171 pullRequest: Schema.NullOr(LabelCandidatesRepositoryPullRequestPullRequest)
1173export interface LabelCandidatesRepositoryRepository extends Schema.Struct.Type<typeof LabelCandidatesRepositoryRepository.fields> {}
1174​
1175/** `query LabelCandidates` */
1176export const LabelCandidates = GraphQL.query("LabelCandidates", {
1177 document: {
1178 variables: [
1179 { name: "owner", body: "String!" },
1180 { name: "name", body: "String!" },
1181 { name: "number", body: "Int!" }
1182 ],
1183 selections: [
1184 { 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}}}}"] }
1185 ],
1186 fragments: []
1187 },
1188 variables: {
1189 owner: Schema.String,
1190 name: Schema.String,
1191 number: Shared.Int
1192 },
1193 result: Schema.Struct({
1194 /** Lookup a given repository by the owner and repository name. */
1195 repository: Schema.NullOr(LabelCandidatesRepositoryRepository)
1196 })
1198export declare namespace LabelCandidates {
1199 export type Variables = typeof LabelCandidates.variables.Type
1200 export type Result = typeof LabelCandidates.result.Type
1202​
1203/** A file changed in a pull request. */
1204export const PullRequestChangedFile = Schema.Struct({
1205 /** The path of the file. */
1206 path: Schema.String,
1207 /** The state of the file for the viewer. */
1208 viewerViewedState: GraphQL.enumLiterals(Shared.FileViewedState.literals)
1210export interface PullRequestChangedFile extends Schema.Struct.Type<typeof PullRequestChangedFile.fields> {}
1211​
1212/** The connection type for PullRequestChangedFile. */
1213export const PullRequestChangedFileConnection = Schema.Struct({
1214 /** Information to aid in pagination. */
1215 pageInfo: PullRequestCheckContextsRepositoryPullRequestCommitsNodesCommitStatusCheckRollupContextsPageInfoPageInfo,
1216 /** A list of nodes. */
1217 nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PullRequestChangedFile)))
1219export interface PullRequestChangedFileConnection extends Schema.Struct.Type<typeof PullRequestChangedFileConnection.fields> {}
1220​
1221/** A repository pull request. */
1222export const PullRequestFilesViewedRepositoryPullRequestPullRequest = Schema.Struct({
1223 /** Lists the files changed within this pull request. */
1224 files: Schema.NullOr(PullRequestChangedFileConnection)
1226export interface PullRequestFilesViewedRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestFilesViewedRepositoryPullRequestPullRequest.fields> {}
1227​
1228/** A repository contains the content for a project. */
1229export const PullRequestFilesViewedRepositoryRepository = Schema.Struct({
1230 /** Returns a single pull request from the current repository by number. */
1231 pullRequest: Schema.NullOr(PullRequestFilesViewedRepositoryPullRequestPullRequest)
1233export interface PullRequestFilesViewedRepositoryRepository extends Schema.Struct.Type<typeof PullRequestFilesViewedRepositoryRepository.fields> {}
1234​
1235/** `query PullRequestFilesViewed` */
1236export const PullRequestFilesViewed = GraphQL.query("PullRequestFilesViewed", {
1237 document: {
1238 variables: [
1239 { name: "owner", body: "String!" },
1240 { name: "name", body: "String!" },
1241 { name: "number", body: "Int!" },
1242 { name: "after", body: "String" }
1243 ],
1244 selections: [
1245 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){files(first:100 after:$", "after", "){pageInfo{hasNextPage endCursor}nodes{path viewerViewedState}}}}"] }
1246 ],
1247 fragments: []
1248 },
1249 variables: {
1250 owner: Schema.String,
1251 name: Schema.String,
1252 number: Shared.Int,
1253 after: Schema.optional(Schema.NullOr(Schema.String))
1254 },
1255 result: Schema.Struct({
1256 /** Lookup a given repository by the owner and repository name. */
1257 repository: Schema.NullOr(PullRequestFilesViewedRepositoryRepository)
1258 })
1260export declare namespace PullRequestFilesViewed {
1261 export type Variables = typeof PullRequestFilesViewed.variables.Type
1262 export type Result = typeof PullRequestFilesViewed.result.Type
1264​
1265/** A repository pull request. */
1266export const PullRequestMergeMessageRepositoryPullRequestPullRequest = Schema.Struct({
1267 /** Indicates whether the pull request's base ref has a merge queue enabled. */
1268 isMergeQueueEnabled: Schema.Boolean,
1269 /** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
1270 headRefOid: Shared.GitObjectID,
1271 /** The merge body text for the viewer and method. */
1272 viewerMergeBodyText: Schema.String
1274export interface PullRequestMergeMessageRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestMergeMessageRepositoryPullRequestPullRequest.fields> {}
1275​
1276/** A repository contains the content for a project. */
1277export const PullRequestMergeMessageRepositoryRepository = Schema.Struct({
1278 /** Returns a single pull request from the current repository by number. */
1279 pullRequest: Schema.NullOr(PullRequestMergeMessageRepositoryPullRequestPullRequest)
1281export interface PullRequestMergeMessageRepositoryRepository extends Schema.Struct.Type<typeof PullRequestMergeMessageRepositoryRepository.fields> {}
1282​
1283/** `query PullRequestMergeMessage` */
1284export const PullRequestMergeMessage = GraphQL.query("PullRequestMergeMessage", {
1285 document: {
1286 variables: [
1287 { name: "owner", body: "String!" },
1288 { name: "name", body: "String!" },
1289 { name: "number", body: "Int!" },
1290 { name: "method", body: "PullRequestMergeMethod!" }
1291 ],
1292 selections: [
1293 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){isMergeQueueEnabled headRefOid viewerMergeBodyText(mergeType:$", "method", ")}}"] }
1294 ],
1295 fragments: []
1296 },
1297 variables: {
1298 owner: Schema.String,
1299 name: Schema.String,
1300 number: Shared.Int,
1301 method: Shared.PullRequestMergeMethod
1302 },
1303 result: Schema.Struct({
1304 /** Lookup a given repository by the owner and repository name. */
1305 repository: Schema.NullOr(PullRequestMergeMessageRepositoryRepository)
1306 })
1308export declare namespace PullRequestMergeMessage {
1309 export type Variables = typeof PullRequestMergeMessage.variables.Type
1310 export type Result = typeof PullRequestMergeMessage.result.Type
1312​
1313/** A repository pull request. */
1314export const PullRequestActionStateRepositoryPullRequestPullRequest = Schema.Struct({
1315 /** The Node ID of the PullRequest object */
1316 id: Shared.ID,
1317 /** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
1318 headRefOid: Shared.GitObjectID,
1319 /** Indicates whether the pull request's base ref has a merge queue enabled. */
1320 isMergeQueueEnabled: Schema.Boolean,
1321 /** Detailed information about the current pull request merge state status. */
1322 mergeStateStatus: GraphQL.enumLiterals(Shared.MergeStateStatus.literals),
1323 /** Identifies the base Ref associated with the pull request. */
1324 baseRef: Schema.NullOr(BaseRefRef)
1326export interface PullRequestActionStateRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestActionStateRepositoryPullRequestPullRequest.fields> {}
1327​
1328/** A repository contains the content for a project. */
1329export const PullRequestActionStateRepositoryRepository = Schema.Struct({
1330 /** Returns a single pull request from the current repository by number. */
1331 pullRequest: Schema.NullOr(PullRequestActionStateRepositoryPullRequestPullRequest)
1333export interface PullRequestActionStateRepositoryRepository extends Schema.Struct.Type<typeof PullRequestActionStateRepositoryRepository.fields> {}
1334​
1335/** `query PullRequestActionState` */
1336export const PullRequestActionState = GraphQL.query("PullRequestActionState", {
1337 document: {
1338 variables: [
1339 { name: "owner", body: "String!" },
1340 { name: "name", body: "String!" },
1341 { name: "number", body: "Int!" },
1342 { name: "headRef", body: "String!" }
1343 ],
1344 selections: [
1345 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){id headRefOid isMergeQueueEnabled mergeStateStatus baseRef{compare(headRef:$", "headRef", "){behindBy}}}}"] }
1346 ],
1347 fragments: []
1348 },
1349 variables: {
1350 owner: Schema.String,
1351 name: Schema.String,
1352 number: Shared.Int,
1353 headRef: Schema.String
1354 },
1355 result: Schema.Struct({
1356 /** Lookup a given repository by the owner and repository name. */
1357 repository: Schema.NullOr(PullRequestActionStateRepositoryRepository)
1358 })
1360export declare namespace PullRequestActionState {
1361 export type Variables = typeof PullRequestActionState.variables.Type
1362 export type Result = typeof PullRequestActionState.result.Type
1364​
1365/** A repository contains the content for a project. */
1366export const PullRequestBranchToDeleteRepositoryPullRequestHeadRepositoryRepository = Schema.Struct({
1367 /** The Node ID of the Repository object */
1368 id: Shared.ID
1370export interface PullRequestBranchToDeleteRepositoryPullRequestHeadRepositoryRepository extends Schema.Struct.Type<typeof PullRequestBranchToDeleteRepositoryPullRequestHeadRepositoryRepository.fields> {}
1371​
1372/** A repository pull request. */
1373export const PullRequestBranchToDeleteRepositoryPullRequestPullRequest = Schema.Struct({
1374 /** Identifies the state of the pull request. */
1375 state: GraphQL.enumLiterals(Shared.PullRequestState.literals),
1376 /** Identifies the name of the head Ref associated with the pull request, even if the ref has been deleted. */
1377 headRefName: Schema.String,
1378 /** Identifies the name of the base Ref associated with the pull request, even if the ref has been deleted. */
1379 baseRefName: Schema.String,
1380 /** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
1381 headRefOid: Shared.GitObjectID,
1382 /** The repository associated with this pull request's head Ref. */
1383 headRepository: Schema.NullOr(PullRequestBranchToDeleteRepositoryPullRequestHeadRepositoryRepository)
1385export interface PullRequestBranchToDeleteRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestBranchToDeleteRepositoryPullRequestPullRequest.fields> {}
1386​
1387/** A repository contains the content for a project. */
1388export const PullRequestBranchToDeleteRepositoryRepository = Schema.Struct({
1389 /** Returns a single pull request from the current repository by number. */
1390 pullRequest: Schema.NullOr(PullRequestBranchToDeleteRepositoryPullRequestPullRequest)
1392export interface PullRequestBranchToDeleteRepositoryRepository extends Schema.Struct.Type<typeof PullRequestBranchToDeleteRepositoryRepository.fields> {}
1393​
1394/** `query PullRequestBranchToDelete` */
1395export const PullRequestBranchToDelete = GraphQL.query("PullRequestBranchToDelete", {
1396 document: {
1397 variables: [
1398 { name: "owner", body: "String!" },
1399 { name: "name", body: "String!" },
1400 { name: "number", body: "Int!" }
1401 ],
1402 selections: [
1403 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){state headRefName baseRefName headRefOid headRepository{id}}}"] }
1404 ],
1405 fragments: []
1406 },
1407 variables: {
1408 owner: Schema.String,
1409 name: Schema.String,
1410 number: Shared.Int
1411 },
1412 result: Schema.Struct({
1413 /** Lookup a given repository by the owner and repository name. */
1414 repository: Schema.NullOr(PullRequestBranchToDeleteRepositoryRepository)
1415 })
1417export declare namespace PullRequestBranchToDelete {
1418 export type Variables = typeof PullRequestBranchToDelete.variables.Type
1419 export type Result = typeof PullRequestBranchToDelete.result.Type
1421​
1422/** Represents a Git reference. */
1423export const DefaultBranchRefRef = Schema.Struct({
1424 /** The ref name. */
1425 name: Schema.String
1427export interface DefaultBranchRefRef extends Schema.Struct.Type<typeof DefaultBranchRefRef.fields> {}
1428​
1429/** Represents a Git object. */
1430export const GitObject = Schema.Struct({
1431 __typename: GraphQL.otherTypename<Shared.Typename.GitObject>()([]),
1432 /** The Git object ID */
1433 oid: Shared.GitObjectID
1435export interface GitObject extends Schema.Struct.Type<typeof GitObject.fields> {}
1436​
1437/** Represents a Git reference. */
1438export const RefRef = Schema.Struct({
1439 /** The object the ref points to. Returns null when object does not exist. */
1440 target: Schema.NullOr(GitObject)
1442export interface RefRef extends Schema.Struct.Type<typeof RefRef.fields> {}
1443​
1444/** A repository contains the content for a project. */
1445export const NodeRepository = Schema.Struct({
1446 __typename: Schema.Literal("Repository"),
1447 /** The Ref associated with the repository's default branch. */
1448 defaultBranchRef: Schema.NullOr(DefaultBranchRefRef),
1449 /** Fetch a given ref from the repository */
1450 ref: Schema.NullOr(RefRef)
1452export interface NodeRepository extends Schema.Struct.Type<typeof NodeRepository.fields> {}
1453​
1454/** An object with an ID. */
1455export const PullRequestSourceBranchNodeNodeOther = Schema.Struct({
1456 __typename: GraphQL.otherTypename<Shared.Typename.Node>()(["Repository"])
1458export interface PullRequestSourceBranchNodeNodeOther extends Schema.Struct.Type<typeof PullRequestSourceBranchNodeNodeOther.fields> {}
1459​
1460/** `query PullRequestSourceBranch` */
1461export const PullRequestSourceBranch = GraphQL.query("PullRequestSourceBranch", {
1462 document: {
1463 variables: [
1464 { name: "repositoryId", body: "ID!" },
1465 { name: "ref", body: "String!" }
1466 ],
1467 selections: [
1468 { name: "node", body: ["(id:$", "repositoryId", "){__typename...on Repository{defaultBranchRef{name}ref(qualifiedName:$", "ref", "){target{__typename oid}}}}"] }
1469 ],
1470 fragments: []
1471 },
1472 variables: {
1473 repositoryId: Shared.ID,
1474 ref: Schema.String
1475 },
1476 result: Schema.Struct({
1477 /** Fetches an object given its ID. */
1478 node: Schema.NullOr(Schema.Union([
1479 NodeRepository,
1480 PullRequestSourceBranchNodeNodeOther
1481 ]))
1482 })
1484export declare namespace PullRequestSourceBranch {
1485 export type Variables = typeof PullRequestSourceBranch.variables.Type
1486 export type Result = typeof PullRequestSourceBranch.result.Type
1488​
1489/** Every operation in pullRequestReads.graphql. */
1490export const PullRequestReadsGraphQLGroup = GraphQLGroup.make(ActorAvatars, PullRequestCore, PullRequestCheckContexts, PullRequestPreview, PullRequestActivity, PullRequestHeads, PullRequestNodeId, PullRequestSubject, ViewerPermissions, ReviewerCandidates, LabelCandidates, PullRequestFilesViewed, PullRequestMergeMessage, PullRequestActionState, PullRequestBranchToDelete, PullRequestSourceBranch)