diff --git a/Gopkg.lock b/Gopkg.lock index 2bb58e6c..11cf2f13 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -214,11 +214,11 @@ [[projects]] branch = "master" - digest = "1:a1562fb3021983f533a27d02ebf36f1bc1ab327660d611d6e948970b54087792" + digest = "1:2befa342040f385b214cfd400887b584d5eba4e4b25a0ebaea839ddb0d59c586" name = "github.com/shurcooL/githubv4" packages = ["."] pruneopts = "UT" - revision = "b5f70540eee0ebfb6a27b52fc5b131be76415539" + revision = "068505affed7d8555196a48eb3e0ed43410aa8e8" [[projects]] branch = "master" diff --git a/vendor/github.com/shurcooL/githubv4/.travis.yml b/vendor/github.com/shurcooL/githubv4/.travis.yml index 93b1fcdb..437c57db 100644 --- a/vendor/github.com/shurcooL/githubv4/.travis.yml +++ b/vendor/github.com/shurcooL/githubv4/.travis.yml @@ -12,5 +12,5 @@ install: script: - go get -t -v ./... - diff -u <(echo -n) <(gofmt -d -s .) - - go tool vet . + - go vet ./... - go test -v -race ./... diff --git a/vendor/github.com/shurcooL/githubv4/README.md b/vendor/github.com/shurcooL/githubv4/README.md index 0d389ef0..319a6428 100644 --- a/vendor/github.com/shurcooL/githubv4/README.md +++ b/vendor/github.com/shurcooL/githubv4/README.md @@ -48,7 +48,7 @@ func main() { ### Simple Query -To make a query, you need to define a Go type that corresponds to the GitHub GraphQL schema, and contains the fields you're interested in querying. You can look up the GitHub GraphQL schema at https://developer.github.com/v4/reference/query/. +To make a query, you need to define a Go type that corresponds to the GitHub GraphQL schema, and contains the fields you're interested in querying. You can look up the GitHub GraphQL schema at https://developer.github.com/v4/query/. For example, to make the following GraphQL query: @@ -89,7 +89,7 @@ fmt.Println("CreatedAt:", query.Viewer.CreatedAt) ### Scalar Types -For each scalar in the GitHub GraphQL schema listed at https://developer.github.com/v4/reference/scalar/, there is a corresponding Go type in package `githubv4`. +For each scalar in the GitHub GraphQL schema listed at https://developer.github.com/v4/scalar/, there is a corresponding Go type in package `githubv4`. You can use these types when writing queries: @@ -127,7 +127,7 @@ var query struct { // Call client.Query() and use results in query... ``` -The [`DateTime`](https://developer.github.com/v4/reference/scalar/datetime/) scalar is described as "an ISO-8601 encoded UTC date string". If you wanted to fetch in that form without parsing it into a `time.Time`, you can use the `string` type. For example, this would work: +The [`DateTime`](https://developer.github.com/v4/scalar/datetime/) scalar is described as "an ISO-8601 encoded UTC date string". If you wanted to fetch in that form without parsing it into a `time.Time`, you can use the `string` type. For example, this would work: ```Go // import "html/template" @@ -336,7 +336,7 @@ for { } ``` -There is more than one way to perform pagination. Consider additional fields inside [`PageInfo`](https://developer.github.com/v4/reference/object/pageinfo/) object. +There is more than one way to perform pagination. Consider additional fields inside [`PageInfo`](https://developer.github.com/v4/object/pageinfo/) object. ### Mutations diff --git a/vendor/github.com/shurcooL/githubv4/enum.go b/vendor/github.com/shurcooL/githubv4/enum.go index 8293a23b..0ab92800 100644 --- a/vendor/github.com/shurcooL/githubv4/enum.go +++ b/vendor/github.com/shurcooL/githubv4/enum.go @@ -36,6 +36,24 @@ const ( CommentCannotUpdateReasonLoginRequired CommentCannotUpdateReason = "LOGIN_REQUIRED" // You must be logged in to update this comment. CommentCannotUpdateReasonMaintenance CommentCannotUpdateReason = "MAINTENANCE" // Repository is under maintenance. CommentCannotUpdateReasonVerifiedEmailRequired CommentCannotUpdateReason = "VERIFIED_EMAIL_REQUIRED" // At least one email address must be verified to update this comment. + CommentCannotUpdateReasonDenied CommentCannotUpdateReason = "DENIED" // You cannot update this comment. +) + +// CommitContributionOrderField represents properties by which commit contribution connections can be ordered. +type CommitContributionOrderField string + +// Properties by which commit contribution connections can be ordered. +const ( + CommitContributionOrderFieldOccurredAt CommitContributionOrderField = "OCCURRED_AT" // Order commit contributions by when they were made. + CommitContributionOrderFieldCommitCount CommitContributionOrderField = "COMMIT_COUNT" // Order commit contributions by how many commits they represent. +) + +// ContributionOrderField represents properties by which contribution connections can be ordered. +type ContributionOrderField string + +// Properties by which contribution connections can be ordered. +const ( + ContributionOrderFieldOccurredAt ContributionOrderField = "OCCURRED_AT" // Order contributions by when they were made. ) // DefaultRepositoryPermissionField represents the possible default permissions for repositories. @@ -49,18 +67,28 @@ const ( DefaultRepositoryPermissionFieldAdmin DefaultRepositoryPermissionField = "ADMIN" // Can read, write, and administrate repos by default. ) +// DeploymentOrderField represents properties by which deployment connections can be ordered. +type DeploymentOrderField string + +// Properties by which deployment connections can be ordered. +const ( + DeploymentOrderFieldCreatedAt DeploymentOrderField = "CREATED_AT" // Order collection by creation time. +) + // DeploymentState represents the possible states in which a deployment can be. type DeploymentState string // The possible states in which a deployment can be. const ( - DeploymentStateAbandoned DeploymentState = "ABANDONED" // The pending deployment was not updated after 30 minutes. - DeploymentStateActive DeploymentState = "ACTIVE" // The deployment is currently active. - DeploymentStateDestroyed DeploymentState = "DESTROYED" // An inactive transient deployment. - DeploymentStateError DeploymentState = "ERROR" // The deployment experienced an error. - DeploymentStateFailure DeploymentState = "FAILURE" // The deployment has failed. - DeploymentStateInactive DeploymentState = "INACTIVE" // The deployment is inactive. - DeploymentStatePending DeploymentState = "PENDING" // The deployment is pending. + DeploymentStateAbandoned DeploymentState = "ABANDONED" // The pending deployment was not updated after 30 minutes. + DeploymentStateActive DeploymentState = "ACTIVE" // The deployment is currently active. + DeploymentStateDestroyed DeploymentState = "DESTROYED" // An inactive transient deployment. + DeploymentStateError DeploymentState = "ERROR" // The deployment experienced an error. + DeploymentStateFailure DeploymentState = "FAILURE" // The deployment has failed. + DeploymentStateInactive DeploymentState = "INACTIVE" // The deployment is inactive. + DeploymentStatePending DeploymentState = "PENDING" // The deployment is pending. + DeploymentStateQueued DeploymentState = "QUEUED" // The deployment has queued. + DeploymentStateInProgress DeploymentState = "IN_PROGRESS" // The deployment is in progress. ) // DeploymentStatusState represents the possible states for a deployment status. @@ -68,11 +96,13 @@ type DeploymentStatusState string // The possible states for a deployment status. const ( - DeploymentStatusStatePending DeploymentStatusState = "PENDING" // The deployment is pending. - DeploymentStatusStateSuccess DeploymentStatusState = "SUCCESS" // The deployment was successful. - DeploymentStatusStateFailure DeploymentStatusState = "FAILURE" // The deployment has failed. - DeploymentStatusStateInactive DeploymentStatusState = "INACTIVE" // The deployment is inactive. - DeploymentStatusStateError DeploymentStatusState = "ERROR" // The deployment experienced an error. + DeploymentStatusStatePending DeploymentStatusState = "PENDING" // The deployment is pending. + DeploymentStatusStateSuccess DeploymentStatusState = "SUCCESS" // The deployment was successful. + DeploymentStatusStateFailure DeploymentStatusState = "FAILURE" // The deployment has failed. + DeploymentStatusStateInactive DeploymentStatusState = "INACTIVE" // The deployment is inactive. + DeploymentStatusStateError DeploymentStatusState = "ERROR" // The deployment experienced an error. + DeploymentStatusStateQueued DeploymentStatusState = "QUEUED" // The deployment is queued. + DeploymentStatusStateInProgress DeploymentStatusState = "IN_PROGRESS" // The deployment is in progress. ) // GistOrderField represents properties by which gist connections can be ordered. @@ -115,9 +145,20 @@ const ( GitSignatureStateExpiredKey GitSignatureState = "EXPIRED_KEY" // Signing key expired. GitSignatureStateOcspPending GitSignatureState = "OCSP_PENDING" // Valid signature, pending certificate revocation checking. GitSignatureStateOcspError GitSignatureState = "OCSP_ERROR" // Valid siganture, though certificate revocation check failed. + GitSignatureStateBadCert GitSignatureState = "BAD_CERT" // The signing certificate or its chain could not be verified. GitSignatureStateOcspRevoked GitSignatureState = "OCSP_REVOKED" // One or more certificates in chain has been revoked. ) +// IdentityProviderConfigurationState represents the possible states in which authentication can be configured with an identity provider. +type IdentityProviderConfigurationState string + +// The possible states in which authentication can be configured with an identity provider. +const ( + IdentityProviderConfigurationStateEnforced IdentityProviderConfigurationState = "ENFORCED" // Authentication with an identity provider is configured and enforced. + IdentityProviderConfigurationStateConfigured IdentityProviderConfigurationState = "CONFIGURED" // Authentication with an identity provider is configured but not enforced. + IdentityProviderConfigurationStateUnconfigured IdentityProviderConfigurationState = "UNCONFIGURED" // Authentication with an identity provider is not configured. +) + // IssueOrderField represents properties by which issue connections can be ordered. type IssueOrderField string @@ -136,6 +177,7 @@ const ( IssuePubSubTopicUpdated IssuePubSubTopic = "UPDATED" // The channel ID for observing issue updates. IssuePubSubTopicMarkasread IssuePubSubTopic = "MARKASREAD" // The channel ID for marking an issue as read. IssuePubSubTopicTimeline IssuePubSubTopic = "TIMELINE" // The channel ID for updating items on the issue timeline. + IssuePubSubTopicState IssuePubSubTopic = "STATE" // The channel ID for observing issue state updates. ) // IssueState represents the possible states of an issue. @@ -147,6 +189,39 @@ const ( IssueStateClosed IssueState = "CLOSED" // An issue that has been closed. ) +// IssueTimelineItemsItemType represents the possible item types found in a timeline. +type IssueTimelineItemsItemType string + +// The possible item types found in a timeline. +const ( + IssueTimelineItemsItemTypeIssueComment IssueTimelineItemsItemType = "ISSUE_COMMENT" // Represents a comment on an Issue. + IssueTimelineItemsItemTypeCrossReferencedEvent IssueTimelineItemsItemType = "CROSS_REFERENCED_EVENT" // Represents a mention made by one issue or pull request to another. + IssueTimelineItemsItemTypeAddedToProjectEvent IssueTimelineItemsItemType = "ADDED_TO_PROJECT_EVENT" // Represents a 'added_to_project' event on a given issue or pull request. + IssueTimelineItemsItemTypeAssignedEvent IssueTimelineItemsItemType = "ASSIGNED_EVENT" // Represents an 'assigned' event on any assignable object. + IssueTimelineItemsItemTypeClosedEvent IssueTimelineItemsItemType = "CLOSED_EVENT" // Represents a 'closed' event on any `Closable`. + IssueTimelineItemsItemTypeCommentDeletedEvent IssueTimelineItemsItemType = "COMMENT_DELETED_EVENT" // Represents a 'comment_deleted' event on a given issue or pull request. + IssueTimelineItemsItemTypeConvertedNoteToIssueEvent IssueTimelineItemsItemType = "CONVERTED_NOTE_TO_ISSUE_EVENT" // Represents a 'converted_note_to_issue' event on a given issue or pull request. + IssueTimelineItemsItemTypeDemilestonedEvent IssueTimelineItemsItemType = "DEMILESTONED_EVENT" // Represents a 'demilestoned' event on a given issue or pull request. + IssueTimelineItemsItemTypeLabeledEvent IssueTimelineItemsItemType = "LABELED_EVENT" // Represents a 'labeled' event on a given issue or pull request. + IssueTimelineItemsItemTypeLockedEvent IssueTimelineItemsItemType = "LOCKED_EVENT" // Represents a 'locked' event on a given issue or pull request. + IssueTimelineItemsItemTypeMentionedEvent IssueTimelineItemsItemType = "MENTIONED_EVENT" // Represents a 'mentioned' event on a given issue or pull request. + IssueTimelineItemsItemTypeMilestonedEvent IssueTimelineItemsItemType = "MILESTONED_EVENT" // Represents a 'milestoned' event on a given issue or pull request. + IssueTimelineItemsItemTypeMovedColumnsInProjectEvent IssueTimelineItemsItemType = "MOVED_COLUMNS_IN_PROJECT_EVENT" // Represents a 'moved_columns_in_project' event on a given issue or pull request. + IssueTimelineItemsItemTypePinnedEvent IssueTimelineItemsItemType = "PINNED_EVENT" // Represents a 'pinned' event on a given issue or pull request. + IssueTimelineItemsItemTypeReferencedEvent IssueTimelineItemsItemType = "REFERENCED_EVENT" // Represents a 'referenced' event on a given `ReferencedSubject`. + IssueTimelineItemsItemTypeRemovedFromProjectEvent IssueTimelineItemsItemType = "REMOVED_FROM_PROJECT_EVENT" // Represents a 'removed_from_project' event on a given issue or pull request. + IssueTimelineItemsItemTypeRenamedTitleEvent IssueTimelineItemsItemType = "RENAMED_TITLE_EVENT" // Represents a 'renamed' event on a given issue or pull request. + IssueTimelineItemsItemTypeReopenedEvent IssueTimelineItemsItemType = "REOPENED_EVENT" // Represents a 'reopened' event on any `Closable`. + IssueTimelineItemsItemTypeSubscribedEvent IssueTimelineItemsItemType = "SUBSCRIBED_EVENT" // Represents a 'subscribed' event on a given `Subscribable`. + IssueTimelineItemsItemTypeTransferredEvent IssueTimelineItemsItemType = "TRANSFERRED_EVENT" // Represents a 'transferred' event on a given issue or pull request. + IssueTimelineItemsItemTypeUnassignedEvent IssueTimelineItemsItemType = "UNASSIGNED_EVENT" // Represents an 'unassigned' event on any assignable object. + IssueTimelineItemsItemTypeUnlabeledEvent IssueTimelineItemsItemType = "UNLABELED_EVENT" // Represents an 'unlabeled' event on a given issue or pull request. + IssueTimelineItemsItemTypeUnlockedEvent IssueTimelineItemsItemType = "UNLOCKED_EVENT" // Represents an 'unlocked' event on a given issue or pull request. + IssueTimelineItemsItemTypeUserBlockedEvent IssueTimelineItemsItemType = "USER_BLOCKED_EVENT" // Represents a 'user_blocked' event on a given user. + IssueTimelineItemsItemTypeUnpinnedEvent IssueTimelineItemsItemType = "UNPINNED_EVENT" // Represents an 'unpinned' event on a given issue or pull request. + IssueTimelineItemsItemTypeUnsubscribedEvent IssueTimelineItemsItemType = "UNSUBSCRIBED_EVENT" // Represents an 'unsubscribed' event on a given `Subscribable`. +) + // LanguageOrderField represents properties by which language connections can be ordered. type LanguageOrderField string @@ -225,6 +300,34 @@ const ( OrganizationInvitationTypeEmail OrganizationInvitationType = "EMAIL" // The invitation was to an email address. ) +// OrganizationMemberRole represents the possible roles within an organization for its members. +type OrganizationMemberRole string + +// The possible roles within an organization for its members. +const ( + OrganizationMemberRoleMember OrganizationMemberRole = "MEMBER" // The user is a member of the organization. + OrganizationMemberRoleAdmin OrganizationMemberRole = "ADMIN" // The user is an administrator of the organization. +) + +// PinnableItemType represents represents items that can be pinned to a profile page or dashboard. +type PinnableItemType string + +// Represents items that can be pinned to a profile page or dashboard. +const ( + PinnableItemTypeRepository PinnableItemType = "REPOSITORY" // A repository. + PinnableItemTypeGist PinnableItemType = "GIST" // A gist. + PinnableItemTypeIssue PinnableItemType = "ISSUE" // An issue. +) + +// ProjectCardArchivedState represents the possible archived states of a project card. +type ProjectCardArchivedState string + +// The possible archived states of a project card. +const ( + ProjectCardArchivedStateArchived ProjectCardArchivedState = "ARCHIVED" // A project card that is archived. + ProjectCardArchivedStateNotArchived ProjectCardArchivedState = "NOT_ARCHIVED" // A project card that is not archived. +) + // ProjectCardState represents various content states of a ProjectCard. type ProjectCardState string @@ -235,6 +338,16 @@ const ( ProjectCardStateRedacted ProjectCardState = "REDACTED" // The card is redacted. ) +// ProjectColumnPurpose represents the semantic purpose of the column - todo, in progress, or done. +type ProjectColumnPurpose string + +// The semantic purpose of the column - todo, in progress, or done. +const ( + ProjectColumnPurposeTodo ProjectColumnPurpose = "TODO" // The column contains cards still to be worked on. + ProjectColumnPurposeInProgress ProjectColumnPurpose = "IN_PROGRESS" // The column contains cards which are currently being worked on. + ProjectColumnPurposeDone ProjectColumnPurpose = "DONE" // The column contains cards which are complete. +) + // ProjectOrderField represents properties by which project connections can be ordered. type ProjectOrderField string @@ -254,6 +367,15 @@ const ( ProjectStateClosed ProjectState = "CLOSED" // The project is closed. ) +// PullRequestOrderField represents properties by which pull_requests connections can be ordered. +type PullRequestOrderField string + +// Properties by which pull_requests connections can be ordered. +const ( + PullRequestOrderFieldCreatedAt PullRequestOrderField = "CREATED_AT" // Order pull_requests by creation time. + PullRequestOrderFieldUpdatedAt PullRequestOrderField = "UPDATED_AT" // Order pull_requests by update time. +) + // PullRequestPubSubTopic represents the possible PubSub channels for a pull request. type PullRequestPubSubTopic string @@ -263,6 +385,16 @@ const ( PullRequestPubSubTopicMarkasread PullRequestPubSubTopic = "MARKASREAD" // The channel ID for marking an pull request as read. PullRequestPubSubTopicHeadRef PullRequestPubSubTopic = "HEAD_REF" // The channel ID for observing head ref updates. PullRequestPubSubTopicTimeline PullRequestPubSubTopic = "TIMELINE" // The channel ID for updating items on the pull request timeline. + PullRequestPubSubTopicState PullRequestPubSubTopic = "STATE" // The channel ID for observing pull request state updates. +) + +// PullRequestReviewCommentState represents the possible states of a pull request review comment. +type PullRequestReviewCommentState string + +// The possible states of a pull request review comment. +const ( + PullRequestReviewCommentStatePending PullRequestReviewCommentState = "PENDING" // A comment that is part of a pending review. + PullRequestReviewCommentStateSubmitted PullRequestReviewCommentState = "SUBMITTED" // A comment that is part of a submitted review. ) // PullRequestReviewEvent represents the possible events to perform on a pull request review. @@ -298,6 +430,55 @@ const ( PullRequestStateMerged PullRequestState = "MERGED" // A pull request that has been closed by being merged. ) +// PullRequestTimelineItemsItemType represents the possible item types found in a timeline. +type PullRequestTimelineItemsItemType string + +// The possible item types found in a timeline. +const ( + PullRequestTimelineItemsItemTypePullRequestCommit PullRequestTimelineItemsItemType = "PULL_REQUEST_COMMIT" // Represents a Git commit part of a pull request. + PullRequestTimelineItemsItemTypePullRequestCommitCommentThread PullRequestTimelineItemsItemType = "PULL_REQUEST_COMMIT_COMMENT_THREAD" // Represents a commit comment thread part of a pull request. + PullRequestTimelineItemsItemTypePullRequestReview PullRequestTimelineItemsItemType = "PULL_REQUEST_REVIEW" // A review object for a given pull request. + PullRequestTimelineItemsItemTypePullRequestReviewThread PullRequestTimelineItemsItemType = "PULL_REQUEST_REVIEW_THREAD" // A threaded list of comments for a given pull request. + PullRequestTimelineItemsItemTypePullRequestRevisionMarker PullRequestTimelineItemsItemType = "PULL_REQUEST_REVISION_MARKER" // Represents the latest point in the pull request timeline for which the viewer has seen the pull request's commits. + PullRequestTimelineItemsItemTypeBaseRefChangedEvent PullRequestTimelineItemsItemType = "BASE_REF_CHANGED_EVENT" // Represents a 'base_ref_changed' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeBaseRefForcePushedEvent PullRequestTimelineItemsItemType = "BASE_REF_FORCE_PUSHED_EVENT" // Represents a 'base_ref_force_pushed' event on a given pull request. + PullRequestTimelineItemsItemTypeDeployedEvent PullRequestTimelineItemsItemType = "DEPLOYED_EVENT" // Represents a 'deployed' event on a given pull request. + PullRequestTimelineItemsItemTypeDeploymentEnvironmentChangedEvent PullRequestTimelineItemsItemType = "DEPLOYMENT_ENVIRONMENT_CHANGED_EVENT" // Represents a 'deployment_environment_changed' event on a given pull request. + PullRequestTimelineItemsItemTypeHeadRefDeletedEvent PullRequestTimelineItemsItemType = "HEAD_REF_DELETED_EVENT" // Represents a 'head_ref_deleted' event on a given pull request. + PullRequestTimelineItemsItemTypeHeadRefForcePushedEvent PullRequestTimelineItemsItemType = "HEAD_REF_FORCE_PUSHED_EVENT" // Represents a 'head_ref_force_pushed' event on a given pull request. + PullRequestTimelineItemsItemTypeHeadRefRestoredEvent PullRequestTimelineItemsItemType = "HEAD_REF_RESTORED_EVENT" // Represents a 'head_ref_restored' event on a given pull request. + PullRequestTimelineItemsItemTypeMergedEvent PullRequestTimelineItemsItemType = "MERGED_EVENT" // Represents a 'merged' event on a given pull request. + PullRequestTimelineItemsItemTypeReviewDismissedEvent PullRequestTimelineItemsItemType = "REVIEW_DISMISSED_EVENT" // Represents a 'review_dismissed' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeReviewRequestedEvent PullRequestTimelineItemsItemType = "REVIEW_REQUESTED_EVENT" // Represents an 'review_requested' event on a given pull request. + PullRequestTimelineItemsItemTypeReviewRequestRemovedEvent PullRequestTimelineItemsItemType = "REVIEW_REQUEST_REMOVED_EVENT" // Represents an 'review_request_removed' event on a given pull request. + PullRequestTimelineItemsItemTypeIssueComment PullRequestTimelineItemsItemType = "ISSUE_COMMENT" // Represents a comment on an Issue. + PullRequestTimelineItemsItemTypeCrossReferencedEvent PullRequestTimelineItemsItemType = "CROSS_REFERENCED_EVENT" // Represents a mention made by one issue or pull request to another. + PullRequestTimelineItemsItemTypeAddedToProjectEvent PullRequestTimelineItemsItemType = "ADDED_TO_PROJECT_EVENT" // Represents a 'added_to_project' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeAssignedEvent PullRequestTimelineItemsItemType = "ASSIGNED_EVENT" // Represents an 'assigned' event on any assignable object. + PullRequestTimelineItemsItemTypeClosedEvent PullRequestTimelineItemsItemType = "CLOSED_EVENT" // Represents a 'closed' event on any `Closable`. + PullRequestTimelineItemsItemTypeCommentDeletedEvent PullRequestTimelineItemsItemType = "COMMENT_DELETED_EVENT" // Represents a 'comment_deleted' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeConvertedNoteToIssueEvent PullRequestTimelineItemsItemType = "CONVERTED_NOTE_TO_ISSUE_EVENT" // Represents a 'converted_note_to_issue' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeDemilestonedEvent PullRequestTimelineItemsItemType = "DEMILESTONED_EVENT" // Represents a 'demilestoned' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeLabeledEvent PullRequestTimelineItemsItemType = "LABELED_EVENT" // Represents a 'labeled' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeLockedEvent PullRequestTimelineItemsItemType = "LOCKED_EVENT" // Represents a 'locked' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeMentionedEvent PullRequestTimelineItemsItemType = "MENTIONED_EVENT" // Represents a 'mentioned' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeMilestonedEvent PullRequestTimelineItemsItemType = "MILESTONED_EVENT" // Represents a 'milestoned' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeMovedColumnsInProjectEvent PullRequestTimelineItemsItemType = "MOVED_COLUMNS_IN_PROJECT_EVENT" // Represents a 'moved_columns_in_project' event on a given issue or pull request. + PullRequestTimelineItemsItemTypePinnedEvent PullRequestTimelineItemsItemType = "PINNED_EVENT" // Represents a 'pinned' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeReferencedEvent PullRequestTimelineItemsItemType = "REFERENCED_EVENT" // Represents a 'referenced' event on a given `ReferencedSubject`. + PullRequestTimelineItemsItemTypeRemovedFromProjectEvent PullRequestTimelineItemsItemType = "REMOVED_FROM_PROJECT_EVENT" // Represents a 'removed_from_project' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeRenamedTitleEvent PullRequestTimelineItemsItemType = "RENAMED_TITLE_EVENT" // Represents a 'renamed' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeReopenedEvent PullRequestTimelineItemsItemType = "REOPENED_EVENT" // Represents a 'reopened' event on any `Closable`. + PullRequestTimelineItemsItemTypeSubscribedEvent PullRequestTimelineItemsItemType = "SUBSCRIBED_EVENT" // Represents a 'subscribed' event on a given `Subscribable`. + PullRequestTimelineItemsItemTypeTransferredEvent PullRequestTimelineItemsItemType = "TRANSFERRED_EVENT" // Represents a 'transferred' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeUnassignedEvent PullRequestTimelineItemsItemType = "UNASSIGNED_EVENT" // Represents an 'unassigned' event on any assignable object. + PullRequestTimelineItemsItemTypeUnlabeledEvent PullRequestTimelineItemsItemType = "UNLABELED_EVENT" // Represents an 'unlabeled' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeUnlockedEvent PullRequestTimelineItemsItemType = "UNLOCKED_EVENT" // Represents an 'unlocked' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeUserBlockedEvent PullRequestTimelineItemsItemType = "USER_BLOCKED_EVENT" // Represents a 'user_blocked' event on a given user. + PullRequestTimelineItemsItemTypeUnpinnedEvent PullRequestTimelineItemsItemType = "UNPINNED_EVENT" // Represents an 'unpinned' event on a given issue or pull request. + PullRequestTimelineItemsItemTypeUnsubscribedEvent PullRequestTimelineItemsItemType = "UNSUBSCRIBED_EVENT" // Represents an 'unsubscribed' event on a given `Subscribable`. +) + // ReactionContent represents emojis that can be attached to Issues, Pull Requests and Comments. type ReactionContent string @@ -309,6 +490,8 @@ const ( ReactionContentHooray ReactionContent = "HOORAY" // Represents the 🎉 emoji. ReactionContentConfused ReactionContent = "CONFUSED" // Represents the 😕 emoji. ReactionContentHeart ReactionContent = "HEART" // Represents the ❤️ emoji. + ReactionContentRocket ReactionContent = "ROCKET" // Represents the 🚀 emoji. + ReactionContentEyes ReactionContent = "EYES" // Represents the 👀 emoji. ) // ReactionOrderField represents a list of fields that reactions can be ordered by. @@ -337,6 +520,18 @@ const ( ReleaseOrderFieldName ReleaseOrderField = "NAME" // Order releases alphabetically by name. ) +// ReportedContentClassifiers represents the reasons a piece of content can be reported or minimized. +type ReportedContentClassifiers string + +// The reasons a piece of content can be reported or minimized. +const ( + ReportedContentClassifiersSpam ReportedContentClassifiers = "SPAM" // A spammy piece of content. + ReportedContentClassifiersAbuse ReportedContentClassifiers = "ABUSE" // An abusive or harassing piece of content. + ReportedContentClassifiersOffTopic ReportedContentClassifiers = "OFF_TOPIC" // An irrelevant piece of content. + ReportedContentClassifiersOutdated ReportedContentClassifiers = "OUTDATED" // An outdated piece of content. + ReportedContentClassifiersResolved ReportedContentClassifiers = "RESOLVED" // The content has been resolved. +) + // RepositoryAffiliation represents the affiliation of a user to a repository. type RepositoryAffiliation string @@ -396,9 +591,11 @@ type RepositoryPermission string // The access level to a repository. const ( - RepositoryPermissionAdmin RepositoryPermission = "ADMIN" // Can read, clone, push, and add collaborators. - RepositoryPermissionWrite RepositoryPermission = "WRITE" // Can read, clone and push. - RepositoryPermissionRead RepositoryPermission = "READ" // Can read and clone. + RepositoryPermissionAdmin RepositoryPermission = "ADMIN" // Can read, clone, and push to this repository. Can also manage issues, pull requests, and repository settings, including adding collaborators. + RepositoryPermissionMaintain RepositoryPermission = "MAINTAIN" // Can read, clone, and push to this repository. They can also manage issues, pull requests, and some repository settings. + RepositoryPermissionWrite RepositoryPermission = "WRITE" // Can read, clone, and push to this repository. Can also manage issues and pull requests. + RepositoryPermissionTriage RepositoryPermission = "TRIAGE" // Can read and clone this repository. Can also manage issues and pull requests. + RepositoryPermissionRead RepositoryPermission = "READ" // Can read and clone this repository. Can also open and comment on issues and pull requests. ) // RepositoryPrivacy represents the privacy of a repository. @@ -420,6 +617,55 @@ const ( SearchTypeUser SearchType = "USER" // Returns results matching users and organizations on GitHub. ) +// SecurityAdvisoryEcosystem represents the possible ecosystems of a security vulnerability's package. +type SecurityAdvisoryEcosystem string + +// The possible ecosystems of a security vulnerability's package. +const ( + SecurityAdvisoryEcosystemRubygems SecurityAdvisoryEcosystem = "RUBYGEMS" // Ruby gems hosted at RubyGems.org. + SecurityAdvisoryEcosystemNpm SecurityAdvisoryEcosystem = "NPM" // JavaScript packages hosted at npmjs.com. + SecurityAdvisoryEcosystemPip SecurityAdvisoryEcosystem = "PIP" // Python packages hosted at PyPI.org. + SecurityAdvisoryEcosystemMaven SecurityAdvisoryEcosystem = "MAVEN" // Java artifacts hosted at the Maven central repository. + SecurityAdvisoryEcosystemNuget SecurityAdvisoryEcosystem = "NUGET" // .NET packages hosted at the NuGet Gallery. +) + +// SecurityAdvisoryIdentifierType represents identifier formats available for advisories. +type SecurityAdvisoryIdentifierType string + +// Identifier formats available for advisories. +const ( + SecurityAdvisoryIdentifierTypeCve SecurityAdvisoryIdentifierType = "CVE" // Common Vulnerabilities and Exposures Identifier. + SecurityAdvisoryIdentifierTypeGhsa SecurityAdvisoryIdentifierType = "GHSA" // GitHub Security Advisory ID. +) + +// SecurityAdvisoryOrderField represents properties by which security advisory connections can be ordered. +type SecurityAdvisoryOrderField string + +// Properties by which security advisory connections can be ordered. +const ( + SecurityAdvisoryOrderFieldPublishedAt SecurityAdvisoryOrderField = "PUBLISHED_AT" // Order advisories by publication time. + SecurityAdvisoryOrderFieldUpdatedAt SecurityAdvisoryOrderField = "UPDATED_AT" // Order advisories by update time. +) + +// SecurityAdvisorySeverity represents severity of the vulnerability. +type SecurityAdvisorySeverity string + +// Severity of the vulnerability. +const ( + SecurityAdvisorySeverityLow SecurityAdvisorySeverity = "LOW" // Low. + SecurityAdvisorySeverityModerate SecurityAdvisorySeverity = "MODERATE" // Moderate. + SecurityAdvisorySeverityHigh SecurityAdvisorySeverity = "HIGH" // High. + SecurityAdvisorySeverityCritical SecurityAdvisorySeverity = "CRITICAL" // Critical. +) + +// SecurityVulnerabilityOrderField represents properties by which security vulnerability connections can be ordered. +type SecurityVulnerabilityOrderField string + +// Properties by which security vulnerability connections can be ordered. +const ( + SecurityVulnerabilityOrderFieldUpdatedAt SecurityVulnerabilityOrderField = "UPDATED_AT" // Order vulnerability by update time. +) + // StarOrderField represents properties by which star connections can be ordered. type StarOrderField string @@ -445,7 +691,7 @@ type SubscriptionState string // The possible states of a subscription. const ( - SubscriptionStateUnsubscribed SubscriptionState = "UNSUBSCRIBED" // The User is only notified when particpating or @mentioned. + SubscriptionStateUnsubscribed SubscriptionState = "UNSUBSCRIBED" // The User is only notified when participating or @mentioned. SubscriptionStateSubscribed SubscriptionState = "SUBSCRIBED" // The User is notified of all conversations. SubscriptionStateIgnored SubscriptionState = "IGNORED" // The User is never notified. ) @@ -527,3 +773,23 @@ const ( TopicSuggestionDeclineReasonPersonalPreference TopicSuggestionDeclineReason = "PERSONAL_PREFERENCE" // The viewer does not like the suggested topic. TopicSuggestionDeclineReasonTooGeneral TopicSuggestionDeclineReason = "TOO_GENERAL" // The suggested topic is too general for the repository. ) + +// UserBlockDuration represents the possible durations that a user can be blocked for. +type UserBlockDuration string + +// The possible durations that a user can be blocked for. +const ( + UserBlockDurationOneDay UserBlockDuration = "ONE_DAY" // The user was blocked for 1 day. + UserBlockDurationThreeDays UserBlockDuration = "THREE_DAYS" // The user was blocked for 3 days. + UserBlockDurationOneWeek UserBlockDuration = "ONE_WEEK" // The user was blocked for 7 days. + UserBlockDurationOneMonth UserBlockDuration = "ONE_MONTH" // The user was blocked for 30 days. + UserBlockDurationPermanent UserBlockDuration = "PERMANENT" // The user was blocked permanently. +) + +// UserStatusOrderField represents properties by which user status connections can be ordered. +type UserStatusOrderField string + +// Properties by which user status connections can be ordered. +const ( + UserStatusOrderFieldUpdatedAt UserStatusOrderField = "UPDATED_AT" // Order user statuses by when they were updated. +) diff --git a/vendor/github.com/shurcooL/githubv4/gen.go b/vendor/github.com/shurcooL/githubv4/gen.go index 43ad1e35..628ce57b 100644 --- a/vendor/github.com/shurcooL/githubv4/gen.go +++ b/vendor/github.com/shurcooL/githubv4/gen.go @@ -86,12 +86,12 @@ package githubv4 {{- define "enum" -}} -// {{.name}} {{.description | endSentence}} +// {{.name}} {{.description | clean | endSentence}} type {{.name}} string -// {{.description | fullSentence}} +// {{.description | clean | fullSentence}} const ({{range .enumValues}} - {{$.name}}{{.name | enumIdentifier}} {{$.name}} = {{.name | quote}} // {{.description | fullSentence}}{{end}} + {{$.name}}{{.name | enumIdentifier}} {{$.name}} = {{.name | quote}} // {{.description | clean | fullSentence}}{{end}} ) {{- end -}} `), @@ -110,12 +110,12 @@ type Input interface{} {{- define "inputObject" -}} -// {{.name}} {{.description | endSentence}} +// {{.name}} {{.description | clean | endSentence}} type {{.name}} struct {{"{"}}{{range .inputFields}}{{if eq .type.kind "NON_NULL"}} - // {{.description | fullSentence}} (Required.) + // {{.description | clean | fullSentence}} (Required.) {{.name | identifier}} {{.type | type}} ` + "`" + `json:"{{.name}}"` + "`" + `{{end}}{{end}} {{range .inputFields}}{{if ne .type.kind "NON_NULL"}} - // {{.description | fullSentence}} (Optional.) + // {{.description | clean | fullSentence}} (Optional.) {{.name | identifier}} {{.type | type}} ` + "`" + `json:"{{.name}},omitempty"` + "`" + `{{end}}{{end}} } {{- end -}} @@ -167,6 +167,7 @@ func t(text string) *template.Template { "identifier": func(name string) string { return ident.ParseLowerCamelCase(name).ToMixedCaps() }, "enumIdentifier": func(name string) string { return ident.ParseScreamingSnakeCase(name).ToMixedCaps() }, "type": typeString, + "clean": func(s string) string { return strings.Join(strings.Fields(s), " ") }, "endSentence": func(s string) string { s = strings.ToLower(s[0:1]) + s[1:] switch { diff --git a/vendor/github.com/shurcooL/githubv4/input.go b/vendor/github.com/shurcooL/githubv4/input.go index ce1976f8..da00e3b3 100644 --- a/vendor/github.com/shurcooL/githubv4/input.go +++ b/vendor/github.com/shurcooL/githubv4/input.go @@ -4,7 +4,7 @@ package githubv4 // Input represents one of the Input structs: // -// AcceptTopicSuggestionInput, AddCommentInput, AddProjectCardInput, AddProjectColumnInput, AddPullRequestReviewCommentInput, AddPullRequestReviewInput, AddReactionInput, AddStarInput, CommitAuthor, CreateProjectInput, DeclineTopicSuggestionInput, DeleteProjectCardInput, DeleteProjectColumnInput, DeleteProjectInput, DeletePullRequestReviewInput, DismissPullRequestReviewInput, DraftPullRequestReviewComment, GistOrder, IssueOrder, LanguageOrder, LockLockableInput, MilestoneOrder, MoveProjectCardInput, MoveProjectColumnInput, ProjectOrder, ReactionOrder, RefOrder, ReleaseOrder, RemoveOutsideCollaboratorInput, RemoveReactionInput, RemoveStarInput, RepositoryOrder, RequestReviewsInput, StarOrder, SubmitPullRequestReviewInput, TeamMemberOrder, TeamOrder, TeamRepositoryOrder, UpdateProjectCardInput, UpdateProjectColumnInput, UpdateProjectInput, UpdatePullRequestReviewCommentInput, UpdatePullRequestReviewInput, UpdateSubscriptionInput, UpdateTopicsInput. +// AcceptTopicSuggestionInput, AddAssigneesToAssignableInput, AddCommentInput, AddLabelsToLabelableInput, AddProjectCardInput, AddProjectColumnInput, AddPullRequestReviewCommentInput, AddPullRequestReviewInput, AddReactionInput, AddStarInput, ChangeUserStatusInput, ClearLabelsFromLabelableInput, CloneProjectInput, CloseIssueInput, ClosePullRequestInput, CommitAuthor, CommitContributionOrder, ContributionOrder, ConvertProjectCardNoteToIssueInput, CreateBranchProtectionRuleInput, CreateContentAttachmentInput, CreateIssueInput, CreateProjectInput, CreatePullRequestInput, DeclineTopicSuggestionInput, DeleteBranchProtectionRuleInput, DeleteIssueCommentInput, DeleteIssueInput, DeleteProjectCardInput, DeleteProjectColumnInput, DeleteProjectInput, DeletePullRequestReviewCommentInput, DeletePullRequestReviewInput, DeploymentOrder, DismissPullRequestReviewInput, DraftPullRequestReviewComment, GistOrder, ImportProjectInput, IssueFilters, IssueOrder, LanguageOrder, LockLockableInput, MergePullRequestInput, MilestoneOrder, MinimizeCommentInput, MoveProjectCardInput, MoveProjectColumnInput, PinIssueInput, ProjectCardImport, ProjectColumnImport, ProjectOrder, PullRequestOrder, ReactionOrder, RefOrder, ReleaseOrder, RemoveAssigneesFromAssignableInput, RemoveLabelsFromLabelableInput, RemoveOutsideCollaboratorInput, RemoveReactionInput, RemoveStarInput, ReopenIssueInput, ReopenPullRequestInput, RepositoryOrder, RequestReviewsInput, ResolveReviewThreadInput, SecurityAdvisoryIdentifierFilter, SecurityAdvisoryOrder, SecurityVulnerabilityOrder, StarOrder, SubmitPullRequestReviewInput, TeamMemberOrder, TeamOrder, TeamRepositoryOrder, UnlockLockableInput, UnmarkIssueAsDuplicateInput, UnminimizeCommentInput, UnpinIssueInput, UnresolveReviewThreadInput, UpdateBranchProtectionRuleInput, UpdateIssueCommentInput, UpdateIssueInput, UpdateProjectCardInput, UpdateProjectColumnInput, UpdateProjectInput, UpdatePullRequestInput, UpdatePullRequestReviewCommentInput, UpdatePullRequestReviewInput, UpdateSubscriptionInput, UpdateTopicsInput, UserStatusOrder. type Input interface{} // AcceptTopicSuggestionInput is an autogenerated input type of AcceptTopicSuggestion. @@ -18,6 +18,17 @@ type AcceptTopicSuggestionInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// AddAssigneesToAssignableInput is an autogenerated input type of AddAssigneesToAssignable. +type AddAssigneesToAssignableInput struct { + // The id of the assignable object to add assignees to. (Required.) + AssignableID ID `json:"assignableId"` + // The id of users to add as assignees. (Required.) + AssigneeIDs []ID `json:"assigneeIds"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // AddCommentInput is an autogenerated input type of AddComment. type AddCommentInput struct { // The Node ID of the subject to modify. (Required.) @@ -29,6 +40,17 @@ type AddCommentInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// AddLabelsToLabelableInput is an autogenerated input type of AddLabelsToLabelable. +type AddLabelsToLabelableInput struct { + // The id of the labelable object to add labels to. (Required.) + LabelableID ID `json:"labelableId"` + // The ids of the labels to add. (Required.) + LabelIDs []ID `json:"labelIds"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // AddProjectCardInput is an autogenerated input type of AddProjectCard. type AddProjectCardInput struct { // The Node ID of the ProjectColumn. (Required.) @@ -109,6 +131,69 @@ type AddStarInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// ChangeUserStatusInput is an autogenerated input type of ChangeUserStatus. +type ChangeUserStatusInput struct { + + // The emoji to represent your status. Can either be a native Unicode emoji or an emoji name with colons, e.g., :grinning:. (Optional.) + Emoji *String `json:"emoji,omitempty"` + // A short description of your current status. (Optional.) + Message *String `json:"message,omitempty"` + // The ID of the organization whose members will be allowed to see the status. If omitted, the status will be publicly visible. (Optional.) + OrganizationID *ID `json:"organizationId,omitempty"` + // Whether this status should indicate you are not fully available on GitHub, e.g., you are away. (Optional.) + LimitedAvailability *Boolean `json:"limitedAvailability,omitempty"` + // If set, the user status will not be shown after this date. (Optional.) + ExpiresAt *DateTime `json:"expiresAt,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// ClearLabelsFromLabelableInput is an autogenerated input type of ClearLabelsFromLabelable. +type ClearLabelsFromLabelableInput struct { + // The id of the labelable object to clear the labels from. (Required.) + LabelableID ID `json:"labelableId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// CloneProjectInput is an autogenerated input type of CloneProject. +type CloneProjectInput struct { + // The owner ID to create the project under. (Required.) + TargetOwnerID ID `json:"targetOwnerId"` + // The source project to clone. (Required.) + SourceID ID `json:"sourceId"` + // Whether or not to clone the source project's workflows. (Required.) + IncludeWorkflows Boolean `json:"includeWorkflows"` + // The name of the project. (Required.) + Name String `json:"name"` + + // The description of the project. (Optional.) + Body *String `json:"body,omitempty"` + // The visibility of the project, defaults to false (private). (Optional.) + Public *Boolean `json:"public,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// CloseIssueInput is an autogenerated input type of CloseIssue. +type CloseIssueInput struct { + // ID of the issue to be closed. (Required.) + IssueID ID `json:"issueId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// ClosePullRequestInput is an autogenerated input type of ClosePullRequest. +type ClosePullRequestInput struct { + // ID of the pull request to be closed. (Required.) + PullRequestID ID `json:"pullRequestId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // CommitAuthor specifies an author for filtering Git commits. type CommitAuthor struct { @@ -118,6 +203,108 @@ type CommitAuthor struct { Emails *[]String `json:"emails,omitempty"` } +// CommitContributionOrder represents ordering options for commit contribution connections. +type CommitContributionOrder struct { + // The field by which to order commit contributions. (Required.) + Field CommitContributionOrderField `json:"field"` + // The ordering direction. (Required.) + Direction OrderDirection `json:"direction"` +} + +// ContributionOrder represents ordering options for contribution connections. +type ContributionOrder struct { + // The field by which to order contributions. (Required.) + Field ContributionOrderField `json:"field"` + // The ordering direction. (Required.) + Direction OrderDirection `json:"direction"` +} + +// ConvertProjectCardNoteToIssueInput is an autogenerated input type of ConvertProjectCardNoteToIssue. +type ConvertProjectCardNoteToIssueInput struct { + // The ProjectCard ID to convert. (Required.) + ProjectCardID ID `json:"projectCardId"` + // The ID of the repository to create the issue in. (Required.) + RepositoryID ID `json:"repositoryId"` + + // The title of the newly created issue. Defaults to the card's note text. (Optional.) + Title *String `json:"title,omitempty"` + // The body of the newly created issue. (Optional.) + Body *String `json:"body,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// CreateBranchProtectionRuleInput is an autogenerated input type of CreateBranchProtectionRule. +type CreateBranchProtectionRuleInput struct { + // The global relay id of the repository in which a new branch protection rule should be created in. (Required.) + RepositoryID ID `json:"repositoryId"` + // The glob-like pattern used to determine matching branches. (Required.) + Pattern String `json:"pattern"` + + // Are approving reviews required to update matching branches. (Optional.) + RequiresApprovingReviews *Boolean `json:"requiresApprovingReviews,omitempty"` + // Number of approving reviews required to update matching branches. (Optional.) + RequiredApprovingReviewCount *Int `json:"requiredApprovingReviewCount,omitempty"` + // Are commits required to be signed. (Optional.) + RequiresCommitSignatures *Boolean `json:"requiresCommitSignatures,omitempty"` + // Can admins overwrite branch protection. (Optional.) + IsAdminEnforced *Boolean `json:"isAdminEnforced,omitempty"` + // Are status checks required to update matching branches. (Optional.) + RequiresStatusChecks *Boolean `json:"requiresStatusChecks,omitempty"` + // Are branches required to be up to date before merging. (Optional.) + RequiresStrictStatusChecks *Boolean `json:"requiresStrictStatusChecks,omitempty"` + // Are reviews from code owners required to update matching branches. (Optional.) + RequiresCodeOwnerReviews *Boolean `json:"requiresCodeOwnerReviews,omitempty"` + // Will new commits pushed to matching branches dismiss pull request review approvals. (Optional.) + DismissesStaleReviews *Boolean `json:"dismissesStaleReviews,omitempty"` + // Is dismissal of pull request reviews restricted. (Optional.) + RestrictsReviewDismissals *Boolean `json:"restrictsReviewDismissals,omitempty"` + // A list of User or Team IDs allowed to dismiss reviews on pull requests targeting matching branches. (Optional.) + ReviewDismissalActorIDs *[]ID `json:"reviewDismissalActorIds,omitempty"` + // Is pushing to matching branches restricted. (Optional.) + RestrictsPushes *Boolean `json:"restrictsPushes,omitempty"` + // A list of User or Team IDs allowed to push to matching branches. (Optional.) + PushActorIDs *[]ID `json:"pushActorIds,omitempty"` + // List of required status check contexts that must pass for commits to be accepted to matching branches. (Optional.) + RequiredStatusCheckContexts *[]String `json:"requiredStatusCheckContexts,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// CreateContentAttachmentInput is an autogenerated input type of CreateContentAttachment. +type CreateContentAttachmentInput struct { + // The node ID of the content_reference. (Required.) + ContentReferenceID ID `json:"contentReferenceId"` + // The title of the content attachment. (Required.) + Title String `json:"title"` + // The body of the content attachment, which may contain markdown. (Required.) + Body String `json:"body"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// CreateIssueInput is an autogenerated input type of CreateIssue. +type CreateIssueInput struct { + // The Node ID of the repository. (Required.) + RepositoryID ID `json:"repositoryId"` + // The title for the issue. (Required.) + Title String `json:"title"` + + // The body for the issue description. (Optional.) + Body *String `json:"body,omitempty"` + // The Node ID for the user assignee for this issue. (Optional.) + AssigneeIDs *[]ID `json:"assigneeIds,omitempty"` + // The Node ID of the milestone for this issue. (Optional.) + MilestoneID *ID `json:"milestoneId,omitempty"` + // An array of Node IDs of labels for this issue. (Optional.) + LabelIDs *[]ID `json:"labelIds,omitempty"` + // An array of Node IDs for projects associated with this issue. (Optional.) + ProjectIDs *[]ID `json:"projectIds,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // CreateProjectInput is an autogenerated input type of CreateProject. type CreateProjectInput struct { // The owner ID to create the project under. (Required.) @@ -131,6 +318,25 @@ type CreateProjectInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// CreatePullRequestInput is an autogenerated input type of CreatePullRequest. +type CreatePullRequestInput struct { + // The Node ID of the repository. (Required.) + RepositoryID ID `json:"repositoryId"` + // The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. (Required.) + BaseRefName String `json:"baseRefName"` + // The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head_ref_name` with a user like this: `username:branch`. (Required.) + HeadRefName String `json:"headRefName"` + // The title of the pull request. (Required.) + Title String `json:"title"` + + // The contents of the pull request. (Optional.) + Body *String `json:"body,omitempty"` + // Indicates whether maintainers can modify the pull request. (Optional.) + MaintainerCanModify *Boolean `json:"maintainerCanModify,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // DeclineTopicSuggestionInput is an autogenerated input type of DeclineTopicSuggestion. type DeclineTopicSuggestionInput struct { // The Node ID of the repository. (Required.) @@ -144,6 +350,33 @@ type DeclineTopicSuggestionInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// DeleteBranchProtectionRuleInput is an autogenerated input type of DeleteBranchProtectionRule. +type DeleteBranchProtectionRuleInput struct { + // The global relay id of the branch protection rule to be deleted. (Required.) + BranchProtectionRuleID ID `json:"branchProtectionRuleId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// DeleteIssueCommentInput is an autogenerated input type of DeleteIssueComment. +type DeleteIssueCommentInput struct { + // The ID of the comment to delete. (Required.) + ID ID `json:"id"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// DeleteIssueInput is an autogenerated input type of DeleteIssue. +type DeleteIssueInput struct { + // The ID of the issue to delete. (Required.) + IssueID ID `json:"issueId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // DeleteProjectCardInput is an autogenerated input type of DeleteProjectCard. type DeleteProjectCardInput struct { // The id of the card to delete. (Required.) @@ -171,6 +404,15 @@ type DeleteProjectInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// DeletePullRequestReviewCommentInput is an autogenerated input type of DeletePullRequestReviewComment. +type DeletePullRequestReviewCommentInput struct { + // The ID of the comment to delete. (Required.) + ID ID `json:"id"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // DeletePullRequestReviewInput is an autogenerated input type of DeletePullRequestReview. type DeletePullRequestReviewInput struct { // The Node ID of the pull request review to delete. (Required.) @@ -180,6 +422,14 @@ type DeletePullRequestReviewInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// DeploymentOrder represents ordering options for deployment connections. +type DeploymentOrder struct { + // The field to order deployments by. (Required.) + Field DeploymentOrderField `json:"field"` + // The ordering direction. (Required.) + Direction OrderDirection `json:"direction"` +} + // DismissPullRequestReviewInput is an autogenerated input type of DismissPullRequestReview. type DismissPullRequestReviewInput struct { // The Node ID of the pull request review to modify. (Required.) @@ -209,6 +459,44 @@ type GistOrder struct { Direction OrderDirection `json:"direction"` } +// ImportProjectInput is an autogenerated input type of ImportProject. +type ImportProjectInput struct { + // The name of the Organization or User to create the Project under. (Required.) + OwnerName String `json:"ownerName"` + // The name of Project. (Required.) + Name String `json:"name"` + // A list of columns containing issues and pull requests. (Required.) + ColumnImports []ProjectColumnImport `json:"columnImports"` + + // The description of Project. (Optional.) + Body *String `json:"body,omitempty"` + // Whether the Project is public or not. (Optional.) + Public *Boolean `json:"public,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// IssueFilters represents ways in which to filter lists of issues. +type IssueFilters struct { + + // List issues assigned to given name. Pass in `null` for issues with no assigned user, and `*` for issues assigned to any user. (Optional.) + Assignee *String `json:"assignee,omitempty"` + // List issues created by given name. (Optional.) + CreatedBy *String `json:"createdBy,omitempty"` + // List issues where the list of label names exist on the issue. (Optional.) + Labels *[]String `json:"labels,omitempty"` + // List issues where the given name is mentioned in the issue. (Optional.) + Mentioned *String `json:"mentioned,omitempty"` + // List issues by given milestone argument. If an string representation of an integer is passed, it should refer to a milestone by its number field. Pass in `null` for issues with no milestone, and `*` for issues that are assigned to any milestone. (Optional.) + Milestone *String `json:"milestone,omitempty"` + // List issues that have been updated at or after the given date. (Optional.) + Since *DateTime `json:"since,omitempty"` + // List issues filtered by the list of states given. (Optional.) + States *[]IssueState `json:"states,omitempty"` + // List issues subscribed to by viewer. (Optional.) + ViewerSubscribed *Boolean `json:"viewerSubscribed,omitempty"` +} + // IssueOrder represents ways in which lists of issues can be ordered upon return. type IssueOrder struct { // The field in which to order issues by. (Required.) @@ -236,6 +524,21 @@ type LockLockableInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// MergePullRequestInput is an autogenerated input type of MergePullRequest. +type MergePullRequestInput struct { + // ID of the pull request to be merged. (Required.) + PullRequestID ID `json:"pullRequestId"` + + // Commit headline to use for the merge commit; if omitted, a default message will be used. (Optional.) + CommitHeadline *String `json:"commitHeadline,omitempty"` + // Commit body to use for the merge commit; if omitted, a default message will be used. (Optional.) + CommitBody *String `json:"commitBody,omitempty"` + // OID that the pull request head ref must match to allow merge; if omitted, no check is performed. (Optional.) + ExpectedHeadOid *GitObjectID `json:"expectedHeadOid,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // MilestoneOrder represents ordering options for milestone connections. type MilestoneOrder struct { // The field to order milestones by. (Required.) @@ -244,6 +547,17 @@ type MilestoneOrder struct { Direction OrderDirection `json:"direction"` } +// MinimizeCommentInput is an autogenerated input type of MinimizeComment. +type MinimizeCommentInput struct { + // The Node ID of the subject to modify. (Required.) + SubjectID ID `json:"subjectId"` + // The classification of comment. (Required.) + Classifier ReportedContentClassifiers `json:"classifier"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // MoveProjectCardInput is an autogenerated input type of MoveProjectCard. type MoveProjectCardInput struct { // The id of the card to move. (Required.) @@ -268,6 +582,34 @@ type MoveProjectColumnInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// PinIssueInput is an autogenerated input type of PinIssue. +type PinIssueInput struct { + // The ID of the issue to be pinned. (Required.) + IssueID ID `json:"issueId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// ProjectCardImport represents an issue or PR and its owning repository to be used in a project card. +type ProjectCardImport struct { + // Repository name with owner (owner/repository). (Required.) + Repository String `json:"repository"` + // The issue or pull request number. (Required.) + Number Int `json:"number"` +} + +// ProjectColumnImport represents a project column and a list of its issues and PRs. +type ProjectColumnImport struct { + // The name of the column. (Required.) + ColumnName String `json:"columnName"` + // The position of the column, starting from 0. (Required.) + Position Int `json:"position"` + + // A list of issues and pull requests in the column. (Optional.) + Issues *[]ProjectCardImport `json:"issues,omitempty"` +} + // ProjectOrder represents ways in which lists of projects can be ordered upon return. type ProjectOrder struct { // The field in which to order projects by. (Required.) @@ -276,6 +618,14 @@ type ProjectOrder struct { Direction OrderDirection `json:"direction"` } +// PullRequestOrder represents ways in which lists of issues can be ordered upon return. +type PullRequestOrder struct { + // The field in which to order pull requests by. (Required.) + Field PullRequestOrderField `json:"field"` + // The direction in which to order pull requests by the specified field. (Required.) + Direction OrderDirection `json:"direction"` +} + // ReactionOrder represents ways in which lists of reactions can be ordered upon return. type ReactionOrder struct { // The field in which to order reactions by. (Required.) @@ -300,6 +650,28 @@ type ReleaseOrder struct { Direction OrderDirection `json:"direction"` } +// RemoveAssigneesFromAssignableInput is an autogenerated input type of RemoveAssigneesFromAssignable. +type RemoveAssigneesFromAssignableInput struct { + // The id of the assignable object to remove assignees from. (Required.) + AssignableID ID `json:"assignableId"` + // The id of users to remove as assignees. (Required.) + AssigneeIDs []ID `json:"assigneeIds"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// RemoveLabelsFromLabelableInput is an autogenerated input type of RemoveLabelsFromLabelable. +type RemoveLabelsFromLabelableInput struct { + // The id of the Labelable to remove labels from. (Required.) + LabelableID ID `json:"labelableId"` + // The ids of labels to remove. (Required.) + LabelIDs []ID `json:"labelIds"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // RemoveOutsideCollaboratorInput is an autogenerated input type of RemoveOutsideCollaborator. type RemoveOutsideCollaboratorInput struct { // The ID of the outside collaborator to remove. (Required.) @@ -331,6 +703,24 @@ type RemoveStarInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// ReopenIssueInput is an autogenerated input type of ReopenIssue. +type ReopenIssueInput struct { + // ID of the issue to be opened. (Required.) + IssueID ID `json:"issueId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// ReopenPullRequestInput is an autogenerated input type of ReopenPullRequest. +type ReopenPullRequestInput struct { + // ID of the pull request to be reopened. (Required.) + PullRequestID ID `json:"pullRequestId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // RepositoryOrder represents ordering options for repository connections. type RepositoryOrder struct { // The field to order repositories by. (Required.) @@ -354,6 +744,39 @@ type RequestReviewsInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// ResolveReviewThreadInput is an autogenerated input type of ResolveReviewThread. +type ResolveReviewThreadInput struct { + // The ID of the thread to resolve. (Required.) + ThreadID ID `json:"threadId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// SecurityAdvisoryIdentifierFilter represents an advisory identifier to filter results on. +type SecurityAdvisoryIdentifierFilter struct { + // The identifier type. (Required.) + Type SecurityAdvisoryIdentifierType `json:"type"` + // The identifier string. Supports exact or partial matching. (Required.) + Value String `json:"value"` +} + +// SecurityAdvisoryOrder represents ordering options for security advisory connections. +type SecurityAdvisoryOrder struct { + // The field to order security advisories by. (Required.) + Field SecurityAdvisoryOrderField `json:"field"` + // The ordering direction. (Required.) + Direction OrderDirection `json:"direction"` +} + +// SecurityVulnerabilityOrder represents ordering options for security vulnerability connections. +type SecurityVulnerabilityOrder struct { + // The field to order security vulnerabilities by. (Required.) + Field SecurityVulnerabilityOrderField `json:"field"` + // The ordering direction. (Required.) + Direction OrderDirection `json:"direction"` +} + // StarOrder represents ways in which star connections can be ordered. type StarOrder struct { // The field in which to order nodes by. (Required.) @@ -399,13 +822,133 @@ type TeamRepositoryOrder struct { Direction OrderDirection `json:"direction"` } +// UnlockLockableInput is an autogenerated input type of UnlockLockable. +type UnlockLockableInput struct { + // ID of the issue or pull request to be unlocked. (Required.) + LockableID ID `json:"lockableId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// UnmarkIssueAsDuplicateInput is an autogenerated input type of UnmarkIssueAsDuplicate. +type UnmarkIssueAsDuplicateInput struct { + // ID of the issue or pull request currently marked as a duplicate. (Required.) + DuplicateID ID `json:"duplicateId"` + // ID of the issue or pull request currently considered canonical/authoritative/original. (Required.) + CanonicalID ID `json:"canonicalId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// UnminimizeCommentInput is an autogenerated input type of UnminimizeComment. +type UnminimizeCommentInput struct { + // The Node ID of the subject to modify. (Required.) + SubjectID ID `json:"subjectId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// UnpinIssueInput is an autogenerated input type of UnpinIssue. +type UnpinIssueInput struct { + // The ID of the issue to be unpinned. (Required.) + IssueID ID `json:"issueId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// UnresolveReviewThreadInput is an autogenerated input type of UnresolveReviewThread. +type UnresolveReviewThreadInput struct { + // The ID of the thread to unresolve. (Required.) + ThreadID ID `json:"threadId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// UpdateBranchProtectionRuleInput is an autogenerated input type of UpdateBranchProtectionRule. +type UpdateBranchProtectionRuleInput struct { + // The global relay id of the branch protection rule to be updated. (Required.) + BranchProtectionRuleID ID `json:"branchProtectionRuleId"` + + // The glob-like pattern used to determine matching branches. (Optional.) + Pattern *String `json:"pattern,omitempty"` + // Are approving reviews required to update matching branches. (Optional.) + RequiresApprovingReviews *Boolean `json:"requiresApprovingReviews,omitempty"` + // Number of approving reviews required to update matching branches. (Optional.) + RequiredApprovingReviewCount *Int `json:"requiredApprovingReviewCount,omitempty"` + // Are commits required to be signed. (Optional.) + RequiresCommitSignatures *Boolean `json:"requiresCommitSignatures,omitempty"` + // Can admins overwrite branch protection. (Optional.) + IsAdminEnforced *Boolean `json:"isAdminEnforced,omitempty"` + // Are status checks required to update matching branches. (Optional.) + RequiresStatusChecks *Boolean `json:"requiresStatusChecks,omitempty"` + // Are branches required to be up to date before merging. (Optional.) + RequiresStrictStatusChecks *Boolean `json:"requiresStrictStatusChecks,omitempty"` + // Are reviews from code owners required to update matching branches. (Optional.) + RequiresCodeOwnerReviews *Boolean `json:"requiresCodeOwnerReviews,omitempty"` + // Will new commits pushed to matching branches dismiss pull request review approvals. (Optional.) + DismissesStaleReviews *Boolean `json:"dismissesStaleReviews,omitempty"` + // Is dismissal of pull request reviews restricted. (Optional.) + RestrictsReviewDismissals *Boolean `json:"restrictsReviewDismissals,omitempty"` + // A list of User or Team IDs allowed to dismiss reviews on pull requests targeting matching branches. (Optional.) + ReviewDismissalActorIDs *[]ID `json:"reviewDismissalActorIds,omitempty"` + // Is pushing to matching branches restricted. (Optional.) + RestrictsPushes *Boolean `json:"restrictsPushes,omitempty"` + // A list of User or Team IDs allowed to push to matching branches. (Optional.) + PushActorIDs *[]ID `json:"pushActorIds,omitempty"` + // List of required status check contexts that must pass for commits to be accepted to matching branches. (Optional.) + RequiredStatusCheckContexts *[]String `json:"requiredStatusCheckContexts,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// UpdateIssueCommentInput is an autogenerated input type of UpdateIssueComment. +type UpdateIssueCommentInput struct { + // The ID of the IssueComment to modify. (Required.) + ID ID `json:"id"` + // The updated text of the comment. (Required.) + Body String `json:"body"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// UpdateIssueInput is an autogenerated input type of UpdateIssue. +type UpdateIssueInput struct { + // The ID of the Issue to modify. (Required.) + ID ID `json:"id"` + + // The title for the issue. (Optional.) + Title *String `json:"title,omitempty"` + // The body for the issue description. (Optional.) + Body *String `json:"body,omitempty"` + // An array of Node IDs of users for this issue. (Optional.) + AssigneeIDs *[]ID `json:"assigneeIds,omitempty"` + // The Node ID of the milestone for this issue. (Optional.) + MilestoneID *ID `json:"milestoneId,omitempty"` + // An array of Node IDs of labels for this issue. (Optional.) + LabelIDs *[]ID `json:"labelIds,omitempty"` + // The desired issue state. (Optional.) + State *IssueState `json:"state,omitempty"` + // An array of Node IDs for projects associated with this issue. (Optional.) + ProjectIDs *[]ID `json:"projectIds,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // UpdateProjectCardInput is an autogenerated input type of UpdateProjectCard. type UpdateProjectCardInput struct { // The ProjectCard ID to update. (Required.) ProjectCardID ID `json:"projectCardId"` - // The note of ProjectCard. (Required.) - Note String `json:"note"` + // Whether or not the ProjectCard should be archived. (Optional.) + IsArchived *Boolean `json:"isArchived,omitempty"` + // The note of ProjectCard. (Optional.) + Note *String `json:"note,omitempty"` // A unique identifier for the client performing the mutation. (Optional.) ClientMutationID *String `json:"clientMutationId,omitempty"` } @@ -438,6 +981,23 @@ type UpdateProjectInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// UpdatePullRequestInput is an autogenerated input type of UpdatePullRequest. +type UpdatePullRequestInput struct { + // The Node ID of the pull request. (Required.) + PullRequestID ID `json:"pullRequestId"` + + // The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. (Optional.) + BaseRefName *String `json:"baseRefName,omitempty"` + // The title of the pull request. (Optional.) + Title *String `json:"title,omitempty"` + // The contents of the pull request. (Optional.) + Body *String `json:"body,omitempty"` + // Indicates whether maintainers can modify the pull request. (Optional.) + MaintainerCanModify *Boolean `json:"maintainerCanModify,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // UpdatePullRequestReviewCommentInput is an autogenerated input type of UpdatePullRequestReviewComment. type UpdatePullRequestReviewCommentInput struct { // The Node ID of the comment to modify. (Required.) @@ -481,3 +1041,11 @@ type UpdateTopicsInput struct { // A unique identifier for the client performing the mutation. (Optional.) ClientMutationID *String `json:"clientMutationId,omitempty"` } + +// UserStatusOrder represents ordering options for user status connections. +type UserStatusOrder struct { + // The field to order user statuses by. (Required.) + Field UserStatusOrderField `json:"field"` + // The ordering direction. (Required.) + Direction OrderDirection `json:"direction"` +}