Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: importProject mutation #932

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,12 @@ export type AddedToProjectEvent = Node & {
databaseId?: Maybe<Scalars['Int']['output']>;
/** The Node ID of the AddedToProjectEvent object */
id: Scalars['ID']['output'];
/** Project referenced by event. */
project?: Maybe<Project>;
/** Project card referenced by this project event. */
projectCard?: Maybe<ProjectCard>;
/** Column name referenced by this project event. */
projectColumnName: Scalars['String']['output'];
};

/** Represents an announcement banner. */
Expand Down Expand Up @@ -3359,6 +3365,12 @@ export type ConvertedNoteToIssueEvent = Node & {
databaseId?: Maybe<Scalars['Int']['output']>;
/** The Node ID of the ConvertedNoteToIssueEvent object */
id: Scalars['ID']['output'];
/** Project referenced by event. */
project?: Maybe<Project>;
/** Project card referenced by this project event. */
projectCard?: Maybe<ProjectCard>;
/** Column name referenced by this project event. */
projectColumnName: Scalars['String']['output'];
};

/** Represents a 'converted_to_discussion' event on a given issue. */
Expand Down Expand Up @@ -8537,6 +8549,31 @@ export type IdentityProviderConfigurationState =
/** Authentication with an identity provider is not configured. */
| 'UNCONFIGURED';

/** Autogenerated input type of ImportProject */
export type ImportProjectInput = {
/** The description of Project. */
body?: InputMaybe<Scalars['String']['input']>;
/** A unique identifier for the client performing the mutation. */
clientMutationId?: InputMaybe<Scalars['String']['input']>;
/** A list of columns containing issues and pull requests. */
columnImports: Array<ProjectColumnImport>;
/** The name of Project. */
name: Scalars['String']['input'];
/** The name of the Organization or User to create the Project under. */
ownerName: Scalars['String']['input'];
/** Whether the Project is public or not. */
public?: InputMaybe<Scalars['Boolean']['input']>;
};

/** Autogenerated return type of ImportProject */
export type ImportProjectPayload = {
__typename?: 'ImportProjectPayload';
/** A unique identifier for the client performing the mutation. */
clientMutationId?: Maybe<Scalars['String']['output']>;
/** The new Project! */
project?: Maybe<Project>;
};

