Skip to content

Commit

Permalink
feat: abortRepositoryMigration mutation, `PullRequestReview#{isMini…
Browse files Browse the repository at this point in the history
…mized,minimizedReason,viewerCanMinimize}` (#854)

Co-authored-by: Gregor Martynus <[email protected]>
  • Loading branch information
octokitbot and gr2m authored Nov 3, 2023
1 parent 1a4db83 commit 98242b2
Show file tree
Hide file tree
Showing 3 changed files with 263 additions and 26 deletions.
67 changes: 48 additions & 19 deletions schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> =
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string; output: string; }
ID: { input: string | number; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Expand Down Expand Up @@ -56,6 +56,23 @@ export type AbortQueuedMigrationsPayload = {
success?: Maybe<Scalars['Boolean']['output']>;
};

/** Autogenerated input type of AbortRepositoryMigration */
export type AbortRepositoryMigrationInput = {
/** A unique identifier for the client performing the mutation. */
clientMutationId?: InputMaybe<Scalars['String']['input']>;
/** The ID of the migration to be aborted. */
migrationId: Scalars['ID']['input'];
};

/** Autogenerated return type of AbortRepositoryMigration */
export type AbortRepositoryMigrationPayload = {
__typename?: 'AbortRepositoryMigrationPayload';
/** A unique identifier for the client performing the mutation. */
clientMutationId?: Maybe<Scalars['String']['output']>;
/** Did the operation succeed? */
success?: Maybe<Scalars['Boolean']['output']>;
};

/** Autogenerated input type of AcceptEnterpriseAdministratorInvitation */
export type AcceptEnterpriseAdministratorInvitationInput = {
/** A unique identifier for the client performing the mutation. */
Expand Down Expand Up @@ -10430,7 +10447,7 @@ export type MinimizeCommentPayload = {
/** A unique identifier for the client performing the mutation. */
clientMutationId?: Maybe<Scalars['String']['output']>;
/** The comment that was minimized. */
minimizedComment?: Maybe<CommitComment | DiscussionComment | GistComment | IssueComment | PullRequestReviewComment>;
minimizedComment?: Maybe<CommitComment | DiscussionComment | GistComment | IssueComment | PullRequestReview | PullRequestReviewComment>;
};

/** Autogenerated input type of MoveProjectCard */
Expand Down Expand Up @@ -10490,6 +10507,8 @@ export type Mutation = {
__typename?: 'Mutation';
/** Clear all of a customer's queued migrations */
abortQueuedMigrations?: Maybe<AbortQueuedMigrationsPayload>;
/** Abort a repository migration queued or in progress. */
abortRepositoryMigration?: Maybe<AbortRepositoryMigrationPayload>;
/** Accepts a pending invitation for a user to become an administrator of an enterprise. */
acceptEnterpriseAdministratorInvitation?: Maybe<AcceptEnterpriseAdministratorInvitationPayload>;
/** Applies a suggested topic to the repository. */
Expand Down Expand Up @@ -10983,6 +11002,12 @@ export type MutationAbortQueuedMigrationsArgs = {
};


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


/** The root query for implementing GraphQL mutations. */
export type MutationAcceptEnterpriseAdministratorInvitationArgs = {
input: AcceptEnterpriseAdministratorInvitationInput;
Expand Down Expand Up @@ -17650,7 +17675,7 @@ export type PullRequestParametersInput = {
};

/** A review object for a given pull request. */
export type PullRequestReview = Comment & Deletable & Node & Reactable & RepositoryNode & Updatable & UpdatableComment & {
export type PullRequestReview = Comment & Deletable & Minimizable & Node & Reactable & RepositoryNode & Updatable & UpdatableComment & {
__typename?: 'PullRequestReview';
/** The actor who authored the comment. */
author?: Maybe<Bot | EnterpriseUserAccount | Mannequin | Organization | User>;
Expand Down Expand Up @@ -17679,8 +17704,16 @@ export type PullRequestReview = Comment & Deletable & Node & Reactable & Reposit
id: Scalars['ID']['output'];
/** Check if this comment was edited and includes an edit with the creation data */
includesCreatedEdit: Scalars['Boolean']['output'];
/** Returns whether or not a comment has been minimized. */
isMinimized: Scalars['Boolean']['output'];
/** The moment the editor made the last edit */
lastEditedAt?: Maybe<Scalars['DateTime']['output']>;
/**
* Returns why the comment was minimized. One of `abuse`, `off-topic`,
* `outdated`, `resolved`, `duplicate` and `spam`. Note that the case and
* formatting of these values differs from the inputs to the `MinimizeComment` mutation.
*/
minimizedReason?: Maybe<Scalars['String']['output']>;
/** A list of teams that this review was made on behalf of. */
onBehalfOf: TeamConnection;
/** Identifies when the comment was published at. */
Expand All @@ -17707,6 +17740,8 @@ export type PullRequestReview = Comment & Deletable & Node & Reactable & Reposit
userContentEdits?: Maybe<UserContentEditConnection>;
/** Check if the current viewer can delete this object. */
viewerCanDelete: Scalars['Boolean']['output'];
/** Check if the current viewer can minimize this object. */
viewerCanMinimize: Scalars['Boolean']['output'];
/** Can user react to this subject */
viewerCanReact: Scalars['Boolean']['output'];
/** Check if the current viewer can update this object. */
Expand Down Expand Up @@ -21930,7 +21965,7 @@ export type RepositoryRuleType =
| 'NON_FAST_FORWARD'
/** Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. */
| 'PULL_REQUEST'
/** Choose which environments must be successfully deployed to before refs can be merged into a branch that matches this rule. */
/** Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule. */
| 'REQUIRED_DEPLOYMENTS'
/** Prevent merge commits from being pushed to matching refs. */
| 'REQUIRED_LINEAR_HISTORY'
Expand All @@ -21942,10 +21977,8 @@ export type RepositoryRuleType =
/** Commits pushed to matching refs must have verified signatures. */
| 'REQUIRED_SIGNATURES'
/**
* Choose which status checks must pass before branches can be merged into a
* branch that matches this rule. When enabled, commits must first be pushed to
* another branch, then merged or pushed directly to a ref that matches this rule
* after status checks have passed.
* Choose which status checks must pass before the ref is updated. When enabled,
* commits must first be pushed to another ref where the checks pass.
*/
| 'REQUIRED_STATUS_CHECKS'
/**
Expand Down Expand Up @@ -22397,14 +22430,14 @@ export type RequirableByPullRequestIsRequiredArgs = {
pullRequestNumber?: InputMaybe<Scalars['Int']['input']>;
};

/** Choose which environments must be successfully deployed to before refs can be merged into a branch that matches this rule. */
/** Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule. */
export type RequiredDeploymentsParameters = {
__typename?: 'RequiredDeploymentsParameters';
/** The environments that must be successfully deployed to before branches can be merged. */
requiredDeploymentEnvironments: Array<Scalars['String']['output']>;
};

/** Choose which environments must be successfully deployed to before refs can be merged into a branch that matches this rule. */
/** Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule. */
export type RequiredDeploymentsParametersInput = {
/** The environments that must be successfully deployed to before branches can be merged. */
requiredDeploymentEnvironments: Array<Scalars['String']['input']>;
Expand Down Expand Up @@ -22432,10 +22465,8 @@ export type RequiredStatusCheckInput = {
};

/**
* Choose which status checks must pass before branches can be merged into a branch
* that matches this rule. When enabled, commits must first be pushed to another
* branch, then merged or pushed directly to a ref that matches this rule after
* status checks have passed.
* Choose which status checks must pass before the ref is updated. When enabled,
* commits must first be pushed to another ref where the checks pass.
*/
export type RequiredStatusChecksParameters = {
__typename?: 'RequiredStatusChecksParameters';
Expand All @@ -22450,10 +22481,8 @@ export type RequiredStatusChecksParameters = {
};

/**
* Choose which status checks must pass before branches can be merged into a branch
* that matches this rule. When enabled, commits must first be pushed to another
* branch, then merged or pushed directly to a ref that matches this rule after
* status checks have passed.
* Choose which status checks must pass before the ref is updated. When enabled,
* commits must first be pushed to another ref where the checks pass.
*/
export type RequiredStatusChecksParametersInput = {
/** Status checks that are required. */
Expand Down Expand Up @@ -26625,7 +26654,7 @@ export type UnminimizeCommentPayload = {
/** A unique identifier for the client performing the mutation. */
clientMutationId?: Maybe<Scalars['String']['output']>;
/** The comment that was unminimized. */
unminimizedComment?: Maybe<CommitComment | DiscussionComment | GistComment | IssueComment | PullRequestReviewComment>;
unminimizedComment?: Maybe<CommitComment | DiscussionComment | GistComment | IssueComment | PullRequestReview | PullRequestReviewComment>;
};

/** Autogenerated input type of UnpinIssue */
Expand Down
59 changes: 58 additions & 1 deletion schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,36 @@ type AbortQueuedMigrationsPayload {
success: Boolean
}

"""
Autogenerated input type of AbortRepositoryMigration
"""
input AbortRepositoryMigrationInput {
"""
A unique identifier for the client performing the mutation.
"""
clientMutationId: String

"""
The ID of the migration to be aborted.
"""
migrationId: ID!
}

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

"""
Did the operation succeed?
"""
success: Boolean
}

"""
Autogenerated input type of AcceptEnterpriseAdministratorInvitation
"""
Expand Down Expand Up @@ -20762,6 +20792,16 @@ type Mutation {
input: AbortQueuedMigrationsInput!
): AbortQueuedMigrationsPayload

"""
Abort a repository migration queued or in progress.
"""
abortRepositoryMigration(
"""
Parameters for AbortRepositoryMigration
"""
input: AbortRepositoryMigrationInput!
): AbortRepositoryMigrationPayload

"""
Accepts a pending invitation for a user to become an administrator of an enterprise.
"""
Expand Down Expand Up @@ -34583,7 +34623,7 @@ input PullRequestParametersInput {
"""
A review object for a given pull request.
"""
type PullRequestReview implements Comment & Deletable & Node & Reactable & RepositoryNode & Updatable & UpdatableComment {
type PullRequestReview implements Comment & Deletable & Minimizable & Node & Reactable & RepositoryNode & Updatable & UpdatableComment {
"""
The actor who authored the comment.
"""
Expand Down Expand Up @@ -34670,11 +34710,23 @@ type PullRequestReview implements Comment & Deletable & Node & Reactable & Repos
"""
includesCreatedEdit: Boolean!

"""
Returns whether or not a comment has been minimized.
"""
isMinimized: Boolean!

"""
The moment the editor made the last edit
"""
lastEditedAt: DateTime

"""
Returns why the comment was minimized. One of `abuse`, `off-topic`,
`outdated`, `resolved`, `duplicate` and `spam`. Note that the case and
formatting of these values differs from the inputs to the `MinimizeComment` mutation.
"""
minimizedReason: String

"""
A list of teams that this review was made on behalf of.
"""
Expand Down Expand Up @@ -34810,6 +34862,11 @@ type PullRequestReview implements Comment & Deletable & Node & Reactable & Repos
"""
viewerCanDelete: Boolean!

"""
Check if the current viewer can minimize this object.
"""
viewerCanMinimize: Boolean!

"""
Can user react to this subject
"""
Expand Down
Loading

0 comments on commit 98242b2

Please sign in to comment.