Open History to see the last commit
1// Generated by @effect/graphql-generator from stackActions.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/** A repository contains the content for a project. */
7export const HeadRepositoryRepository = Schema.Struct({
8 /** The users permission level on the repository. Will return null if authenticated as an GitHub App. */
9 viewerPermission: Schema.NullOr(GraphQL.enumLiterals(Shared.RepositoryPermission.literals))
10})
11export interface HeadRepositoryRepository extends Schema.Struct.Type<typeof HeadRepositoryRepository.fields> {}
12
13/** A repository pull request. */
14export const PullRequest = Schema.Struct({
15 /** The repository associated with this pull request's head Ref. */
16 headRepository: Schema.NullOr(HeadRepositoryRepository),
17 /** Indicates whether maintainers can modify the pull request. */
18 maintainerCanModify: Schema.Boolean
19})
20export interface PullRequest extends Schema.Struct.Type<typeof PullRequest.fields> {}
21
22/** A repository contains the content for a project. */
23export const RepositoryRepository = Schema.Struct({
24 /** Returns a single pull request from the current repository by number. */
25 pullRequest: Schema.NullOr(PullRequest)
26})
27export interface RepositoryRepository extends Schema.Struct.Type<typeof RepositoryRepository.fields> {}
28
29/** `query PullRequestBranchAccess` */
30export const PullRequestBranchAccess = GraphQL.query("PullRequestBranchAccess", {
31 document: {
32 variables: [
33 { name: "owner", body: "String!" },
34 { name: "name", body: "String!" },
35 { name: "number", body: "Int!" }
36 ],
37 selections: [
38 { name: "repository", body: ["(owner:$", "owner", " name:$", "name", "){pullRequest(number:$", "number", "){headRepository{viewerPermission}maintainerCanModify}}"] }
39 ],
40 fragments: []
41 },
42 variables: {
43 owner: Schema.String,
44 name: Schema.String,
45 number: Shared.Int
46 },
47 result: Schema.Struct({
48 /** Lookup a given repository by the owner and repository name. */
49 repository: Schema.NullOr(RepositoryRepository)
50 })
51})
52export declare namespace PullRequestBranchAccess {
53 export type Variables = typeof PullRequestBranchAccess.variables.Type
54 export type Result = typeof PullRequestBranchAccess.result.Type
55}
56
57/** Every operation in stackActions.graphql. */
58export const StackActionsGraphQLGroup = GraphQLGroup.make(PullRequestBranchAccess)