// Generated by @effect/graphql-generator from pullRequestReads.graphql. Do not edit.
import { GraphQL, GraphQLGroup } from "effect/graphql"
import * as Schema from "effect/Schema"
import * as Shared from "../../schema/github.graphql.ts"
/** Represents an individual commit status context */
export const StatusContext = Schema.Struct({
__typename: Schema.Literal("StatusContext"),
/** The name of this status context. */
context: Schema.String,
/** The state of this status context. */
state: GraphQL.enumLiterals(Shared.StatusState.literals),
/** The URL for this status context. */
targetUrl: Schema.NullOr(Shared.URI),
/** Identifies the date and time when the object was created. */
createdAt: Shared.DateTime,
/** The description for this status context. */
description: Schema.NullOr(Schema.String),
/** Whether this is required to pass before merging for a specific pull request. */
isRequired: Schema.optionalKey(Schema.Boolean)
})
export interface StatusContext extends Schema.Struct.Type<typeof StatusContext.fields> {}
/** A workflow contains meta information about an Actions workflow file. */
export const Workflow = Schema.Struct({
/** The name of the workflow. */
name: Schema.String
})
export interface Workflow extends Schema.Struct.Type<typeof Workflow.fields> {}
/** A workflow run. */
export const WorkflowRun = Schema.Struct({
/** The workflow executed in this workflow run. */
workflow: Workflow
})
export interface WorkflowRun extends Schema.Struct.Type<typeof WorkflowRun.fields> {}
/** A check suite. */
export const CheckSuite = Schema.Struct({
/** The workflow run associated with this check suite. */
workflowRun: Schema.NullOr(WorkflowRun)
})
export interface CheckSuite extends Schema.Struct.Type<typeof CheckSuite.fields> {}
/** A check run. */
export const CheckRun = Schema.Struct({
__typename: Schema.Literal("CheckRun"),
/** The name of the check for this check run. */
name: Schema.String,
/** The current status of the check run. */
status: GraphQL.enumLiterals(Shared.CheckStatusState.literals),
/** The conclusion of the check run. */
conclusion: Schema.NullOr(GraphQL.enumLiterals(Shared.CheckConclusionState.literals)),
/** Identifies the date and time when the check run was started. */
startedAt: Schema.NullOr(Shared.DateTime),
/** Identifies the date and time when the check run was completed. */
completedAt: Schema.NullOr(Shared.DateTime),
/** The URL from which to find full details of the check run on the integrator's site. */
detailsUrl: Schema.NullOr(Shared.URI),
/** Whether this is required to pass before merging for a specific pull request. */
isRequired: Schema.optionalKey(Schema.Boolean),
/** The check suite that this run is a part of. */
checkSuite: CheckSuite
})
export interface CheckRun extends Schema.Struct.Type<typeof CheckRun.fields> {}
/** Types that can be inside a StatusCheckRollup context. */
export const StatusCheckRollupContextOther = Schema.Struct({
__typename: GraphQL.otherTypename<Shared.Typename.StatusCheckRollupContext>()(["StatusContext", "CheckRun"])
})
export interface StatusCheckRollupContextOther extends Schema.Struct.Type<typeof StatusCheckRollupContextOther.fields> {}
/**
* `fragment CheckContext on StatusCheckRollupContext`
*
* Types that can be inside a StatusCheckRollup context.
*/
export const CheckContext = Schema.Union([
StatusContext,
CheckRun,
StatusCheckRollupContextOther
])
export type CheckContext = typeof CheckContext.Type
/** An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. */
export const Issue = Schema.Struct({
__typename: Schema.Literal("Issue"),
/** Identifies the issue number. */
number: Shared.Int,
/** Identifies the issue title. */
title: Schema.String,
/** Identifies the state of the issue. */
issueState: GraphQL.enumLiterals(Shared.IssueState.literals)
})
export interface Issue extends Schema.Struct.Type<typeof Issue.fields> {}
/** A repository pull request. */
export const ReferenceCandidatePullRequest = Schema.Struct({
__typename: Schema.Literal("PullRequest"),
/** Identifies the pull request number. */
number: Shared.Int,
/** Identifies the pull request title. */
title: Schema.String,
/** Identifies the state of the pull request. */
pullRequestState: GraphQL.enumLiterals(Shared.PullRequestState.literals)
})
export interface ReferenceCandidatePullRequest extends Schema.Struct.Type<typeof ReferenceCandidatePullRequest.fields> {}
/** Used for return value of Repository.issueOrPullRequest. */
export const IssueOrPullRequestOther = Schema.Struct({
__typename: GraphQL.otherTypename<Shared.Typename.IssueOrPullRequest>()(["Issue", "PullRequest"])
})
export interface IssueOrPullRequestOther extends Schema.Struct.Type<typeof IssueOrPullRequestOther.fields> {}
/**
* `fragment ReferenceCandidate on IssueOrPullRequest`
*
* Used for return value of Repository.issueOrPullRequest.
*/
export const ReferenceCandidate = Schema.Union([
Issue,
ReferenceCandidatePullRequest,
IssueOrPullRequestOther
])
export type ReferenceCandidate = typeof ReferenceCandidate.Type
/** A user is an individual's account on GitHub that owns repositories and can make new content. */
export const ViewerUser = Schema.Struct({
/** Identifies the primary key from the database. */
databaseId: Schema.NullOr(Shared.Int),
/** The username used to login. */
login: Schema.String
})
export interface ViewerUser extends Schema.Struct.Type<typeof ViewerUser.fields> {}
/** `query RoutingIdentityViewer` */
export const RoutingIdentityViewer = GraphQL.query("RoutingIdentityViewer", {
document: {
variables: [],
selections: [
{ name: "viewer", body: ["{databaseId login}"] }
],
fragments: []
},
result: Schema.Struct({
/** The currently authenticated user. */
viewer: ViewerUser
})
})
export declare namespace RoutingIdentityViewer {
export type Variables = typeof RoutingIdentityViewer.variables.Type
export type Result = typeof RoutingIdentityViewer.result.Type
}
/** A user is an individual's account on GitHub that owns repositories and can make new content. */
export const ActorAvatarsNodesUser = Schema.Struct({
__typename: Schema.Literal("User"),
/** The username used to login. */
login: Schema.String,
/** A URL pointing to the user's public avatar. */
avatarUrl: Shared.URI
})
export interface ActorAvatarsNodesUser extends Schema.Struct.Type<typeof ActorAvatarsNodesUser.fields> {}
/** A special type of user which takes actions on behalf of GitHub Apps. */
export const NodesBot = Schema.Struct({
__typename: Schema.Literal("Bot"),
/** The username of the actor. */
login: Schema.String,
/** A URL pointing to the GitHub App's public avatar. */
avatarUrl: Shared.URI
})
export interface NodesBot extends Schema.Struct.Type<typeof NodesBot.fields> {}
/** An object with an ID. */
export const ActorAvatarsNodesNodeOther = Schema.Struct({
__typename: GraphQL.otherTypename<Shared.Typename.Node>()(["User", "Bot"])
})
export interface ActorAvatarsNodesNodeOther extends Schema.Struct.Type<typeof ActorAvatarsNodesNodeOther.fields> {}
/** `query ActorAvatars` */
export const ActorAvatars = GraphQL.query("ActorAvatars", {
document: {
variables: [
{ name: "ids", body: "[ID!]!" }
],
selections: [
{ name: "nodes", body: ["(ids:$", "ids", "){__typename...on User{login avatarUrl}...on Bot{login avatarUrl}}"] }
],
fragments: []
},
variables: {
ids: Schema.Array(Shared.ID)
},
result: Schema.Struct({
/** Lookup nodes by a list of IDs. */
nodes: Schema.Array(Schema.NullOr(Schema.Union([
ActorAvatarsNodesUser,
NodesBot,
ActorAvatarsNodesNodeOther
])))
})
})
export declare namespace ActorAvatars {
export type Variables = typeof ActorAvatars.variables.Type
export type Result = typeof ActorAvatars.result.Type
}
/** Represents an owner of a Repository. */
export const RepositoryOwner = Schema.Struct({
__typename: GraphQL.otherTypename<Shared.Typename.RepositoryOwner>()([]),
/** The username used to login. */
login: Schema.String
})
export interface RepositoryOwner extends Schema.Struct.Type<typeof RepositoryOwner.fields> {}
/** A repository contains the content for a project. */
export const PullRequestCoreRepositoryPullRequestHeadRepositoryRepository = Schema.Struct({
/** The repository's name with owner. */
nameWithOwner: Schema.String,
/** The users permission level on the repository. Will return null if authenticated as an GitHub App. */
viewerPermission: Schema.NullOr(GraphQL.enumLiterals(Shared.RepositoryPermission.literals))
})
export interface PullRequestCoreRepositoryPullRequestHeadRepositoryRepository extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestHeadRepositoryRepository.fields> {}
/** Represents a Git reference. */
export const HeadRefRef = Schema.Struct({
/** The Node ID of the Ref object */
id: Shared.ID
})
export interface HeadRefRef extends Schema.Struct.Type<typeof HeadRefRef.fields> {}
/** A user is an individual's account on GitHub that owns repositories and can make new content. */
export const PullRequestCoreRepositoryPullRequestAuthorUser = Schema.Struct({
__typename: Schema.Literal("User"),
/** The username used to login. */
login: Schema.String,
/** A URL pointing to the user's public avatar. */
avatarUrl: Shared.URI,
/** The Node ID of the User object */
id: Shared.ID,
/** The user's public profile name. */
name: Schema.NullOr(Schema.String)
})
export interface PullRequestCoreRepositoryPullRequestAuthorUser extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestAuthorUser.fields> {}
/** Represents an object which can take actions on GitHub. Typically a User or Bot. */
export const ActorOther = Schema.Struct({
__typename: GraphQL.otherTypename<Shared.Typename.Actor>()(["User"]),
/** The username of the actor. */
login: Schema.String,
/** A URL pointing to the actor's public avatar. */
avatarUrl: Shared.URI
})
export interface ActorOther extends Schema.Struct.Type<typeof ActorOther.fields> {}
/** Represents an auto-merge request for a pull request */
export const AutoMergeRequest = Schema.Struct({
/**
* The merge method of the auto-merge request. If a merge queue is required by
* the base branch, this value will be set by the merge queue when merging.
*/
mergeMethod: GraphQL.enumLiterals(Shared.PullRequestMergeMethod.literals)
})
export interface AutoMergeRequest extends Schema.Struct.Type<typeof AutoMergeRequest.fields> {}
/** Represents a comparison between two commit revisions. */
export const Comparison = Schema.Struct({
/** The number of commits behind the base branch. */
behindBy: Shared.Int
})
export interface Comparison extends Schema.Struct.Type<typeof Comparison.fields> {}
/** Represents a Git reference. */
export const BaseRefRef = Schema.Struct({
/** Compares the current ref as a base ref to another head ref, if the comparison can be made. */
compare: Schema.NullOr(Comparison)
})
export interface BaseRefRef extends Schema.Struct.Type<typeof BaseRefRef.fields> {}
/** A user is an individual's account on GitHub that owns repositories and can make new content. */
export const RequestedReviewerUser = Schema.Struct({
__typename: Schema.Literal("User"),
/** The username used to login. */
login: Schema.String,
/** The user's public profile name. */
name: Schema.NullOr(Schema.String)
})
export interface RequestedReviewerUser extends Schema.Struct.Type<typeof RequestedReviewerUser.fields> {}
/** A special type of user which takes actions on behalf of GitHub Apps. */
export const RequestedReviewerBot = Schema.Struct({
__typename: Schema.Literal("Bot"),
/** The username of the actor. */
login: Schema.String
})
export interface RequestedReviewerBot extends Schema.Struct.Type<typeof RequestedReviewerBot.fields> {}
/** A team of users in an organization. */
export const Team = Schema.Struct({
__typename: Schema.Literal("Team"),
/** The slug corresponding to the team. */
slug: Schema.String,
/** The slug corresponding to the organization and team. */
combinedSlug: Schema.String,
/** The name of the team. */
teamName: Schema.String,
/** A URL pointing to the team's avatar. */
teamAvatarUrl: Schema.NullOr(Shared.URI)
})
export interface Team extends Schema.Struct.Type<typeof Team.fields> {}
/** Types that can be requested reviewers. */
export const RequestedReviewerOther = Schema.Struct({
__typename: GraphQL.otherTypename<Shared.Typename.RequestedReviewer>()(["User", "Bot", "Team"])
})
export interface RequestedReviewerOther extends Schema.Struct.Type<typeof RequestedReviewerOther.fields> {}
/** A request for a user to review a pull request. */
export const PullRequestCoreRepositoryPullRequestReviewRequestsNodesReviewRequest = Schema.Struct({
/** The reviewer that is requested. */
requestedReviewer: Schema.NullOr(Schema.Union([
RequestedReviewerUser,
RequestedReviewerBot,
Team,
RequestedReviewerOther
]))
})
export interface PullRequestCoreRepositoryPullRequestReviewRequestsNodesReviewRequest extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestReviewRequestsNodesReviewRequest.fields> {}
/** The connection type for ReviewRequest. */
export const PullRequestCoreRepositoryPullRequestReviewRequestsReviewRequestConnection = Schema.Struct({
/** A list of nodes. */
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PullRequestCoreRepositoryPullRequestReviewRequestsNodesReviewRequest)))
})
export interface PullRequestCoreRepositoryPullRequestReviewRequestsReviewRequestConnection extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestReviewRequestsReviewRequestConnection.fields> {}
/** A label for categorizing Issues, Pull Requests, Milestones, or Discussions with a given Repository. */
export const PullRequestCoreRepositoryPullRequestLabelsNodesLabel = Schema.Struct({
/** Identifies the label name. */
name: Schema.String,
/** Identifies the label color. */
color: Schema.String
})
export interface PullRequestCoreRepositoryPullRequestLabelsNodesLabel extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestLabelsNodesLabel.fields> {}
/** The connection type for Label. */
export const PullRequestCoreRepositoryPullRequestLabelsLabelConnection = Schema.Struct({
/** A list of nodes. */
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PullRequestCoreRepositoryPullRequestLabelsNodesLabel)))
})
export interface PullRequestCoreRepositoryPullRequestLabelsLabelConnection extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestLabelsLabelConnection.fields> {}
/** Information about pagination in a connection. */
export const ContextsPageInfoPageInfo = Schema.Struct({
/** When paginating forwards, are there more items? */
hasNextPage: Schema.Boolean,
/** When paginating forwards, the cursor to continue. */
endCursor: Schema.NullOr(Schema.String)
})
export interface ContextsPageInfoPageInfo extends Schema.Struct.Type<typeof ContextsPageInfoPageInfo.fields> {}
/** The connection type for StatusCheckRollupContext. */
export const StatusCheckRollupContextConnection = Schema.Struct({
/** A list of nodes. */
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(CheckContext))),
/** Information to aid in pagination. */
pageInfo: ContextsPageInfoPageInfo
})
export interface StatusCheckRollupContextConnection extends Schema.Struct.Type<typeof StatusCheckRollupContextConnection.fields> {}
/** Represents the rollup for both the check runs and status for a commit. */
export const StatusCheckRollup = Schema.Struct({
/** A list of status contexts and check runs for this commit. */
contexts: StatusCheckRollupContextConnection
})
export interface StatusCheckRollup extends Schema.Struct.Type<typeof StatusCheckRollup.fields> {}
/** Represents a Git commit. */
export const PullRequestCoreRepositoryPullRequestCommitsNodesCommitCommit = Schema.Struct({
/** Check and Status rollup information for this commit. */
statusCheckRollup: Schema.NullOr(StatusCheckRollup)
})
export interface PullRequestCoreRepositoryPullRequestCommitsNodesCommitCommit extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestCommitsNodesCommitCommit.fields> {}
/** Represents a Git commit part of a pull request. */
export const PullRequestCoreRepositoryPullRequestCommitsNodesPullRequestCommit = Schema.Struct({
/** The Git commit object */
commit: PullRequestCoreRepositoryPullRequestCommitsNodesCommitCommit
})
export interface PullRequestCoreRepositoryPullRequestCommitsNodesPullRequestCommit extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestCommitsNodesPullRequestCommit.fields> {}
/** The connection type for PullRequestCommit. */
export const PullRequestCoreRepositoryPullRequestCommitsPullRequestCommitConnection = Schema.Struct({
/** A list of nodes. */
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PullRequestCoreRepositoryPullRequestCommitsNodesPullRequestCommit)))
})
export interface PullRequestCoreRepositoryPullRequestCommitsPullRequestCommitConnection extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestCommitsPullRequestCommitConnection.fields> {}
/** A repository pull request. */
export const PullRequestCoreRepositoryPullRequestPullRequest = Schema.Struct({
/** Identifies the pull request number. */
number: Shared.Int,
/** Identifies the pull request title. */
title: Schema.String,
/** The HTTP URL for this pull request. */
url: Shared.URI,
/** The body as Markdown. */
body: Schema.String,
/** Identifies the state of the pull request. */
state: GraphQL.enumLiterals(Shared.PullRequestState.literals),
/** Identifies if the pull request is a draft. */
isDraft: Schema.Boolean,
/** Whether or not the pull request can be merged based on the existence of merge conflicts. */
mergeable: GraphQL.enumLiterals(Shared.MergeableState.literals),
/** Detailed information about the current pull request merge state status. */
mergeStateStatus: GraphQL.enumLiterals(Shared.MergeStateStatus.literals),
/** The current status of this pull request with respect to code review. */
reviewDecision: Schema.NullOr(GraphQL.enumLiterals(Shared.PullRequestReviewDecision.literals)),
/** The number of additions in this pull request. */
additions: Shared.Int,
/** The number of deletions in this pull request. */
deletions: Shared.Int,
/** The number of changed files in this pull request. */
changedFiles: Shared.Int,
/** Identifies the date and time when the object was created. */
createdAt: Shared.DateTime,
/** Identifies the date and time when the object was last updated. */
updatedAt: Shared.DateTime,
/** The date and time that the pull request was merged. */
mergedAt: Schema.NullOr(Shared.DateTime),
/** Identifies the date and time when the object was closed. */
closedAt: Schema.NullOr(Shared.DateTime),
/** Identifies the name of the head Ref associated with the pull request, even if the ref has been deleted. */
headRefName: Schema.String,
/** Identifies the name of the base Ref associated with the pull request, even if the ref has been deleted. */
baseRefName: Schema.String,
/** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
headRefOid: Shared.GitObjectID,
/** The head and base repositories are different. */
isCrossRepository: Schema.Boolean,
/** Indicates whether maintainers can modify the pull request. */
maintainerCanModify: Schema.Boolean,
/** The owner of the repository associated with this pull request's head Ref. */
headRepositoryOwner: Schema.NullOr(RepositoryOwner),
/** The repository associated with this pull request's head Ref. */
headRepository: Schema.NullOr(PullRequestCoreRepositoryPullRequestHeadRepositoryRepository),
/** Identifies the head Ref associated with the pull request. */
headRef: Schema.NullOr(HeadRefRef),
/** The actor who authored the comment. */
author: Schema.NullOr(Schema.Union([
PullRequestCoreRepositoryPullRequestAuthorUser,
ActorOther
])),
/** Returns the auto-merge request object if one exists for this pull request. */
autoMergeRequest: Schema.NullOr(AutoMergeRequest),
/** Check if the current viewer can update this object. */
viewerCanUpdate: Schema.Boolean,
/** Did the viewer author this comment. */
viewerDidAuthor: Schema.Boolean,
/**
* Whether or not the viewer can update the head ref of this PR, by merging or rebasing the base ref.
* If the head ref is up to date or unable to be updated by this user, this will return false.
*/
viewerCanUpdateBranch: Schema.Boolean,
/** Identifies the base Ref associated with the pull request. */
baseRef: Schema.NullOr(BaseRefRef),
/** A list of review requests associated with the pull request. */
reviewRequests: Schema.NullOr(PullRequestCoreRepositoryPullRequestReviewRequestsReviewRequestConnection),
/** A list of labels associated with the object. */
labels: Schema.NullOr(PullRequestCoreRepositoryPullRequestLabelsLabelConnection),
/** A list of commits present in this pull request's head branch not present in the base branch. */
commits: PullRequestCoreRepositoryPullRequestCommitsPullRequestCommitConnection
})
export interface PullRequestCoreRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestCoreRepositoryPullRequestPullRequest.fields> {}
/** A repository contains the content for a project. */
export const PullRequestCoreRepositoryRepository = Schema.Struct({
/** Whether or not PRs are merged with a merge commit on this repository. */
mergeCommitAllowed: Schema.Boolean,
/** Whether or not squash-merging is enabled on this repository. */
squashMergeAllowed: Schema.Boolean,
/** Whether or not rebase-merging is enabled on this repository. */
rebaseMergeAllowed: Schema.Boolean,
/** Whether or not Auto-merge can be enabled on pull requests in this repository. */
autoMergeAllowed: Schema.Boolean,
/** The users permission level on the repository. Will return null if authenticated as an GitHub App. */
viewerPermission: Schema.NullOr(GraphQL.enumLiterals(Shared.RepositoryPermission.literals)),
/** Returns a single pull request from the current repository by number. */
pullRequest: Schema.NullOr(PullRequestCoreRepositoryPullRequestPullRequest)
})
export interface PullRequestCoreRepositoryRepository extends Schema.Struct.Type<typeof PullRequestCoreRepositoryRepository.fields> {}
/** `query PullRequestCore` */
export const PullRequestCore = GraphQL.query("PullRequestCore", {
document: {
variables: [
{ name: "owner", body: "String!" },
{ name: "name", body: "String!" },
{ name: "number", body: "Int!" },
{ name: "headRef", body: "String!" },
{ name: "required", body: "Boolean!" },
{ name: "requestedReviewers", body: "Int!" }
],
selections: [
{ 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 maintainerCanModify 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 endCursor}}}}}}}}"] }
],
fragments: [
{ 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}}}}}"] }
]
},
variables: {
owner: Schema.String,
name: Schema.String,
number: Shared.Int,
headRef: Schema.String,
required: Schema.Boolean,
requestedReviewers: Shared.Int
},
result: Schema.Struct({
/** Lookup a given repository by the owner and repository name. */
repository: Schema.NullOr(PullRequestCoreRepositoryRepository)
})
})
export declare namespace PullRequestCore {
export type Variables = typeof PullRequestCore.variables.Type
export type Result = typeof PullRequestCore.result.Type
}
/** A repository pull request. */
export const PullRequestCheckContextsRepositoryPullRequestPullRequest = Schema.Struct({
/** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
headRefOid: Shared.GitObjectID,
/** A list of commits present in this pull request's head branch not present in the base branch. */
commits: PullRequestCoreRepositoryPullRequestCommitsPullRequestCommitConnection
})
export interface PullRequestCheckContextsRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryPullRequestPullRequest.fields> {}
/** A repository contains the content for a project. */
export const PullRequestCheckContextsRepositoryRepository = Schema.Struct({
/** Returns a single pull request from the current repository by number. */
pullRequest: Schema.NullOr(PullRequestCheckContextsRepositoryPullRequestPullRequest)
})
export interface PullRequestCheckContextsRepositoryRepository extends Schema.Struct.Type<typeof PullRequestCheckContextsRepositoryRepository.fields> {}
/** `query PullRequestCheckContexts` */
export const PullRequestCheckContexts = GraphQL.query("PullRequestCheckContexts", {
document: {
variables: [
{ name: "owner", body: "String!" },
{ name: "name", body: "String!" },
{ name: "number", body: "Int!" },
{ name: "required", body: "Boolean!" },
{ name: "after", body: "String" }
],
selections: [
{ 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}}}}}}}}"] }
],
fragments: [
{ 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}}}}}"] }
]
},
variables: {
owner: Schema.String,
name: Schema.String,
number: Shared.Int,
required: Schema.Boolean,
after: Schema.optional(Schema.NullOr(Schema.String))
},
result: Schema.Struct({
/** Lookup a given repository by the owner and repository name. */
repository: Schema.NullOr(PullRequestCheckContextsRepositoryRepository)
})
})
export declare namespace PullRequestCheckContexts {
export type Variables = typeof PullRequestCheckContexts.variables.Type
export type Result = typeof PullRequestCheckContexts.result.Type
}
/** A user is an individual's account on GitHub that owns repositories and can make new content. */
export const PullRequestPreviewRepositoryPullRequestAuthorUser = Schema.Struct({
__typename: Schema.Literal("User"),
/** The username used to login. */
login: Schema.String,
/** A URL pointing to the user's public avatar. */
avatarUrl: Shared.URI,
/** The user's public profile name. */
name: Schema.NullOr(Schema.String)
})
export interface PullRequestPreviewRepositoryPullRequestAuthorUser extends Schema.Struct.Type<typeof PullRequestPreviewRepositoryPullRequestAuthorUser.fields> {}
/** A repository pull request. */
export const PullRequestPreviewRepositoryPullRequestPullRequest = Schema.Struct({
/** Identifies the pull request number. */
number: Shared.Int,
/** Identifies the pull request title. */
title: Schema.String,
/** The HTTP URL for this pull request. */
url: Shared.URI,
/** Identifies the state of the pull request. */
state: GraphQL.enumLiterals(Shared.PullRequestState.literals),
/** Identifies if the pull request is a draft. */
isDraft: Schema.Boolean,
/** Identifies the date and time when the object was created. */
createdAt: Shared.DateTime,
/** The actor who authored the comment. */
author: Schema.NullOr(Schema.Union([
PullRequestPreviewRepositoryPullRequestAuthorUser,
ActorOther
]))
})
export interface PullRequestPreviewRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestPreviewRepositoryPullRequestPullRequest.fields> {}
/** A repository contains the content for a project. */
export const PullRequestPreviewRepositoryRepository = Schema.Struct({
/** Returns a single pull request from the current repository by number. */
pullRequest: Schema.NullOr(PullRequestPreviewRepositoryPullRequestPullRequest)
})
export interface PullRequestPreviewRepositoryRepository extends Schema.Struct.Type<typeof PullRequestPreviewRepositoryRepository.fields> {}
/** `query PullRequestPreview` */
export const PullRequestPreview = GraphQL.query("PullRequestPreview", {
document: {
variables: [
{ name: "owner", body: "String!" },
{ name: "name", body: "String!" },
{ name: "number", body: "Int!" }
],
selections: [
{ name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){number title url state isDraft createdAt author{__typename login avatarUrl...on User{name}}}}"] }
],
fragments: []
},
variables: {
owner: Schema.String,
name: Schema.String,
number: Shared.Int
},
result: Schema.Struct({
/** Lookup a given repository by the owner and repository name. */
repository: Schema.NullOr(PullRequestPreviewRepositoryRepository)
})
})
export declare namespace PullRequestPreview {
export type Variables = typeof PullRequestPreview.variables.Type
export type Result = typeof PullRequestPreview.result.Type
}
/** The connection type for Commit. */
export const CommitConnection = Schema.Struct({
/** Identifies the total count of items in the connection. */
totalCount: Shared.Int
})
export interface CommitConnection extends Schema.Struct.Type<typeof CommitConnection.fields> {}
/** A user is an individual's account on GitHub that owns repositories and can make new content. */
export const UserUser = Schema.Struct({
/** The username used to login. */
login: Schema.String
})
export interface UserUser extends Schema.Struct.Type<typeof UserUser.fields> {}
/** Represents an actor in a Git commit (ie. an author or committer). */
export const GitActor = Schema.Struct({
/** The name in the Git commit. */
name: Schema.NullOr(Schema.String),
/** The email in the Git commit. */
email: Schema.NullOr(Schema.String),
/** The GitHub user corresponding to the email field. Null if no such user exists. */
user: Schema.NullOr(UserUser)
})
export interface GitActor extends Schema.Struct.Type<typeof GitActor.fields> {}
/** The connection type for GitActor. */
export const GitActorConnection = Schema.Struct({
/** A list of nodes. */
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(GitActor)))
})
export interface GitActorConnection extends Schema.Struct.Type<typeof GitActorConnection.fields> {}
/** Represents a Git commit. */
export const PullRequestActivityRepositoryPullRequestCommitsNodesCommitCommit = Schema.Struct({
/** The Node ID of the Commit object */
id: Shared.ID,
/** The Git object ID */
oid: Shared.GitObjectID,
/** The Git commit message headline */
messageHeadline: Schema.String,
/** The datetime when this commit was committed. */
committedDate: Shared.DateTime,
/** The parents of a commit. */
parents: CommitConnection,
/**
* The list of authors for this commit based on the git author and the Co-authored-by
* message trailer. The git author will always be first.
*/
authors: GitActorConnection
})
export interface PullRequestActivityRepositoryPullRequestCommitsNodesCommitCommit extends Schema.Struct.Type<typeof PullRequestActivityRepositoryPullRequestCommitsNodesCommitCommit.fields> {}
/** Represents a Git commit part of a pull request. */
export const PullRequestActivityRepositoryPullRequestCommitsNodesPullRequestCommit = Schema.Struct({
/** The Git commit object */
commit: PullRequestActivityRepositoryPullRequestCommitsNodesCommitCommit
})
export interface PullRequestActivityRepositoryPullRequestCommitsNodesPullRequestCommit extends Schema.Struct.Type<typeof PullRequestActivityRepositoryPullRequestCommitsNodesPullRequestCommit.fields> {}
/** The connection type for PullRequestCommit. */
export const PullRequestActivityRepositoryPullRequestCommitsPullRequestCommitConnection = Schema.Struct({
/** A list of nodes. */
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PullRequestActivityRepositoryPullRequestCommitsNodesPullRequestCommit)))
})
export interface PullRequestActivityRepositoryPullRequestCommitsPullRequestCommitConnection extends Schema.Struct.Type<typeof PullRequestActivityRepositoryPullRequestCommitsPullRequestCommitConnection.fields> {}
/** Represents a comment on an Issue. */
export const NodesIssueComment = Schema.Struct({
/** The Node ID of the IssueComment object */
id: Shared.ID,
/** The body as Markdown. */
body: Schema.String,
/** Identifies the date and time when the object was created. */
createdAt: Shared.DateTime,
/** The moment the editor made the last edit */
lastEditedAt: Schema.NullOr(Shared.DateTime),
/** The HTTP URL for this issue comment */
url: Shared.URI,
/** The actor who authored the comment. */
author: Schema.NullOr(Schema.Union([
PullRequestPreviewRepositoryPullRequestAuthorUser,
ActorOther
]))
})
export interface NodesIssueComment extends Schema.Struct.Type<typeof NodesIssueComment.fields> {}
/** The connection type for IssueComment. */
export const IssueCommentConnection = Schema.Struct({
/** Information to aid in pagination. */
pageInfo: ContextsPageInfoPageInfo,
/** A list of nodes. */
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(NodesIssueComment)))
})
export interface IssueCommentConnection extends Schema.Struct.Type<typeof IssueCommentConnection.fields> {}
/** A review object for a given pull request. */
export const NodesPullRequestReview = Schema.Struct({
/** The Node ID of the PullRequestReview object */
id: Shared.ID,
/** Identifies the pull request review body. */
body: Schema.String,
/** Identifies the current state of the pull request review. */
state: GraphQL.enumLiterals(Shared.PullRequestReviewState.literals),
/** Identifies when the Pull Request Review was submitted */
submittedAt: Schema.NullOr(Shared.DateTime),
/** The moment the editor made the last edit */
lastEditedAt: Schema.NullOr(Shared.DateTime),
/** The HTTP URL permalink for this PullRequestReview. */
url: Shared.URI,
/** The actor who authored the comment. */
author: Schema.NullOr(Schema.Union([
PullRequestPreviewRepositoryPullRequestAuthorUser,
ActorOther
]))
})
export interface NodesPullRequestReview extends Schema.Struct.Type<typeof NodesPullRequestReview.fields> {}
/** The connection type for PullRequestReview. */
export const PullRequestReviewConnection = Schema.Struct({
/** Information to aid in pagination. */
pageInfo: ContextsPageInfoPageInfo,
/** A list of nodes. */
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(NodesPullRequestReview)))
})
export interface PullRequestReviewConnection extends Schema.Struct.Type<typeof PullRequestReviewConnection.fields> {}
/** A repository pull request. */
export const PullRequestActivityRepositoryPullRequestPullRequest = Schema.Struct({
/** The actor who authored the comment. */
author: Schema.optionalKey(Schema.NullOr(Schema.Union([
PullRequestPreviewRepositoryPullRequestAuthorUser,
ActorOther
]))),
/** A list of commits present in this pull request's head branch not present in the base branch. */
commits: Schema.optionalKey(PullRequestActivityRepositoryPullRequestCommitsPullRequestCommitConnection),
/** A list of comments associated with the pull request. */
comments: Schema.optionalKey(IssueCommentConnection),
/** A list of reviews associated with the pull request. */
reviews: Schema.optionalKey(Schema.NullOr(PullRequestReviewConnection))
})
export interface PullRequestActivityRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestActivityRepositoryPullRequestPullRequest.fields> {}
/** A repository contains the content for a project. */
export const PullRequestActivityRepositoryRepository = Schema.Struct({
/** Returns a single pull request from the current repository by number. */
pullRequest: Schema.NullOr(PullRequestActivityRepositoryPullRequestPullRequest)
})
export interface PullRequestActivityRepositoryRepository extends Schema.Struct.Type<typeof PullRequestActivityRepositoryRepository.fields> {}
/** `query PullRequestActivity` */
export const PullRequestActivity = GraphQL.query("PullRequestActivity", {
document: {
variables: [
{ name: "owner", body: "String!" },
{ name: "name", body: "String!" },
{ name: "number", body: "Int!" },
{ name: "head", body: "Boolean!" },
{ name: "withComments", body: "Boolean!" },
{ name: "commentsAfter", body: "String" },
{ name: "withReviews", body: "Boolean!" },
{ name: "reviewsAfter", body: "String" }
],
selections: [
{ 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{id oid messageHeadline committedDate parents(first:1){totalCount}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}}}}}}"] }
],
fragments: []
},
variables: {
owner: Schema.String,
name: Schema.String,
number: Shared.Int,
head: Schema.Boolean,
withComments: Schema.Boolean,
commentsAfter: Schema.optional(Schema.NullOr(Schema.String)),
withReviews: Schema.Boolean,
reviewsAfter: Schema.optional(Schema.NullOr(Schema.String))
},
result: Schema.Struct({
/** Lookup a given repository by the owner and repository name. */
repository: Schema.NullOr(PullRequestActivityRepositoryRepository)
})
})
export declare namespace PullRequestActivity {
export type Variables = typeof PullRequestActivity.variables.Type
export type Result = typeof PullRequestActivity.result.Type
}
/** Represents a Git commit. */
export const NodesCommit = Schema.Struct({
__typename: Schema.Literal("Commit"),
/** The Git object ID */
oid: Shared.GitObjectID,
/** The number of additions in this commit. */
additions: Shared.Int,
/** The number of deletions in this commit. */
deletions: Shared.Int
})
export interface NodesCommit extends Schema.Struct.Type<typeof NodesCommit.fields> {}
/** An object with an ID. */
export const PullRequestCommitStatsNodesNodeOther = Schema.Struct({
__typename: GraphQL.otherTypename<Shared.Typename.Node>()(["Commit"])
})
export interface PullRequestCommitStatsNodesNodeOther extends Schema.Struct.Type<typeof PullRequestCommitStatsNodesNodeOther.fields> {}
/** `query PullRequestCommitStats` */
export const PullRequestCommitStats = GraphQL.query("PullRequestCommitStats", {
document: {
variables: [
{ name: "ids", body: "[ID!]!" }
],
selections: [
{ name: "nodes", body: ["(ids:$", "ids", "){__typename...on Commit{oid additions deletions}}"] }
],
fragments: []
},
variables: {
ids: Schema.Array(Shared.ID)
},
result: Schema.Struct({
/** Lookup nodes by a list of IDs. */
nodes: Schema.Array(Schema.NullOr(Schema.Union([
NodesCommit,
PullRequestCommitStatsNodesNodeOther
])))
})
})
export declare namespace PullRequestCommitStats {
export type Variables = typeof PullRequestCommitStats.variables.Type
export type Result = typeof PullRequestCommitStats.result.Type
}
/** A repository pull request. */
export const NodesPullRequest = Schema.Struct({
/** Identifies the pull request number. */
number: Shared.Int,
/** Identifies the oid of the head ref associated with the pull request, even if the ref has been deleted. */
headRefOid: Shared.GitObjectID,
/** The head and base repositories are different. */
isCrossRepository: Schema.Boolean,
/** The owner of the repository associated with this pull request's head Ref. */
headRepositoryOwner: Schema.NullOr(RepositoryOwner)
})
export interface NodesPullRequest extends Schema.Struct.Type<typeof NodesPullRequest.fields> {}
/** The connection type for PullRequest. */
export const PullRequestConnection = Schema.Struct({
/** Information to aid in pagination. */
pageInfo: ContextsPageInfoPageInfo,
/** A list of nodes. */
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(NodesPullRequest)))
})
export interface PullRequestConnection extends Schema.Struct.Type<typeof PullRequestConnection.fields> {}
/** A repository contains the content for a project. */
export const PullRequestHeadsRepositoryRepository = Schema.Struct({
/** A list of pull requests that have been opened in the repository. */
pullRequests: PullRequestConnection
})
export interface PullRequestHeadsRepositoryRepository extends Schema.Struct.Type<typeof PullRequestHeadsRepositoryRepository.fields> {}
/** `query PullRequestHeads` */
export const PullRequestHeads = GraphQL.query("PullRequestHeads", {
document: {
variables: [
{ name: "owner", body: "String!" },
{ name: "name", body: "String!" },
{ name: "head", body: "String!" },
{ name: "after", body: "String" }
],
selections: [
{ 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}}}}"] }
],
fragments: []
},
variables: {
owner: Schema.String,
name: Schema.String,
head: Schema.String,
after: Schema.optional(Schema.NullOr(Schema.String))
},
result: Schema.Struct({
/** Lookup a given repository by the owner and repository name. */
repository: Schema.NullOr(PullRequestHeadsRepositoryRepository)
})
})
export declare namespace PullRequestHeads {
export type Variables = typeof PullRequestHeads.variables.Type
export type Result = typeof PullRequestHeads.result.Type
}
/** A repository pull request. */
export const PullRequestNodeIdRepositoryPullRequestPullRequest = Schema.Struct({
/** The Node ID of the PullRequest object */
id: Shared.ID
})
export interface PullRequestNodeIdRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof PullRequestNodeIdRepositoryPullRequestPullRequest.fields> {}
/** A repository contains the content for a project. */
export const PullRequestNodeIdRepositoryRepository = Schema.Struct({
/** Returns a single pull request from the current repository by number. */
pullRequest: Schema.NullOr(PullRequestNodeIdRepositoryPullRequestPullRequest)
})
export interface PullRequestNodeIdRepositoryRepository extends Schema.Struct.Type<typeof PullRequestNodeIdRepositoryRepository.fields> {}
/** `query PullRequestNodeId` */
export const PullRequestNodeId = GraphQL.query("PullRequestNodeId", {
document: {
variables: [
{ name: "owner", body: "String!" },
{ name: "name", body: "String!" },
{ name: "number", body: "Int!" }
],
selections: [
{ name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){id}}"] }
],
fragments: []
},
variables: {
owner: Schema.String,
name: Schema.String,
number: Shared.Int
},
result: Schema.Struct({
/** Lookup a given repository by the owner and repository name. */
repository: Schema.NullOr(PullRequestNodeIdRepositoryRepository)
})
})
export declare namespace PullRequestNodeId {
export type Variables = typeof PullRequestNodeId.variables.Type
export type Result = typeof PullRequestNodeId.result.Type
}
/** Represents a comment on an Issue. */
export const NodeIssueComment = Schema.Struct({
__typename: Schema.Literal("IssueComment"),
/** The Node ID of the IssueComment object */
id: Shared.ID,
/**
* Returns the pull request associated with the comment, if this comment was made on a
* pull request.
*/
pullRequest: Schema.NullOr(PullRequestNodeIdRepositoryPullRequestPullRequest)
})
export interface NodeIssueComment extends Schema.Struct.Type<typeof NodeIssueComment.fields> {}
/** A review comment associated with a given repository pull request. */
export const PullRequestReviewComment = Schema.Struct({
__typename: Schema.Literal("PullRequestReviewComment"),
/** The Node ID of the PullRequestReviewComment object */
id: Shared.ID,
/** The pull request associated with this review comment. */
reviewCommentPullRequest: PullRequestNodeIdRepositoryPullRequestPullRequest
})
export interface PullRequestReviewComment extends Schema.Struct.Type<typeof PullRequestReviewComment.fields> {}
/** A review object for a given pull request. */
export const NodePullRequestReview = Schema.Struct({
__typename: Schema.Literal("PullRequestReview"),
/** The Node ID of the PullRequestReview object */
id: Shared.ID,
/** Identifies the pull request associated with this pull request review. */
reviewPullRequest: PullRequestNodeIdRepositoryPullRequestPullRequest
})
export interface NodePullRequestReview extends Schema.Struct.Type<typeof NodePullRequestReview.fields> {}
/** An object with an ID. */
export const PullRequestSubjectNodeNodeOther = Schema.Struct({
__typename: GraphQL.otherTypename<Shared.Typename.Node>()(["IssueComment", "PullRequestReviewComment", "PullRequestReview"]),
/** ID of the object. */
id: Shared.ID
})
export interface PullRequestSubjectNodeNodeOther extends Schema.Struct.Type<typeof PullRequestSubjectNodeNodeOther.fields> {}
/** `query PullRequestSubject` */
export const PullRequestSubject = GraphQL.query("PullRequestSubject", {
document: {
variables: [
{ name: "owner", body: "String!" },
{ name: "name", body: "String!" },
{ name: "number", body: "Int!" },
{ name: "subjectId", body: "ID!" }
],
selections: [
{ name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){id}}"] },
{ name: "node", body: ["(id:$", "subjectId", "){__typename id...on IssueComment{pullRequest{id}}...on PullRequestReviewComment{reviewCommentPullRequest:pullRequest{id}}...on PullRequestReview{reviewPullRequest:pullRequest{id}}}"] }
],
fragments: []
},
variables: {
owner: Schema.String,
name: Schema.String,
number: Shared.Int,
subjectId: Shared.ID
},
result: Schema.Struct({
/** Lookup a given repository by the owner and repository name. */
repository: Schema.NullOr(PullRequestNodeIdRepositoryRepository),
/** Fetches an object given its ID. */
node: Schema.NullOr(Schema.Union([
NodeIssueComment,
PullRequestReviewComment,
NodePullRequestReview,
PullRequestSubjectNodeNodeOther
]))
})
})
export declare namespace PullRequestSubject {
export type Variables = typeof PullRequestSubject.variables.Type
export type Result = typeof PullRequestSubject.result.Type
}
/** A repository contains the content for a project. */
export const ViewerPermissionsRepositoryPullRequestHeadRepositoryRepository = Schema.Struct({
/** The users permission level on the repository. Will return null if authenticated as an GitHub App. */
viewerPermission: Schema.NullOr(GraphQL.enumLiterals(Shared.RepositoryPermission.literals))
})
export interface ViewerPermissionsRepositoryPullRequestHeadRepositoryRepository extends Schema.Struct.Type<typeof ViewerPermissionsRepositoryPullRequestHeadRepositoryRepository.fields> {}
/** A repository pull request. */
export const ViewerPermissionsRepositoryPullRequestPullRequest = Schema.Struct({
/** Check if the current viewer can update this object. */
viewerCanUpdate: Schema.Boolean,
/** Did the viewer author this comment. */
viewerDidAuthor: Schema.Boolean,
/** The repository associated with this pull request's head Ref. */
headRepository: Schema.NullOr(ViewerPermissionsRepositoryPullRequestHeadRepositoryRepository)
})
export interface ViewerPermissionsRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof ViewerPermissionsRepositoryPullRequestPullRequest.fields> {}
/** A repository contains the content for a project. */
export const ViewerPermissionsRepositoryRepository = Schema.Struct({
/** Whether or not PRs are merged with a merge commit on this repository. */
mergeCommitAllowed: Schema.Boolean,
/** Whether or not squash-merging is enabled on this repository. */
squashMergeAllowed: Schema.Boolean,
/** Whether or not rebase-merging is enabled on this repository. */
rebaseMergeAllowed: Schema.Boolean,
/** Whether or not Auto-merge can be enabled on pull requests in this repository. */
autoMergeAllowed: Schema.Boolean,
/** The users permission level on the repository. Will return null if authenticated as an GitHub App. */
viewerPermission: Schema.NullOr(GraphQL.enumLiterals(Shared.RepositoryPermission.literals)),
/** Returns a single pull request from the current repository by number. */
pullRequest: Schema.NullOr(ViewerPermissionsRepositoryPullRequestPullRequest)
})
export interface ViewerPermissionsRepositoryRepository extends Schema.Struct.Type<typeof ViewerPermissionsRepositoryRepository.fields> {}
/** `query ViewerPermissions` */
export const ViewerPermissions = GraphQL.query("ViewerPermissions", {
document: {
variables: [
{ name: "owner", body: "String!" },
{ name: "name", body: "String!" },
{ name: "number", body: "Int!" }
],
selections: [
{ name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){mergeCommitAllowed squashMergeAllowed rebaseMergeAllowed autoMergeAllowed viewerPermission pullRequest(number:$", "number", "){viewerCanUpdate viewerDidAuthor headRepository{viewerPermission}}}"] }
],
fragments: []
},
variables: {
owner: Schema.String,
name: Schema.String,
number: Shared.Int
},
result: Schema.Struct({
/** Lookup a given repository by the owner and repository name. */
repository: Schema.NullOr(ViewerPermissionsRepositoryRepository)
})
})
export declare namespace ViewerPermissions {
export type Variables = typeof ViewerPermissions.variables.Type
export type Result = typeof ViewerPermissions.result.Type
}
/** Information about pagination in a connection. */
export const AssignableUsersPageInfoPageInfo = Schema.Struct({
/** When paginating forwards, are there more items? */
hasNextPage: Schema.Boolean
})
export interface AssignableUsersPageInfoPageInfo extends Schema.Struct.Type<typeof AssignableUsersPageInfoPageInfo.fields> {}
/** A user is an individual's account on GitHub that owns repositories and can make new content. */
export const AssignableUsersNodesUser = Schema.Struct({
/** The username used to login. */
login: Schema.String,
/** The user's public profile name. */
name: Schema.NullOr(Schema.String),
/** A URL pointing to the user's public avatar. */
avatarUrl: Shared.URI
})
export interface AssignableUsersNodesUser extends Schema.Struct.Type<typeof AssignableUsersNodesUser.fields> {}
/** A list of users. */
export const UserConnection = Schema.Struct({
/** Information to aid in pagination. */
pageInfo: AssignableUsersPageInfoPageInfo,
/** A list of nodes. */
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(AssignableUsersNodesUser)))
})
export interface UserConnection extends Schema.Struct.Type<typeof UserConnection.fields> {}
/** Represents an object which can take actions on GitHub. Typically a User or Bot. */
export const Actor = Schema.Struct({
__typename: GraphQL.otherTypename<Shared.Typename.Actor>()([]),
/** The username of the actor. */
login: Schema.String
})
export interface Actor extends Schema.Struct.Type<typeof Actor.fields> {}
/** A request for a user to review a pull request. */
export const ReviewerCandidatesRepositoryPullRequestReviewRequestsNodesReviewRequest = Schema.Struct({
/** The reviewer that is requested. */
requestedReviewer: Schema.NullOr(Schema.Union([
PullRequestPreviewRepositoryPullRequestAuthorUser,
Team,
NodesBot,
RequestedReviewerOther
]))
})
export interface ReviewerCandidatesRepositoryPullRequestReviewRequestsNodesReviewRequest extends Schema.Struct.Type<typeof ReviewerCandidatesRepositoryPullRequestReviewRequestsNodesReviewRequest.fields> {}
/** The connection type for ReviewRequest. */
export const ReviewerCandidatesRepositoryPullRequestReviewRequestsReviewRequestConnection = Schema.Struct({
/** A list of nodes. */
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(ReviewerCandidatesRepositoryPullRequestReviewRequestsNodesReviewRequest)))
})
export interface ReviewerCandidatesRepositoryPullRequestReviewRequestsReviewRequestConnection extends Schema.Struct.Type<typeof ReviewerCandidatesRepositoryPullRequestReviewRequestsReviewRequestConnection.fields> {}
/** A repository pull request. */
export const ReviewerCandidatesRepositoryPullRequestPullRequest = Schema.Struct({
/** The actor who authored the comment. */
author: Schema.NullOr(Actor),
/** A list of review requests associated with the pull request. */
reviewRequests: Schema.NullOr(ReviewerCandidatesRepositoryPullRequestReviewRequestsReviewRequestConnection)
})
export interface ReviewerCandidatesRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof ReviewerCandidatesRepositoryPullRequestPullRequest.fields> {}
/** A repository contains the content for a project. */
export const ReviewerCandidatesRepositoryRepository = Schema.Struct({
/** A list of users that can be assigned to issues in this repository. */
assignableUsers: UserConnection,
/** Returns a single pull request from the current repository by number. */
pullRequest: Schema.NullOr(ReviewerCandidatesRepositoryPullRequestPullRequest)
})
export interface ReviewerCandidatesRepositoryRepository extends Schema.Struct.Type<typeof ReviewerCandidatesRepositoryRepository.fields> {}
/** `query ReviewerCandidates` */
export const ReviewerCandidates = GraphQL.query("ReviewerCandidates", {
document: {
variables: [
{ name: "owner", body: "String!" },
{ name: "name", body: "String!" },
{ name: "number", body: "Int!" },
{ name: "query", body: "String" }
],
selections: [
{ name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){assignableUsers(first:100 query:$", "query", "){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}}}}}}"] }
],
fragments: []
},
variables: {
owner: Schema.String,
name: Schema.String,
number: Shared.Int,
query: Schema.optional(Schema.NullOr(Schema.String))
},
result: Schema.Struct({
/** Lookup a given repository by the owner and repository name. */
repository: Schema.NullOr(ReviewerCandidatesRepositoryRepository)
})
})
export declare namespace ReviewerCandidates {
export type Variables = typeof ReviewerCandidates.variables.Type
export type Result = typeof ReviewerCandidates.result.Type
}
/** A label for categorizing Issues, Pull Requests, Milestones, or Discussions with a given Repository. */
export const RepositoryLabelsNodesLabel = Schema.Struct({
/** Identifies the label name. */
name: Schema.String,
/** Identifies the label color. */
color: Schema.String,
/** A brief description of this label. */
description: Schema.NullOr(Schema.String)
})
export interface RepositoryLabelsNodesLabel extends Schema.Struct.Type<typeof RepositoryLabelsNodesLabel.fields> {}
/** The connection type for Label. */
export const LabelCandidatesRepositoryLabelsLabelConnection = Schema.Struct({
/** Information to aid in pagination. */
pageInfo: AssignableUsersPageInfoPageInfo,
/** A list of nodes. */
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(RepositoryLabelsNodesLabel)))
})
export interface LabelCandidatesRepositoryLabelsLabelConnection extends Schema.Struct.Type<typeof LabelCandidatesRepositoryLabelsLabelConnection.fields> {}
/** A label for categorizing Issues, Pull Requests, Milestones, or Discussions with a given Repository. */
export const LabelCandidatesRepositoryPullRequestLabelsNodesLabel = Schema.Struct({
/** Identifies the label name. */
name: Schema.String
})
export interface LabelCandidatesRepositoryPullRequestLabelsNodesLabel extends Schema.Struct.Type<typeof LabelCandidatesRepositoryPullRequestLabelsNodesLabel.fields> {}
/** The connection type for Label. */
export const LabelCandidatesRepositoryPullRequestLabelsLabelConnection = Schema.Struct({
/** A list of nodes. */
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(LabelCandidatesRepositoryPullRequestLabelsNodesLabel)))
})
export interface LabelCandidatesRepositoryPullRequestLabelsLabelConnection extends Schema.Struct.Type<typeof LabelCandidatesRepositoryPullRequestLabelsLabelConnection.fields> {}
/** A repository pull request. */
export const LabelCandidatesRepositoryPullRequestPullRequest = Schema.Struct({
/** A list of labels associated with the object. */
labels: Schema.NullOr(LabelCandidatesRepositoryPullRequestLabelsLabelConnection)
})
export interface LabelCandidatesRepositoryPullRequestPullRequest extends Schema.Struct.Type<typeof LabelCandidatesRepositoryPullRequestPullRequest.fields> {}
/** A repository contains the content for a project. */
export const LabelCandidatesRepositoryRepository = Schema.Struct({
/** A list of labels associated with the repository. */
labels: Schema.NullOr(LabelCandidatesRepositoryLabelsLabelConnection),
/** Returns a single pull request from the current repository by number. */
pullRequest: Schema.NullOr(LabelCandidatesRepositoryPullRequestPullRequest)
})
export interface LabelCandidatesRepositoryRepository extends Schema.Struct.Type<typeof LabelCandidatesRepositoryRepository.fields> {}
/** `query LabelCandidates` */
export const LabelCandidates = GraphQL.query("LabelCandidates", {
document: {
variables: [
{ name: "owner", body: "String!" },
{ name: "name", body: "String!" },
{ name: "number", body: "Int!" }
],
selections: [
{ 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}}}}"] }
],
fragments: []
},
variables: {
owner: Schema.String,
name: Schema.String,
number: Shared.Int
},
result: Schema.Struct({
/** Lookup a given repository by the owner and repository name. */
repository: Schema.NullOr(LabelCandidatesRepositoryRepository)
})
})
export declare namespace LabelCandidates {
export type Variables = typeof LabelCandidates.variables.Type
export type Result = typeof LabelCandidates.result.Type
}
/** The connection type for Label. */
export const RepositoryLabelsRepositoryLabelsLabelConnection = Schema.Struct({
/** Information to aid in pagination. */
pageInfo: AssignableUsersPageInfoPageInfo,
/** A list of nodes. */
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(PullRequestCoreRepositoryPullRequestLabelsNodesLabel)))
})
export interface RepositoryLabelsRepositoryLabelsLabelConnection extends Schema.Struct.Type<typeof RepositoryLabelsRepositoryLabelsLabelConnection.fields> {}
/** A repository contains the content for a project. */
export const RepositoryLabelsRepositoryRepository = Schema.Struct({
/** A list of labels associated with the repository. */
labels: Schema.NullOr(RepositoryLabelsRepositoryLabelsLabelConnection)
})
export interface RepositoryLabelsRepositoryRepository extends Schema.Struct.Type<typeof RepositoryLabelsRepositoryRepository.fields> {}
/** `query RepositoryLabels` */
export const RepositoryLabels = GraphQL.query("RepositoryLabels", {
document: {
variables: [
{ name: "owner", body: "String!" },
{ name: "name", body: "String!" },
{ name: "query", body: "String" }
],
selections: [
{ name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){labels(first:100 query:$", "query", " orderBy:{field:NAME direction:ASC}){pageInfo{hasNextPage}nodes{name color}}}"] }
],
fragments: []
},
variables: {
owner: Schema.String,
name: Schema.String,
query: Schema.optional(Schema.NullOr(Schema.String))
},
result: Schema.Struct({
/** Lookup a given repository by the owner and repository name. */
repository: Schema.NullOr(RepositoryLabelsRepositoryRepository)
})
})
export declare namespace RepositoryLabels {
export type Variables = typeof RepositoryLabels.variables.Type
export type Result = typeof RepositoryLabels.result.Type
}
/** The results of a search. */
export const SearchResultItemOther = Schema.Struct({
__typename: GraphQL.otherTypename<Shared.Typename.SearchResultItem>()(["Issue", "PullRequest"])
})
export interface SearchResultItemOther extends Schema.Struct.Type<typeof SearchResultItemOther.fields> {}
/**
* A list of results that matched against a search query. Regardless of the number
* of matches, a maximum of 1,000 results will be available across all types,
* potentially split across many pages.
*/
export const SearchResultItemConnection = Schema.Struct({
/** Information to aid in pagination. */
pageInfo: AssignableUsersPageInfoPageInfo,
/** A list of nodes. */
nodes: Schema.NullOr(Schema.Array(Schema.NullOr(Schema.Union([
Issue,
ReferenceCandidatePullRequest,
SearchResultItemOther
]))))
})
export interface SearchResultItemConnection extends Schema.Struct.Type<typeof SearchResultItemConnection.fields> {}
/** A repository contains the content for a project. */
export const RepositoryReferencesRepositoryRepository = Schema.Struct({
/** Returns a single issue-like object from the current repository by number. */
issueOrPullRequest: Schema.NullOr(ReferenceCandidate)
})
export interface RepositoryReferencesRepositoryRepository extends Schema.Struct.Type<typeof RepositoryReferencesRepositoryRepository.fields> {}
/** `query RepositoryReferences` */
export const RepositoryReferences = GraphQL.query("RepositoryReferences", {
document: {
variables: [
{ name: "owner", body: "String!" },
{ name: "name", body: "String!" },
{ name: "q", body: "String!" },
{ name: "number", body: "Int!" },
{ name: "exact", body: "Boolean!" }
],
selections: [
{ name: "search", body: ["(query:$", "q", " type:ISSUE first:20){pageInfo{hasNextPage}nodes{__typename...ReferenceCandidate}}"] },
{ name: "repository", body: ["(owner:$", "owner", " name:$", "name", ")@include(if:$", "exact", "){issueOrPullRequest(number:$", "number", "){__typename...ReferenceCandidate}}"] }
],
fragments: [
{ name: "ReferenceCandidate", body: ["on IssueOrPullRequest{__typename...on Issue{number title issueState:state}...on PullRequest{number title pullRequestState:state}}"] }
]
},
variables: {
owner: Schema.String,
name: Schema.String,
q: Schema.String,
number: Shared.Int,
exact: Schema.Boolean
},
result: Schema.Struct({
/** Perform a search across resources, returning a maximum of 1,000 results. */
search: SearchResultItemConnection,
/** Lookup a given repository by the owner and repository name. */
repository: Schema.optionalKey(Schema.NullOr(RepositoryReferencesRepositoryRepository))
})
})
export declare namespace RepositoryReferences {