/** Autogenerated input type of InviteEnterpriseAdmin */
export type InviteEnterpriseAdminInput = {
/** A unique identifier for the client performing the mutation. */
Expand Down Expand Up @@ -10443,6 +10480,25 @@ export type MergeQueueMergingStrategy =
/** Failing Entires are allowed to merge if they are with a passing entry. */
| 'HEADGREEN';

/** Detailed status information about a pull request merge. */
export type MergeStateStatus =
/** The head ref is out of date. */
| 'BEHIND'
/** The merge is blocked. */
| 'BLOCKED'
/** Mergeable and passing commit status. */
| 'CLEAN'
/** The merge commit cannot be cleanly created. */
| 'DIRTY'
/** The merge is blocked due to the pull request being a draft. */
| 'DRAFT'
/** Mergeable with passing commit status and pre-receive hooks. */
| 'HAS_HOOKS'
/** The state cannot currently be determined. */
| 'UNKNOWN'
/** Mergeable with non-passing commit status. */
| 'UNSTABLE';

/** Whether or not a PullRequest can be merged. */
export type MergeableState =
/** The pull request cannot be merged due to merge conflicts. */
Expand Down Expand Up @@ -10763,6 +10819,14 @@ export type MovedColumnsInProjectEvent = Node & {
databaseId?: Maybe<Scalars['Int']['output']>;
/** The Node ID of the MovedColumnsInProjectEvent object */
id: Scalars['ID']['output'];
/** Column name the issue or pull request was moved from. */
previousProjectColumnName: Scalars['String']['output'];
/** Project referenced by event. */
project?: Maybe<Project>;
/** Project card referenced by this project event. */
projectCard?: Maybe<ProjectCard>;
/** Column name the issue or pull request was moved to. */
projectColumnName: Scalars['String']['output'];
};

/** The root query for implementing GraphQL mutations. */
Expand Down Expand Up @@ -11033,6 +11097,8 @@ export type Mutation = {
grantEnterpriseOrganizationsMigratorRole?: Maybe<GrantEnterpriseOrganizationsMigratorRolePayload>;
/** Grant the migrator role to a user or a team. */
grantMigratorRole?: Maybe<GrantMigratorRolePayload>;
/** Creates a new project by importing columns and a list of issues/PRs. */
importProject?: Maybe<ImportProjectPayload>;
/** Invite someone to become an administrator of the enterprise. */
inviteEnterpriseAdmin?: Maybe<InviteEnterpriseAdminPayload>;
/** Links a project to a repository. */
Expand Down Expand Up @@ -11921,6 +11987,12 @@ export type MutationGrantMigratorRoleArgs = {
};


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


/** The root query for implementing GraphQL mutations. */
export type MutationInviteEnterpriseAdminArgs = {
input: InviteEnterpriseAdminInput;
Expand Down Expand Up @@ -16031,6 +16103,14 @@ export type ProjectCardEdge = {
node?: Maybe<ProjectCard>;
};

/** An issue or PR and its owning repository to be used in a project card. */
export type ProjectCardImport = {
/** The issue or pull request number. */
number: Scalars['Int']['input'];
/** Repository name with owner (owner/repository). */
repository: Scalars['String']['input'];
};

/** Types that can be inside Project Cards. */
export type ProjectCardItem = Issue | PullRequest;

Expand Down Expand Up @@ -16100,6 +16180,16 @@ export type ProjectColumnEdge = {
node?: Maybe<ProjectColumn>;
};

/** A project column and a list of its issues and PRs. */
export type ProjectColumnImport = {
/** The name of the column. */
columnName: Scalars['String']['input'];
/** A list of issues and pull requests in the column. */
issues?: InputMaybe<Array<ProjectCardImport>>;
/** The position of the column, starting from 0. */
position: Scalars['Int']['input'];
};

/** The semantic purpose of the column - todo, in progress, or done. */
export type ProjectColumnPurpose =
/** The column contains cards which are complete */
Expand Down Expand Up @@ -17555,6 +17645,8 @@ export type PullRequest = Assignable & Closable & Comment & Labelable & Lockable
bodyHTML: Scalars['HTML']['output'];
/** The body rendered to text. */
bodyText: Scalars['String']['output'];
/** Whether or not the pull request is rebaseable. */
canBeRebased: Scalars['Boolean']['output'];
/** The number of changed files in this pull request. */
changedFiles: Scalars['Int']['output'];
/** The HTTP path for the checks of this pull request. */
Expand Down Expand Up @@ -17632,6 +17724,8 @@ export type PullRequest = Assignable & Closable & Comment & Labelable & Lockable
mergeQueue?: Maybe<MergeQueue>;
/** The merge queue entry of the pull request in the base branch's merge queue */
mergeQueueEntry?: Maybe<MergeQueueEntry>;
/** Detailed information about the current pull request merge state status. */
mergeStateStatus: MergeStateStatus;
/** Whether or not the pull request can be merged based on the existence of merge conflicts. */
mergeable: MergeableState;
/** Whether or not the pull request was merged. */
Expand Down Expand Up @@ -20044,6 +20138,10 @@ export type RemovedFromProjectEvent = Node & {
databaseId?: Maybe<Scalars['Int']['output']>;
/** The Node ID of the RemovedFromProjectEvent object */
id: Scalars['ID']['output'];
/** Project referenced by event. */
project?: Maybe<Project>;
/** Column name referenced by this project event. */
projectColumnName: Scalars['String']['output'];
};

/** Represents a 'renamed' event on a given issue or pull request */
Expand Down
95 changes: 95 additions & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -16737,6 +16737,56 @@ enum IdentityProviderConfigurationState {
UNCONFIGURED
}

"""
Autogenerated input type of ImportProject
"""
input ImportProjectInput {
"""
The description of Project.
"""
body: String

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

"""
A list of columns containing issues and pull requests.
"""
columnImports: [ProjectColumnImport!]!

"""
The name of Project.
"""
name: String!

"""
The name of the Organization or User to create the Project under.
"""
ownerName: String!

"""
Whether the Project is public or not.
"""
public: Boolean = false
}

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

"""
The new Project!
"""
project: Project
}

"""
Autogenerated input type of InviteEnterpriseAdmin
"""
Expand Down Expand Up @@ -22594,6 +22644,16 @@ type Mutation {
input: GrantMigratorRoleInput!
): GrantMigratorRolePayload

"""
Creates a new project by importing columns and a list of issues/PRs.
"""
importProject(
"""
Parameters for ImportProject
"""
input: ImportProjectInput!
): ImportProjectPayload

"""
Invite someone to become an administrator of the enterprise.
"""
Expand Down Expand Up @@ -31359,6 +31419,21 @@ type ProjectCardEdge {
node: ProjectCard
}

"""
An issue or PR and its owning repository to be used in a project card.
"""
input ProjectCardImport {
"""
The issue or pull request number.
"""
number: Int!

"""
Repository name with owner (owner/repository).
"""
repository: String!
}

"""
Types that can be inside Project Cards.
"""
Expand Down Expand Up @@ -31504,6 +31579,26 @@ type ProjectColumnEdge {
node: ProjectColumn
}

"""
A project column and a list of its issues and PRs.
"""
input ProjectColumnImport {
"""
The name of the column.
"""
columnName: String!

"""
A list of issues and pull requests in the column.
"""
issues: [ProjectCardImport!]

"""
The position of the column, starting from 0.
"""
position: Int!
}

"""
The semantic purpose of the column - todo, in progress, or done.
"""
Expand Down
Loading