Skip to content

Commit

Permalink
feat: DeploymentStatus#environment, createDeployment and `createD…
Browse files Browse the repository at this point in the history
…eploymentStatus` mutations (#935)
  • Loading branch information
octokitbot authored Apr 18, 2024
1 parent 577dd44 commit 366d727
Show file tree
Hide file tree
Showing 3 changed files with 615 additions and 0 deletions.
91 changes: 91 additions & 0 deletions schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3591,6 +3591,79 @@ export type CreateCommitOnBranchPayload = {
ref?: Maybe<Ref>;
};

/** Autogenerated input type of CreateDeployment */
export type CreateDeploymentInput = {
/** Attempt to automatically merge the default branch into the requested ref, defaults to true. */
autoMerge?: InputMaybe<Scalars['Boolean']['input']>;
/** A unique identifier for the client performing the mutation. */
clientMutationId?: InputMaybe<Scalars['String']['input']>;
/** Short description of the deployment. */
description?: InputMaybe<Scalars['String']['input']>;
/** Name for the target deployment environment. */
environment?: InputMaybe<Scalars['String']['input']>;
/** JSON payload with extra information about the deployment. */
payload?: InputMaybe<Scalars['String']['input']>;
/** The node ID of the ref to be deployed. */
refId: Scalars['ID']['input'];
/** The node ID of the repository. */
repositoryId: Scalars['ID']['input'];
/**
* The status contexts to verify against commit status checks. To bypass required
* contexts, pass an empty array. Defaults to all unique contexts.
*/
requiredContexts?: InputMaybe<Array<Scalars['String']['input']>>;
/** Specifies a task to execute. */
task?: InputMaybe<Scalars['String']['input']>;
};

/** Autogenerated return type of CreateDeployment */
export type CreateDeploymentPayload = {
__typename?: 'CreateDeploymentPayload';
/** True if the default branch has been auto-merged into the deployment ref. */
autoMerged?: Maybe<Scalars['Boolean']['output']>;
/** A unique identifier for the client performing the mutation. */
clientMutationId?: Maybe<Scalars['String']['output']>;
/** The new deployment. */
deployment?: Maybe<Deployment>;
};

/** Autogenerated input type of CreateDeploymentStatus */
export type CreateDeploymentStatusInput = {
/**
* Adds a new inactive status to all non-transient, non-production environment
* deployments with the same repository and environment name as the created
* status's deployment.
*/
autoInactive?: InputMaybe<Scalars['Boolean']['input']>;
/** A unique identifier for the client performing the mutation. */
clientMutationId?: InputMaybe<Scalars['String']['input']>;
/** The node ID of the deployment. */
deploymentId: Scalars['ID']['input'];
/** A short description of the status. Maximum length of 140 characters. */
description?: InputMaybe<Scalars['String']['input']>;
/** If provided, updates the environment of the deploy. Otherwise, does not modify the environment. */
environment?: InputMaybe<Scalars['String']['input']>;
/** Sets the URL for accessing your environment. */
environmentUrl?: InputMaybe<Scalars['String']['input']>;
/**
* The log URL to associate with this status. This URL should contain
* output to keep the user updated while the task is running or serve as
* historical information for what happened in the deployment.
*/
logUrl?: InputMaybe<Scalars['String']['input']>;
/** The state of the deployment. */
state: DeploymentStatusState;
};

/** Autogenerated return type of CreateDeploymentStatus */
export type CreateDeploymentStatusPayload = {
__typename?: 'CreateDeploymentStatusPayload';
/** A unique identifier for the client performing the mutation. */
clientMutationId?: Maybe<Scalars['String']['output']>;
/** The new deployment status. */
deploymentStatus?: Maybe<DeploymentStatus>;
};

/** Autogenerated input type of CreateDiscussion */
export type CreateDiscussionInput = {
/** The body of the discussion. */
Expand Down Expand Up @@ -5575,6 +5648,8 @@ export type DeploymentStatus = Node & {
deployment: Deployment;
/** Identifies the description of the deployment. */
description?: Maybe<Scalars['String']['output']>;
/** Identifies the environment of the deployment at the time of this deployment status */
environment?: Maybe<Scalars['String']['output']>;
/** Identifies the environment URL of the deployment. */
environmentUrl?: Maybe<Scalars['URI']['output']>;
/** The Node ID of the DeploymentStatus object */
Expand Down Expand Up @@ -11065,6 +11140,10 @@ export type Mutation = {
* supported and will be marked as verified in the user interface.
*/
createCommitOnBranch?: Maybe<CreateCommitOnBranchPayload>;
/** Creates a new deployment event. */
createDeployment?: Maybe<CreateDeploymentPayload>;
/** Create a deployment status. */
createDeploymentStatus?: Maybe<CreateDeploymentStatusPayload>;
/** Create a discussion. */
createDiscussion?: Maybe<CreateDiscussionPayload>;
/**
Expand Down Expand Up @@ -11750,6 +11829,18 @@ export type MutationCreateCommitOnBranchArgs = {
};


/** The root query for implementing GraphQL mutations. */
export type MutationCreateDeploymentArgs = {
input: CreateDeploymentInput;
};


/** The root query for implementing GraphQL mutations. */
export type MutationCreateDeploymentStatusArgs = {
input: CreateDeploymentStatusInput;
};


/** The root query for implementing GraphQL mutations. */
export type MutationCreateDiscussionArgs = {
input: CreateDiscussionInput;
Expand Down
160 changes: 160 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -7005,6 +7005,141 @@ type CreateCommitOnBranchPayload {
ref: Ref
}

"""
Autogenerated input type of CreateDeployment
"""
input CreateDeploymentInput {
"""
Attempt to automatically merge the default branch into the requested ref, defaults to true.
"""
autoMerge: Boolean = true

"""
A unique identifier for the client performing the mutation.
"""
clientMutationId: String

"""
Short description of the deployment.
"""
description: String = ""

"""
Name for the target deployment environment.
"""
environment: String = "production"

"""
JSON payload with extra information about the deployment.
"""
payload: String = "{}"

"""
The node ID of the ref to be deployed.
"""
refId: ID!

"""
The node ID of the repository.
"""
repositoryId: ID!

"""
The status contexts to verify against commit status checks. To bypass required
contexts, pass an empty array. Defaults to all unique contexts.
"""
requiredContexts: [String!]

"""
Specifies a task to execute.
"""
task: String = "deploy"
}

"""
Autogenerated return type of CreateDeployment
"""
type CreateDeploymentPayload {
"""
True if the default branch has been auto-merged into the deployment ref.
"""
autoMerged: Boolean

"""
A unique identifier for the client performing the mutation.
"""
clientMutationId: String

"""
The new deployment.
"""
deployment: Deployment
}

"""
Autogenerated input type of CreateDeploymentStatus
"""
input CreateDeploymentStatusInput {
"""
Adds a new inactive status to all non-transient, non-production environment
deployments with the same repository and environment name as the created
status's deployment.
"""
autoInactive: Boolean = true

"""
A unique identifier for the client performing the mutation.
"""
clientMutationId: String

"""
The node ID of the deployment.
"""
deploymentId: ID!

"""
A short description of the status. Maximum length of 140 characters.
"""
description: String = ""

"""
If provided, updates the environment of the deploy. Otherwise, does not modify the environment.
"""
environment: String

"""
Sets the URL for accessing your environment.
"""
environmentUrl: String = ""

"""
The log URL to associate with this status. This URL should contain
output to keep the user updated while the task is running or serve as
historical information for what happened in the deployment.
"""
logUrl: String = ""

"""
The state of the deployment.
"""
state: DeploymentStatusState!
}

"""
Autogenerated return type of CreateDeploymentStatus
"""
type CreateDeploymentStatusPayload {
"""
A unique identifier for the client performing the mutation.
"""
clientMutationId: String

"""
The new deployment status.
"""
deploymentStatus: DeploymentStatus
}

"""
Autogenerated input type of CreateDiscussion
"""
Expand Down Expand Up @@ -10626,6 +10761,11 @@ type DeploymentStatus implements Node {
"""
description: String

"""
Identifies the environment of the deployment at the time of this deployment status
"""
environment: String

"""
Identifies the environment URL of the deployment.
"""
Expand Down Expand Up @@ -22233,6 +22373,26 @@ type Mutation {
input: CreateCommitOnBranchInput!
): CreateCommitOnBranchPayload

"""
Creates a new deployment event.
"""
createDeployment(
"""
Parameters for CreateDeployment
"""
input: CreateDeploymentInput!
): CreateDeploymentPayload

"""
Create a deployment status.
"""
createDeploymentStatus(
"""
Parameters for CreateDeploymentStatus
"""
input: CreateDeploymentStatusInput!
): CreateDeploymentStatusPayload

"""
Create a discussion.
"""
Expand Down
Loading

0 comments on commit 366d727

Please sign in to comment.