diff --git a/graphql/schema.graphql b/graphql/schema.graphql index 10c05b1e32..402867c108 100644 --- a/graphql/schema.graphql +++ b/graphql/schema.graphql @@ -577,6 +577,9 @@ type BranchProtectionRule implements Node { """Are approving reviews required to update matching branches.""" requiresApprovingReviews: Boolean! + """Are reviews from code owners required to update matching branches.""" + requiresCodeOwnerReviews: Boolean! + """Are commits required to be signed.""" requiresCommitSignatures: Boolean! @@ -1209,6 +1212,36 @@ type CloneProjectPayload { project: Project } +"""Autogenerated input type of CloneTemplateRepository""" +input CloneTemplateRepositoryInput { + """The Node ID of the template repository.""" + repositoryId: ID! + + """The name of the new repository.""" + name: String! + + """The ID of the owner for the new repository.""" + ownerId: ID! + + """A short description of the new repository.""" + description: String + + """Indicates the repository's visibility level.""" + visibility: RepositoryVisibility! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of CloneTemplateRepository""" +type CloneTemplateRepositoryPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The new repository.""" + repository: Repository +} + """An object that can be closed""" interface Closable { """ @@ -2105,8 +2138,15 @@ type ContributionCalendarWeek { """Ordering options for contribution connections.""" input ContributionOrder { - """The field by which to order contributions.""" - field: ContributionOrderField! + """ + The field by which to order contributions. + + **Upcoming Change on 2019-10-01 UTC** + **Description:** `field` will be removed. Only one order field is supported. + **Reason:** `field` will be removed. + + """ + field: ContributionOrderField """The ordering direction.""" direction: OrderDirection! @@ -2157,17 +2197,7 @@ type ContributionsCollection { the issue is not visible but the user has opted to show private contributions, a RestrictedContribution will be returned. """ - firstIssueContribution( - """ - If true, the first issue will be returned even if it was opened outside of the collection's time range. - - **Upcoming Change on 2019-07-01 UTC** - **Description:** `ignoreTimeRange` will be removed. Use a `ContributionsCollection` starting sufficiently far back - **Reason:** ignore_time_range will be removed - - """ - ignoreTimeRange: Boolean = false - ): CreatedIssueOrRestrictedContribution + firstIssueContribution: CreatedIssueOrRestrictedContribution """ The first pull request the user opened on GitHub. This will be null if that @@ -2175,17 +2205,7 @@ type ContributionsCollection { ignoreTimeRange is not true. If the pull request is not visible but the user has opted to show private contributions, a RestrictedContribution will be returned. """ - firstPullRequestContribution( - """ - If true, the first pull request will be returned even if it was opened outside of the collection's time range. - - **Upcoming Change on 2019-07-01 UTC** - **Description:** `ignoreTimeRange` will be removed. Use a `ContributionsCollection` starting sufficiently far back - **Reason:** ignore_time_range will be removed - - """ - ignoreTimeRange: Boolean = false - ): CreatedPullRequestOrRestrictedContribution + firstPullRequestContribution: CreatedPullRequestOrRestrictedContribution """ The first repository the user created on GitHub. This will be null if that @@ -2193,17 +2213,7 @@ type ContributionsCollection { ignoreTimeRange is false. If the repository is not visible, then a RestrictedContribution is returned. """ - firstRepositoryContribution( - """ - If true, the first repository will be returned even if it was opened outside of the collection's time range. - - **Upcoming Change on 2019-07-01 UTC** - **Description:** `ignoreTimeRange` will be removed. Use a `ContributionsCollection` starting sufficiently far back - **Reason:** ignore_time_range will be removed - - """ - ignoreTimeRange: Boolean = false - ): CreatedRepositoryOrRestrictedContribution + firstRepositoryContribution: CreatedRepositoryOrRestrictedContribution """ Does the user have any more activity in the timeline that occurred prior to the collection's time range? @@ -2265,17 +2275,7 @@ type ContributionsCollection { When the user signed up for GitHub. This will be null if that sign up date falls outside the collection's time range and ignoreTimeRange is false. """ - joinedGitHubContribution( - """ - If true, the contribution will be returned even if the user signed up outside of the collection's time range. - - **Upcoming Change on 2019-07-01 UTC** - **Description:** `ignoreTimeRange` will be removed. Use a `ContributionsCollection` starting sufficiently far back - **Reason:** ignore_time_range will be removed - - """ - ignoreTimeRange: Boolean = false - ): JoinedGitHubContribution + joinedGitHubContribution: JoinedGitHubContribution """ The date of the most recent restricted contribution the user made in this time @@ -3077,6 +3077,80 @@ type CreatePullRequestPayload { pullRequest: PullRequest } +"""Autogenerated input type of CreateRef""" +input CreateRefInput { + """The Node ID of the Repository to create the Ref in.""" + repositoryId: ID! + + """ + The fully qualified name of the new Ref (ie: `refs/heads/my_new_branch`). + """ + name: String! + + """The GitObjectID that the new Ref shall target. Must point to a commit.""" + oid: GitObjectID! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of CreateRef""" +type CreateRefPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The newly created ref.""" + ref: Ref +} + +"""Autogenerated input type of CreateRepository""" +input CreateRepositoryInput { + """The name of the new repository.""" + name: String! + + """The ID of the owner for the new repository.""" + ownerId: ID + + """A short description of the new repository.""" + description: String + + """Indicates the repository's visibility level.""" + visibility: RepositoryVisibility! + + """ + Whether this repository should be marked as a template such that anyone who + can access it can create new repositories with the same files and directory structure. + """ + template: Boolean = false + + """The URL for a web page about this repository.""" + homepageUrl: URI + + """Indicates if the repository should have the wiki feature enabled.""" + hasWikiEnabled: Boolean = false + + """Indicates if the repository should have the issues feature enabled.""" + hasIssuesEnabled: Boolean = true + + """ + When an organization is specified as the owner, this ID identifies the team + that should be granted access to the new repository. + """ + teamId: ID + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of CreateRepository""" +type CreateRepositoryPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The new repository.""" + repository: Repository +} + """Represents a mention made by one issue or pull request to another.""" type CrossReferencedEvent implements Node & UniformResourceLocatable { """Identifies the actor who performed the event.""" @@ -3303,6 +3377,21 @@ type DeletePullRequestReviewPayload { pullRequestReview: PullRequestReview } +"""Autogenerated input type of DeleteRef""" +input DeleteRefInput { + """The Node ID of the Ref to be deleted.""" + refId: ID! + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of DeleteRef""" +type DeleteRefPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + """Represents a 'demilestoned' event on a given issue or pull request.""" type DemilestonedEvent implements Node { """Identifies the actor who performed the event.""" @@ -3765,7 +3854,30 @@ type Gist implements Node & Starrable { files( """The maximum number of files to return.""" limit: Int = 10 + + """The oid of the files to return""" + oid: GitObjectID ): [GistFile] + + """A list of forks associated with the gist""" + forks( + """Returns the elements in the list that come after the specified cursor.""" + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """Returns the first _n_ elements from the list.""" + first: Int + + """Returns the last _n_ elements from the list.""" + last: Int + + """Ordering options for gists returned from the connection""" + orderBy: GistOrder + ): GistConnection! id: ID! """Identifies if the gist is a fork.""" @@ -4450,7 +4562,7 @@ type Issue implements Node & Assignable & Closable & Comment & Updatable & Updat last: Int """A list of archived states to filter the cards by""" - archivedStates: [ProjectCardArchivedState] + archivedStates: [ProjectCardArchivedState] = [ARCHIVED, NOT_ARCHIVED] ): ProjectCardConnection! """Identifies when the comment was published at.""" @@ -5807,6 +5919,9 @@ type Milestone implements Node & Closable & UniformResourceLocatable { dueOn: DateTime id: ID! + """Just for debugging on review-lab""" + issuePrioritiesDebug: String! + """A list of issues associated with the milestone.""" issues( """Ordering options for issues returned from the connection.""" @@ -6087,6 +6202,11 @@ type Mutation { """ cloneProject(input: CloneProjectInput!): CloneProjectPayload + """ + Create a new repository with the same files and directory structure as a template repository. + """ + cloneTemplateRepository(input: CloneTemplateRepositoryInput!): CloneTemplateRepositoryPayload + """Close an issue.""" closeIssue(input: CloseIssueInput!): CloseIssuePayload @@ -6116,6 +6236,12 @@ type Mutation { """Create a new pull request""" createPullRequest(input: CreatePullRequestInput!): CreatePullRequestPayload + """Create a new Git Ref.""" + createRef(input: CreateRefInput!): CreateRefPayload + + """Create a new repository.""" + createRepository(input: CreateRepositoryInput!): CreateRepositoryPayload + """Rejects a suggested topic for the repository.""" declineTopicSuggestion(input: DeclineTopicSuggestionInput!): DeclineTopicSuggestionPayload @@ -6143,6 +6269,9 @@ type Mutation { """Deletes a pull request review comment.""" deletePullRequestReviewComment(input: DeletePullRequestReviewCommentInput!): DeletePullRequestReviewCommentPayload + """Delete a Git Ref.""" + deleteRef(input: DeleteRefInput!): DeleteRefPayload + """Dismisses an approved or rejected pull request review.""" dismissPullRequestReview(input: DismissPullRequestReviewInput!): DismissPullRequestReviewPayload @@ -6233,6 +6362,9 @@ type Mutation { """Updates a pull request review comment.""" updatePullRequestReviewComment(input: UpdatePullRequestReviewCommentInput!): UpdatePullRequestReviewCommentPayload + """Update a Git Ref.""" + updateRef(input: UpdateRefInput!): UpdateRefPayload + """Updates the state for subscribable subjects.""" updateSubscription(input: UpdateSubscriptionInput!): UpdateSubscriptionPayload @@ -6468,14 +6600,14 @@ type Organization implements Node & Actor & RegistryPackageOwner & RegistryPacka connection. For example, OWNER will include only repositories that the current viewer owns. """ - affiliations: [RepositoryAffiliation] + affiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] """ Array of owner's affiliation options for repositories returned from the connection. For example, OWNER will include only repositories that the organization or user being viewed owns. """ - ownerAffiliations: [RepositoryAffiliation] + ownerAffiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] """ If non-null, filters repositories according to whether they have been locked @@ -6860,6 +6992,21 @@ enum PinnableItemType { """An issue.""" ISSUE + + """A project.""" + PROJECT + + """A pull request.""" + PULL_REQUEST + + """A user.""" + USER + + """An organization.""" + ORGANIZATION + + """A team.""" + TEAM } """Represents a 'pinned' event on a given issue or pull request.""" @@ -7063,7 +7210,7 @@ type Project implements Node & Closable & Updatable { last: Int """A list of archived states to filter the cards by""" - archivedStates: [ProjectCardArchivedState] + archivedStates: [ProjectCardArchivedState] = [ARCHIVED, NOT_ARCHIVED] ): ProjectCardConnection! """The HTTP path for this project""" @@ -7204,7 +7351,7 @@ type ProjectColumn implements Node { last: Int """A list of archived states to filter the cards by""" - archivedStates: [ProjectCardArchivedState] + archivedStates: [ProjectCardArchivedState] = [ARCHIVED, NOT_ARCHIVED] ): ProjectCardConnection! """Identifies the date and time when the object was created.""" @@ -7383,28 +7530,35 @@ enum ProjectState { """A user's public key.""" type PublicKey implements Node { - """The last time this authorization was used to perform an action""" + """ + The last time this authorization was used to perform an action. Values will be null for keys not owned by the user. + """ accessedAt: DateTime """ - Identifies the date and time when the key was created. Keys created before March 5th, 2014 have inaccurate values. + Identifies the date and time when the key was created. Keys created before + March 5th, 2014 have inaccurate values. Values will be null for keys not owned by the user. """ - createdAt: DateTime! + createdAt: DateTime - """The fingerprint for this PublicKey""" - fingerprint: String + """The fingerprint for this PublicKey.""" + fingerprint: String! id: ID! - """Whether this PublicKey is read-only or not""" - isReadOnly: Boolean! + """ + Whether this PublicKey is read-only or not. Values will be null for keys not owned by the user. + """ + isReadOnly: Boolean - """The public key string""" + """The public key string.""" key: String! """ - Identifies the date and time when the key was updated. Keys created before March 5th, 2014 may have inaccurate values. + Identifies the date and time when the key was updated. Keys created before + March 5th, 2014 may have inaccurate values. Values will be null for keys not + owned by the user. """ - updatedAt: DateTime! + updatedAt: DateTime } """The connection type for PublicKey.""" @@ -7690,7 +7844,7 @@ type PullRequest implements Node & Assignable & Closable & Comment & Updatable & last: Int """A list of archived states to filter the cards by""" - archivedStates: [ProjectCardArchivedState] + archivedStates: [ProjectCardArchivedState] = [ARCHIVED, NOT_ARCHIVED] ): ProjectCardConnection! """Identifies when the comment was published at.""" @@ -8627,7 +8781,7 @@ type PullRequestTimelineItemEdge { } """An item in a pull request timeline""" -union PullRequestTimelineItems = PullRequestCommit | PullRequestCommitCommentThread | PullRequestReview | PullRequestReviewThread | PullRequestRevisionMarker | BaseRefChangedEvent | BaseRefForcePushedEvent | DeployedEvent | DeploymentEnvironmentChangedEvent | HeadRefDeletedEvent | HeadRefForcePushedEvent | HeadRefRestoredEvent | MergedEvent | ReviewDismissedEvent | ReviewRequestedEvent | ReviewRequestRemovedEvent | IssueComment | CrossReferencedEvent | AddedToProjectEvent | AssignedEvent | ClosedEvent | CommentDeletedEvent | ConvertedNoteToIssueEvent | DemilestonedEvent | LabeledEvent | LockedEvent | MentionedEvent | MilestonedEvent | MovedColumnsInProjectEvent | PinnedEvent | ReferencedEvent | RemovedFromProjectEvent | RenamedTitleEvent | ReopenedEvent | SubscribedEvent | TransferredEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UserBlockedEvent | UnpinnedEvent | UnsubscribedEvent +union PullRequestTimelineItems = PullRequestCommit | PullRequestCommitCommentThread | PullRequestReview | PullRequestReviewThread | PullRequestRevisionMarker | BaseRefChangedEvent | BaseRefForcePushedEvent | DeployedEvent | DeploymentEnvironmentChangedEvent | HeadRefDeletedEvent | HeadRefForcePushedEvent | HeadRefRestoredEvent | MergedEvent | ReviewDismissedEvent | ReviewRequestedEvent | ReviewRequestRemovedEvent | ReadyForReviewEvent | IssueComment | CrossReferencedEvent | AddedToProjectEvent | AssignedEvent | ClosedEvent | CommentDeletedEvent | ConvertedNoteToIssueEvent | DemilestonedEvent | LabeledEvent | LockedEvent | MentionedEvent | MilestonedEvent | MovedColumnsInProjectEvent | PinnedEvent | ReferencedEvent | RemovedFromProjectEvent | RenamedTitleEvent | ReopenedEvent | SubscribedEvent | TransferredEvent | UnassignedEvent | UnlabeledEvent | UnlockedEvent | UserBlockedEvent | UnpinnedEvent | UnsubscribedEvent """The connection type for PullRequestTimelineItems.""" type PullRequestTimelineItemsConnection { @@ -8724,6 +8878,9 @@ enum PullRequestTimelineItemsItemType { """Represents an 'review_request_removed' event on a given pull request.""" REVIEW_REQUEST_REMOVED_EVENT + """Represents a 'ready_for_review' event on a given pull request.""" + READY_FOR_REVIEW_EVENT + """Represents a comment on an Issue.""" ISSUE_COMMENT @@ -9342,6 +9499,25 @@ enum ReactionOrderField { CREATED_AT } +"""Represents a 'ready_for_review' event on a given pull request.""" +type ReadyForReviewEvent implements Node & UniformResourceLocatable { + """Identifies the actor who performed the event.""" + actor: Actor + + """Identifies the date and time when the object was created.""" + createdAt: DateTime! + id: ID! + + """PullRequest referenced by event.""" + pullRequest: PullRequest! + + """The HTTP path for this ready for review event.""" + resourcePath: URI! + + """The HTTP URL for this ready for review event.""" + url: URI! +} + """Represents a Git reference.""" type Ref implements Node { """A list of pull requests with this ref as the head ref.""" @@ -9995,14 +10171,14 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib connection. For example, OWNER will include only repositories that the current viewer owns. """ - affiliations: [RepositoryAffiliation] + affiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] """ Array of owner's affiliation options for repositories returned from the connection. For example, OWNER will include only repositories that the organization or user being viewed owns. """ - ownerAffiliations: [RepositoryAffiliation] + ownerAffiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] """ If non-null, filters repositories according to whether they have been locked @@ -10052,6 +10228,11 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib """Identifies if the repository is private.""" isPrivate: Boolean! + """ + Identifies if the repository is a template that can be used to generate new repositories. + """ + isTemplate: Boolean! + """Returns a single issue from the current repository by number.""" issue( """The number for the issue to be returned.""" @@ -10427,6 +10608,9 @@ type Repository implements Node & ProjectOwner & RegistryPackageOwner & Subscrib orderBy: StarOrder ): StargazerConnection! + """The repository from which this repository was generated, if any.""" + templateRepository: Repository + """Identifies the date and time when the object was last updated.""" updatedAt: DateTime! @@ -10622,6 +10806,11 @@ interface RepositoryInfo { """Identifies if the repository is private.""" isPrivate: Boolean! + """ + Identifies if the repository is a template that can be used to generate new repositories. + """ + isTemplate: Boolean! + """The license associated with the repository""" licenseInfo: License @@ -10768,14 +10957,14 @@ interface RepositoryOwner { connection. For example, OWNER will include only repositories that the current viewer owns. """ - affiliations: [RepositoryAffiliation] + affiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] """ Array of owner's affiliation options for repositories returned from the connection. For example, OWNER will include only repositories that the organization or user being viewed owns. """ - ownerAffiliations: [RepositoryAffiliation] + ownerAffiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] """ If non-null, filters repositories according to whether they have been locked @@ -10891,6 +11080,18 @@ type RepositoryTopicEdge { node: RepositoryTopic } +"""The repository's visibility level.""" +enum RepositoryVisibility { + """The repository is visible only to those with explicit access.""" + PRIVATE + + """The repository is visible to everyone.""" + PUBLIC + + """The repository is visible only to users in the same business.""" + INTERNAL +} + """The possible states that can be requested when creating a check run.""" enum RequestableCheckStatusState { """The check suite or run has been queued.""" @@ -11157,7 +11358,7 @@ type ReviewRequestRemovedEvent implements Node { } """The results of a search.""" -union SearchResultItem = Issue | PullRequest | Repository | User | Organization | MarketplaceListing +union SearchResultItem = Issue | PullRequest | Repository | User | Organization | MarketplaceListing | App """A list of results that matched against a search query.""" type SearchResultItemConnection { @@ -12892,6 +13093,30 @@ type UpdatePullRequestReviewPayload { pullRequestReview: PullRequestReview } +"""Autogenerated input type of UpdateRef""" +input UpdateRefInput { + """The Node ID of the Ref to be updated.""" + refId: ID! + + """The GitObjectID that the Ref shall be updated to target.""" + oid: GitObjectID! + + """Permit updates of branch Refs that are not fast-forwards?""" + force: Boolean = false + + """A unique identifier for the client performing the mutation.""" + clientMutationId: String +} + +"""Autogenerated return type of UpdateRef""" +type UpdateRefPayload { + """A unique identifier for the client performing the mutation.""" + clientMutationId: String + + """The updated Ref.""" + ref: Ref +} + """Autogenerated input type of UpdateSubscription""" input UpdateSubscriptionInput { """The Node ID of the subscribable object to modify.""" @@ -13354,14 +13579,14 @@ type User implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch connection. For example, OWNER will include only repositories that the current viewer owns. """ - affiliations: [RepositoryAffiliation] + affiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] """ Array of owner's affiliation options for repositories returned from the connection. For example, OWNER will include only repositories that the organization or user being viewed owns. """ - ownerAffiliations: [RepositoryAffiliation] + ownerAffiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] """ If non-null, filters repositories according to whether they have been locked @@ -13489,14 +13714,14 @@ type User implements Node & Actor & RegistryPackageOwner & RegistryPackageSearch orderBy: RepositoryOrder """Affiliation options for repositories returned from the connection""" - affiliations: [RepositoryAffiliation] + affiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR, ORGANIZATION_MEMBER] """ Array of owner's affiliation options for repositories returned from the connection. For example, OWNER will include only repositories that the organization or user being viewed owns. """ - ownerAffiliations: [RepositoryAffiliation] + ownerAffiliations: [RepositoryAffiliation] = [OWNER, COLLABORATOR] """ If non-null, filters repositories according to whether they have been locked