From 3a0c9c664e28dac70676c9124d28ee57658887c9 Mon Sep 17 00:00:00 2001 From: Danilo Joksimovic Date: Wed, 3 Jul 2019 23:24:52 -0400 Subject: [PATCH] Add support for Schema Previews in gen.go --- enum.go | 232 +++++++++++++++++++++++++++++ gen.go | 47 +++++- input.go | 442 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 715 insertions(+), 6 deletions(-) diff --git a/enum.go b/enum.go index 26cf87e..e7872fb 100644 --- a/enum.go +++ b/enum.go @@ -2,6 +2,57 @@ package githubv4 +// AuditLogOrderField represents properties by which Audit Log connections can be ordered. +type AuditLogOrderField string + +// Properties by which Audit Log connections can be ordered. +const ( + AuditLogOrderFieldCreatedAt AuditLogOrderField = "CREATED_AT" // Order audit log entries by timestamp. +) + +// CheckAnnotationLevel represents represents an annotation's information level. +type CheckAnnotationLevel string + +// Represents an annotation's information level. +const ( + CheckAnnotationLevelFailure CheckAnnotationLevel = "FAILURE" // An annotation indicating an inescapable error. + CheckAnnotationLevelNotice CheckAnnotationLevel = "NOTICE" // An annotation indicating some information. + CheckAnnotationLevelWarning CheckAnnotationLevel = "WARNING" // An annotation indicating an ignorable error. +) + +// CheckConclusionState represents the possible states for a check suite or run conclusion. +type CheckConclusionState string + +// The possible states for a check suite or run conclusion. +const ( + CheckConclusionStateActionRequired CheckConclusionState = "ACTION_REQUIRED" // The check suite or run requires action. + CheckConclusionStateTimedOut CheckConclusionState = "TIMED_OUT" // The check suite or run has timed out. + CheckConclusionStateCancelled CheckConclusionState = "CANCELLED" // The check suite or run has been cancelled. + CheckConclusionStateFailure CheckConclusionState = "FAILURE" // The check suite or run has failed. + CheckConclusionStateSuccess CheckConclusionState = "SUCCESS" // The check suite or run has succeeded. + CheckConclusionStateNeutral CheckConclusionState = "NEUTRAL" // The check suite or run was neutral. +) + +// CheckRunType represents the possible types of check runs. +type CheckRunType string + +// The possible types of check runs. +const ( + CheckRunTypeAll CheckRunType = "ALL" // Every check run available. + CheckRunTypeLatest CheckRunType = "LATEST" // The latest check run. +) + +// CheckStatusState represents the possible states for a check suite or run status. +type CheckStatusState string + +// The possible states for a check suite or run status. +const ( + CheckStatusStateQueued CheckStatusState = "QUEUED" // The check suite or run has been queued. + CheckStatusStateInProgress CheckStatusState = "IN_PROGRESS" // The check suite or run is in progress. + CheckStatusStateCompleted CheckStatusState = "COMPLETED" // The check suite or run has been completed. + CheckStatusStateRequested CheckStatusState = "REQUESTED" // The check suite or run has been requested. +) + // CollaboratorAffiliation represents collaborators affiliation level with a subject. type CollaboratorAffiliation string @@ -241,6 +292,21 @@ const ( LockReasonSpam LockReason = "SPAM" // The issue or pull request was locked because the conversation was spam. ) +// MergeStateStatus represents detailed status information about a pull request merge. +type MergeStateStatus string + +// Detailed status information about a pull request merge. +const ( + MergeStateStatusDirty MergeStateStatus = "DIRTY" // The merge commit cannot be cleanly created. + MergeStateStatusUnknown MergeStateStatus = "UNKNOWN" // The state cannot currently be determined. + MergeStateStatusBlocked MergeStateStatus = "BLOCKED" // The merge is blocked. + MergeStateStatusBehind MergeStateStatus = "BEHIND" // The head ref is out of date. + MergeStateStatusDraft MergeStateStatus = "DRAFT" // The merge is blocked due to the pull request being a draft. + MergeStateStatusUnstable MergeStateStatus = "UNSTABLE" // Mergeable with non-passing commit status. + MergeStateStatusHasHooks MergeStateStatus = "HAS_HOOKS" // Mergeable with passing commit status and pre-recieve hooks. + MergeStateStatusClean MergeStateStatus = "CLEAN" // Mergeable and passing commit status. +) + // MergeableState represents whether or not a PullRequest can be merged. type MergeableState string @@ -271,6 +337,26 @@ const ( MilestoneStateClosed MilestoneState = "CLOSED" // A milestone that has been closed. ) +// OauthApplicationCreateAuditEntryState represents the state of an OAuth Application when it was created. +type OauthApplicationCreateAuditEntryState string + +// The state of an OAuth Application when it was created. +const ( + OauthApplicationCreateAuditEntryStateActive OauthApplicationCreateAuditEntryState = "ACTIVE" // The OAuth Application was active and allowed to have OAuth Accesses. + OauthApplicationCreateAuditEntryStateSuspended OauthApplicationCreateAuditEntryState = "SUSPENDED" // The OAuth Application was suspended from generating OAuth Accesses due to abuse or security concerns. + OauthApplicationCreateAuditEntryStatePendingDeletion OauthApplicationCreateAuditEntryState = "PENDING_DELETION" // The OAuth Application was in the process of being deleted. +) + +// OauthApplicationRevokeTokensAuditEntryState represents the state of an OAuth Application when its tokens were revoked. +type OauthApplicationRevokeTokensAuditEntryState string + +// The state of an OAuth Application when its tokens were revoked. +const ( + OauthApplicationRevokeTokensAuditEntryStateActive OauthApplicationRevokeTokensAuditEntryState = "ACTIVE" // The OAuth Application was active and allowed to have OAuth Accesses. + OauthApplicationRevokeTokensAuditEntryStateSuspended OauthApplicationRevokeTokensAuditEntryState = "SUSPENDED" // The OAuth Application was suspended from generating OAuth Accesses due to abuse or security concerns. + OauthApplicationRevokeTokensAuditEntryStatePendingDeletion OauthApplicationRevokeTokensAuditEntryState = "PENDING_DELETION" // The OAuth Application was in the process of being deleted. +) + // OrderDirection represents possible directions in which to order a list of items when provided an `orderBy` argument. type OrderDirection string @@ -280,6 +366,95 @@ const ( OrderDirectionDesc OrderDirection = "DESC" // Specifies a descending order for a given `orderBy` argument. ) +// OrgAddMemberAuditEntryPermission represents the permissions available to members on an Organization. +type OrgAddMemberAuditEntryPermission string + +// The permissions available to members on an Organization. +const ( + OrgAddMemberAuditEntryPermissionRead OrgAddMemberAuditEntryPermission = "READ" // Can read and clone repositories. + OrgAddMemberAuditEntryPermissionAdmin OrgAddMemberAuditEntryPermission = "ADMIN" // Can read, clone, push, and add collaborators to repositories. +) + +// OrgRemoveBillingManagerAuditEntryReason represents the reason a billing manager was removed from an Organization. +type OrgRemoveBillingManagerAuditEntryReason string + +// The reason a billing manager was removed from an Organization. +const ( + OrgRemoveBillingManagerAuditEntryReasonTwoFactorRequirementNonCompliance OrgRemoveBillingManagerAuditEntryReason = "TWO_FACTOR_REQUIREMENT_NON_COMPLIANCE" // The organization required 2FA of its billing managers and this user did not have 2FA enabled. + OrgRemoveBillingManagerAuditEntryReasonSamlExternalIdentityMissing OrgRemoveBillingManagerAuditEntryReason = "SAML_EXTERNAL_IDENTITY_MISSING" // SAML external identity missing. + OrgRemoveBillingManagerAuditEntryReasonSamlSsoEnforcementRequiresExternalIdentity OrgRemoveBillingManagerAuditEntryReason = "SAML_SSO_ENFORCEMENT_REQUIRES_EXTERNAL_IDENTITY" // SAML SSO enforcement requires an external identity. +) + +// OrgRemoveMemberAuditEntryMembershipType represents the type of membership a user has with an Organization. +type OrgRemoveMemberAuditEntryMembershipType string + +// The type of membership a user has with an Organization. +const ( + OrgRemoveMemberAuditEntryMembershipTypeDirectMember OrgRemoveMemberAuditEntryMembershipType = "DIRECT_MEMBER" // A direct member is a user that is a member of the Organization. + OrgRemoveMemberAuditEntryMembershipTypeAdmin OrgRemoveMemberAuditEntryMembershipType = "ADMIN" // Organization administrators have full access and can change several settings, including the names of repositories that belong to the Organization and Owners team membership. In addition, organization admins can delete the organization and all of its repositories. + OrgRemoveMemberAuditEntryMembershipTypeBillingManager OrgRemoveMemberAuditEntryMembershipType = "BILLING_MANAGER" // A billing manager is a user who manages the billing settings for the Organization, such as updating payment information. + OrgRemoveMemberAuditEntryMembershipTypeUnaffiliated OrgRemoveMemberAuditEntryMembershipType = "UNAFFILIATED" // An unaffiliated collaborator is a person who is not a member of the Organization and does not have access to any repositories in the Organization. + OrgRemoveMemberAuditEntryMembershipTypeOutsideCollaborator OrgRemoveMemberAuditEntryMembershipType = "OUTSIDE_COLLABORATOR" // An outside collaborator is a person who isn't explicitly a member of the Organization, but who has Read, Write, or Admin permissions to one or more repositories in the organization. +) + +// OrgRemoveMemberAuditEntryReason represents the reason a member was removed from an Organization. +type OrgRemoveMemberAuditEntryReason string + +// The reason a member was removed from an Organization. +const ( + OrgRemoveMemberAuditEntryReasonTwoFactorRequirementNonCompliance OrgRemoveMemberAuditEntryReason = "TWO_FACTOR_REQUIREMENT_NON_COMPLIANCE" // The organization required 2FA of its billing managers and this user did not have 2FA enabled. + OrgRemoveMemberAuditEntryReasonSamlExternalIdentityMissing OrgRemoveMemberAuditEntryReason = "SAML_EXTERNAL_IDENTITY_MISSING" // SAML external identity missing. + OrgRemoveMemberAuditEntryReasonSamlSsoEnforcementRequiresExternalIdentity OrgRemoveMemberAuditEntryReason = "SAML_SSO_ENFORCEMENT_REQUIRES_EXTERNAL_IDENTITY" // SAML SSO enforcement requires an external identity. +) + +// OrgRemoveOutsideCollaboratorAuditEntryMembershipType represents the type of membership a user has with an Organization. +type OrgRemoveOutsideCollaboratorAuditEntryMembershipType string + +// The type of membership a user has with an Organization. +const ( + OrgRemoveOutsideCollaboratorAuditEntryMembershipTypeOutsideCollaborator OrgRemoveOutsideCollaboratorAuditEntryMembershipType = "OUTSIDE_COLLABORATOR" // An outside collaborator is a person who isn't explicitly a member of the Organization, but who has Read, Write, or Admin permissions to one or more repositories in the organization. + OrgRemoveOutsideCollaboratorAuditEntryMembershipTypeUnaffiliated OrgRemoveOutsideCollaboratorAuditEntryMembershipType = "UNAFFILIATED" // An unaffiliated collaborator is a person who is not a member of the Organization and does not have access to any repositories in the organization. + OrgRemoveOutsideCollaboratorAuditEntryMembershipTypeBillingManager OrgRemoveOutsideCollaboratorAuditEntryMembershipType = "BILLING_MANAGER" // A billing manager is a user who manages the billing settings for the Organization, such as updating payment information. +) + +// OrgRemoveOutsideCollaboratorAuditEntryReason represents the reason an outside collaborator was removed from an Organization. +type OrgRemoveOutsideCollaboratorAuditEntryReason string + +// The reason an outside collaborator was removed from an Organization. +const ( + OrgRemoveOutsideCollaboratorAuditEntryReasonTwoFactorRequirementNonCompliance OrgRemoveOutsideCollaboratorAuditEntryReason = "TWO_FACTOR_REQUIREMENT_NON_COMPLIANCE" // The organization required 2FA of its billing managers and this user did not have 2FA enabled. + OrgRemoveOutsideCollaboratorAuditEntryReasonSamlExternalIdentityMissing OrgRemoveOutsideCollaboratorAuditEntryReason = "SAML_EXTERNAL_IDENTITY_MISSING" // SAML external identity missing. +) + +// OrgUpdateDefaultRepositoryPermissionAuditEntryPermission represents the default permission a repository can have in an Organization. +type OrgUpdateDefaultRepositoryPermissionAuditEntryPermission string + +// The default permission a repository can have in an Organization. +const ( + OrgUpdateDefaultRepositoryPermissionAuditEntryPermissionRead OrgUpdateDefaultRepositoryPermissionAuditEntryPermission = "READ" // Can read and clone repositories. + OrgUpdateDefaultRepositoryPermissionAuditEntryPermissionWrite OrgUpdateDefaultRepositoryPermissionAuditEntryPermission = "WRITE" // Can read, clone and push to repositories. + OrgUpdateDefaultRepositoryPermissionAuditEntryPermissionAdmin OrgUpdateDefaultRepositoryPermissionAuditEntryPermission = "ADMIN" // Can read, clone, push, and add collaborators to repositories. + OrgUpdateDefaultRepositoryPermissionAuditEntryPermissionNone OrgUpdateDefaultRepositoryPermissionAuditEntryPermission = "NONE" // No default permission value. +) + +// OrgUpdateMemberAuditEntryPermission represents the permissions available to members on an Organization. +type OrgUpdateMemberAuditEntryPermission string + +// The permissions available to members on an Organization. +const ( + OrgUpdateMemberAuditEntryPermissionRead OrgUpdateMemberAuditEntryPermission = "READ" // Can read and clone repositories. + OrgUpdateMemberAuditEntryPermissionAdmin OrgUpdateMemberAuditEntryPermission = "ADMIN" // Can read, clone, push, and add collaborators to repositories. +) + +// OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility represents the permissions available for repository creation on an Organization. +type OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility string + +// The permissions available for repository creation on an Organization. +const ( + OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibilityAll OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility = "ALL" // All organization members are restricted from creating any repositories. + OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibilityPublic OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility = "PUBLIC" // All organization members are restricted from creating public repositories. +) + // OrganizationInvitationRole represents the possible organization invitation roles. type OrganizationInvitationRole string @@ -456,6 +631,7 @@ const ( 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. + PullRequestTimelineItemsItemTypeReadyForReviewEvent PullRequestTimelineItemsItemType = "READY_FOR_REVIEW_EVENT" // Represents a 'ready_for_review' 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. @@ -525,6 +701,36 @@ const ( ReleaseOrderFieldName ReleaseOrderField = "NAME" // Order releases alphabetically by name. ) +// RepoAccessAuditEntryVisibility represents the privacy of a repository. +type RepoAccessAuditEntryVisibility string + +// The privacy of a repository. +const ( + RepoAccessAuditEntryVisibilityInternal RepoAccessAuditEntryVisibility = "INTERNAL" // The repository is visible only to users in the same business. + RepoAccessAuditEntryVisibilityPrivate RepoAccessAuditEntryVisibility = "PRIVATE" // The repository is visible only to those with explicit access. + RepoAccessAuditEntryVisibilityPublic RepoAccessAuditEntryVisibility = "PUBLIC" // The repository is visible to everyone. +) + +// RepoAddMemberAuditEntryVisibility represents the privacy of a repository. +type RepoAddMemberAuditEntryVisibility string + +// The privacy of a repository. +const ( + RepoAddMemberAuditEntryVisibilityInternal RepoAddMemberAuditEntryVisibility = "INTERNAL" // The repository is visible only to users in the same business. + RepoAddMemberAuditEntryVisibilityPrivate RepoAddMemberAuditEntryVisibility = "PRIVATE" // The repository is visible only to those with explicit access. + RepoAddMemberAuditEntryVisibilityPublic RepoAddMemberAuditEntryVisibility = "PUBLIC" // The repository is visible to everyone. +) + +// RepoRemoveMemberAuditEntryVisibility represents the privacy of a repository. +type RepoRemoveMemberAuditEntryVisibility string + +// The privacy of a repository. +const ( + RepoRemoveMemberAuditEntryVisibilityInternal RepoRemoveMemberAuditEntryVisibility = "INTERNAL" // The repository is visible only to users in the same business. + RepoRemoveMemberAuditEntryVisibilityPrivate RepoRemoveMemberAuditEntryVisibility = "PRIVATE" // The repository is visible only to those with explicit access. + RepoRemoveMemberAuditEntryVisibilityPublic RepoRemoveMemberAuditEntryVisibility = "PUBLIC" // The repository is visible to everyone. +) + // ReportedContentClassifiers represents the reasons a piece of content can be reported or minimized. type ReportedContentClassifiers string @@ -622,6 +828,16 @@ const ( RepositoryVisibilityInternal RepositoryVisibility = "INTERNAL" // The repository is visible only to users in the same business. ) +// RequestableCheckStatusState represents the possible states that can be requested when creating a check run. +type RequestableCheckStatusState string + +// The possible states that can be requested when creating a check run. +const ( + RequestableCheckStatusStateQueued RequestableCheckStatusState = "QUEUED" // The check suite or run has been queued. + RequestableCheckStatusStateInProgress RequestableCheckStatusState = "IN_PROGRESS" // The check suite or run is in progress. + RequestableCheckStatusStateCompleted RequestableCheckStatusState = "COMPLETED" // The check suite or run has been completed. +) + // SearchType represents represents the individual results of a search. type SearchType string @@ -711,6 +927,22 @@ const ( SubscriptionStateIgnored SubscriptionState = "IGNORED" // The User is never notified. ) +// TeamDiscussionCommentOrderField represents properties by which team discussion comment connections can be ordered. +type TeamDiscussionCommentOrderField string + +// Properties by which team discussion comment connections can be ordered. +const ( + TeamDiscussionCommentOrderFieldNumber TeamDiscussionCommentOrderField = "NUMBER" // Allows sequential ordering of team discussion comments (which is equivalent to chronological ordering). +) + +// TeamDiscussionOrderField represents properties by which team discussion connections can be ordered. +type TeamDiscussionOrderField string + +// Properties by which team discussion connections can be ordered. +const ( + TeamDiscussionOrderFieldCreatedAt TeamDiscussionOrderField = "CREATED_AT" // Allows chronological ordering of team discussions. +) + // TeamMemberOrderField represents properties by which team member connections can be ordered. type TeamMemberOrderField string diff --git a/gen.go b/gen.go index 628ce57..5aadd15 100644 --- a/gen.go +++ b/gen.go @@ -20,21 +20,53 @@ import ( "github.com/shurcooL/graphql/ident" ) -func main() { +// schemaPreviews is a list of features that are available during the GitHub API Preview Period +// Check https://developer.github.com/changes/ for updates +var schemaPreviews = []string{ + "audit-log", + "flash", + "shadow-cat", + "antiope", + "echo", + "hagar", + "merge-info", + "hawkgirl", + "vixen", + "daredevil", + "starfox", + "queen-beryl", + "corsair", + "elektra", + "bane", + "slothette", +} + +func parseArgs(previewMode *bool) { + flag.BoolVar(previewMode, "p", false, "Allows generation of schema previews https://developer.github.com/v4/previews") + flag.Usage = func() { + fmt.Println("Usage: gen [options...]") + fmt.Println("Options:") + flag.PrintDefaults() + } flag.Parse() +} - err := run() +func main() { + previewMode := false + parseArgs(&previewMode) + + err := run(previewMode) if err != nil { log.Fatalln(err) } } -func run() error { +func run(previewMode bool) error { githubToken, ok := os.LookupEnv("GITHUB_TOKEN") if !ok { return fmt.Errorf("GITHUB_TOKEN environment variable not set") } - schema, err := loadSchema(githubToken) + schema, err := loadSchema(githubToken, previewMode) if err != nil { return err } @@ -60,12 +92,17 @@ func run() error { return nil } -func loadSchema(githubToken string) (schema interface{}, err error) { +func loadSchema(githubToken string, previewMode bool) (schema interface{}, err error) { req, err := http.NewRequest("GET", "https://api.github.com/graphql", nil) if err != nil { return nil, err } req.Header.Set("Authorization", "bearer "+githubToken) + if previewMode { + for _, sp := range schemaPreviews { + req.Header.Add("Accept", fmt.Sprintf("application/vnd.github.%s-preview+json", sp)) + } + } resp, err := http.DefaultClient.Do(req) if err != nil { return nil, err diff --git a/input.go b/input.go index e893559..8a2dc55 100644 --- a/input.go +++ b/input.go @@ -4,7 +4,7 @@ package githubv4 // Input represents one of the Input structs: // -// AcceptTopicSuggestionInput, AddAssigneesToAssignableInput, AddCommentInput, AddLabelsToLabelableInput, AddProjectCardInput, AddProjectColumnInput, AddPullRequestReviewCommentInput, AddPullRequestReviewInput, AddReactionInput, AddStarInput, ChangeUserStatusInput, ClearLabelsFromLabelableInput, CloneProjectInput, CloneTemplateRepositoryInput, 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. +// AcceptTopicSuggestionInput, AddAssigneesToAssignableInput, AddCommentInput, AddLabelsToLabelableInput, AddProjectCardInput, AddProjectColumnInput, AddPullRequestReviewCommentInput, AddPullRequestReviewInput, AddReactionInput, AddStarInput, AuditLogOrder, ChangeUserStatusInput, CheckAnnotationData, CheckAnnotationRange, CheckRunAction, CheckRunFilter, CheckRunOutput, CheckRunOutputImage, CheckSuiteAutoTriggerPreference, CheckSuiteFilter, ClearLabelsFromLabelableInput, CloneProjectInput, CloneTemplateRepositoryInput, CloseIssueInput, ClosePullRequestInput, CommitAuthor, CommitContributionOrder, ContributionOrder, ConvertProjectCardNoteToIssueInput, CreateBranchProtectionRuleInput, CreateCheckRunInput, CreateCheckSuiteInput, CreateContentAttachmentInput, CreateDeploymentInput, CreateDeploymentStatusInput, CreateIssueInput, CreateLabelInput, CreateProjectInput, CreatePullRequestInput, CreateRefInput, CreateRepositoryInput, CreateTeamDiscussionCommentInput, CreateTeamDiscussionInput, DeclineTopicSuggestionInput, DeleteBranchProtectionRuleInput, DeleteIssueCommentInput, DeleteIssueInput, DeleteLabelInput, DeleteProjectCardInput, DeleteProjectColumnInput, DeleteProjectInput, DeletePullRequestReviewCommentInput, DeletePullRequestReviewInput, DeleteRefInput, DeleteTeamDiscussionCommentInput, DeleteTeamDiscussionInput, DeploymentOrder, DismissPullRequestReviewInput, DraftPullRequestReviewComment, GistOrder, ImportProjectInput, IssueFilters, IssueOrder, LanguageOrder, LockLockableInput, MarkPullRequestReadyForReviewInput, MergePullRequestInput, MilestoneOrder, MinimizeCommentInput, MoveProjectCardInput, MoveProjectColumnInput, PinIssueInput, ProjectCardImport, ProjectColumnImport, ProjectOrder, PullRequestOrder, ReactionOrder, RefOrder, ReleaseOrder, RemoveAssigneesFromAssignableInput, RemoveLabelsFromLabelableInput, RemoveOutsideCollaboratorInput, RemoveReactionInput, RemoveStarInput, ReopenIssueInput, ReopenPullRequestInput, RepositoryOrder, RequestReviewsInput, RerequestCheckSuiteInput, ResolveReviewThreadInput, SecurityAdvisoryIdentifierFilter, SecurityAdvisoryOrder, SecurityVulnerabilityOrder, StarOrder, SubmitPullRequestReviewInput, TeamDiscussionCommentOrder, TeamDiscussionOrder, TeamMemberOrder, TeamOrder, TeamRepositoryOrder, UnlockLockableInput, UnmarkIssueAsDuplicateInput, UnminimizeCommentInput, UnpinIssueInput, UnresolveReviewThreadInput, UpdateBranchProtectionRuleInput, UpdateCheckRunInput, UpdateCheckSuitePreferencesInput, UpdateIssueCommentInput, UpdateIssueInput, UpdateLabelInput, UpdateProjectCardInput, UpdateProjectColumnInput, UpdateProjectInput, UpdatePullRequestInput, UpdatePullRequestReviewCommentInput, UpdatePullRequestReviewInput, UpdateRefInput, UpdateSubscriptionInput, UpdateTeamDiscussionCommentInput, UpdateTeamDiscussionInput, UpdateTopicsInput, UserStatusOrder. type Input interface{} // AcceptTopicSuggestionInput is an autogenerated input type of AcceptTopicSuggestion. @@ -131,6 +131,15 @@ type AddStarInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// AuditLogOrder represents ordering options for Audit Log connections. +type AuditLogOrder struct { + + // The field to order Audit Logs by. (Optional.) + Field *AuditLogOrderField `json:"field,omitempty"` + // The ordering direction. (Optional.) + Direction *OrderDirection `json:"direction,omitempty"` +} + // ChangeUserStatusInput is an autogenerated input type of ChangeUserStatus. type ChangeUserStatusInput struct { @@ -148,6 +157,102 @@ type ChangeUserStatusInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// CheckAnnotationData represents information from a check run analysis to specific lines of code. +type CheckAnnotationData struct { + // The path of the file to add an annotation to. (Required.) + Path String `json:"path"` + // The location of the annotation. (Required.) + Location CheckAnnotationRange `json:"location"` + // Represents an annotation's information level. (Required.) + AnnotationLevel CheckAnnotationLevel `json:"annotationLevel"` + // A short description of the feedback for these lines of code. (Required.) + Message String `json:"message"` + + // The title that represents the annotation. (Optional.) + Title *String `json:"title,omitempty"` + // Details about this annotation. (Optional.) + RawDetails *String `json:"rawDetails,omitempty"` +} + +// CheckAnnotationRange represents information from a check run analysis to specific lines of code. +type CheckAnnotationRange struct { + // The starting line of the range. (Required.) + StartLine Int `json:"startLine"` + // The ending line of the range. (Required.) + EndLine Int `json:"endLine"` + + // The starting column of the range. (Optional.) + StartColumn *Int `json:"startColumn,omitempty"` + // The ending column of the range. (Optional.) + EndColumn *Int `json:"endColumn,omitempty"` +} + +// CheckRunAction represents possible further actions the integrator can perform. +type CheckRunAction struct { + // The text to be displayed on a button in the web UI. (Required.) + Label String `json:"label"` + // A short explanation of what this action would do. (Required.) + Description String `json:"description"` + // A reference for the action on the integrator's system. (Required.) + Identifier String `json:"identifier"` +} + +// CheckRunFilter represents the filters that are available when fetching check runs. +type CheckRunFilter struct { + + // Filters the check runs by this type. (Optional.) + CheckType *CheckRunType `json:"checkType,omitempty"` + // Filters the check runs created by this application ID. (Optional.) + AppID *Int `json:"appId,omitempty"` + // Filters the check runs by this name. (Optional.) + CheckName *String `json:"checkName,omitempty"` + // Filters the check runs by this status. (Optional.) + Status *CheckStatusState `json:"status,omitempty"` +} + +// CheckRunOutput represents descriptive details about the check run. +type CheckRunOutput struct { + // A title to provide for this check run. (Required.) + Title String `json:"title"` + // The summary of the check run (supports Commonmark). (Required.) + Summary String `json:"summary"` + + // The details of the check run (supports Commonmark). (Optional.) + Text *String `json:"text,omitempty"` + // The annotations that are made as part of the check run. (Optional.) + Annotations *[]CheckAnnotationData `json:"annotations,omitempty"` + // Images attached to the check run output displayed in the GitHub pull request UI. (Optional.) + Images *[]CheckRunOutputImage `json:"images,omitempty"` +} + +// CheckRunOutputImage represents images attached to the check run output displayed in the GitHub pull request UI. +type CheckRunOutputImage struct { + // The alternative text for the image. (Required.) + Alt String `json:"alt"` + // The full URL of the image. (Required.) + ImageURL URI `json:"imageUrl"` + + // A short image description. (Optional.) + Caption *String `json:"caption,omitempty"` +} + +// CheckSuiteAutoTriggerPreference represents the auto-trigger preferences that are available for check suites. +type CheckSuiteAutoTriggerPreference struct { + // The node ID of the application that owns the check suite. (Required.) + AppID ID `json:"appId"` + // Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository. (Required.) + Setting Boolean `json:"setting"` +} + +// CheckSuiteFilter represents the filters that are available when fetching check suites. +type CheckSuiteFilter struct { + + // Filters the check suites created by this application ID. (Optional.) + AppID *Int `json:"appId,omitempty"` + // Filters the check suites by this name. (Optional.) + CheckName *String `json:"checkName,omitempty"` +} + // ClearLabelsFromLabelableInput is an autogenerated input type of ClearLabelsFromLabelable. type ClearLabelsFromLabelableInput struct { // The id of the labelable object to clear the labels from. (Required.) @@ -289,6 +394,46 @@ type CreateBranchProtectionRuleInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// CreateCheckRunInput is an autogenerated input type of CreateCheckRun. +type CreateCheckRunInput struct { + // The node ID of the repository. (Required.) + RepositoryID ID `json:"repositoryId"` + // The name of the check. (Required.) + Name String `json:"name"` + // The SHA of the head commit. (Required.) + HeadSha GitObjectID `json:"headSha"` + + // The URL of the integrator's site that has the full details of the check. (Optional.) + DetailsURL *URI `json:"detailsUrl,omitempty"` + // A reference for the run on the integrator's system. (Optional.) + ExternalID *String `json:"externalId,omitempty"` + // The current status. (Optional.) + Status *RequestableCheckStatusState `json:"status,omitempty"` + // The time that the check run began. (Optional.) + StartedAt *DateTime `json:"startedAt,omitempty"` + // The final conclusion of the check. (Optional.) + Conclusion *CheckConclusionState `json:"conclusion,omitempty"` + // The time that the check run finished. (Optional.) + CompletedAt *DateTime `json:"completedAt,omitempty"` + // Descriptive details about the run. (Optional.) + Output *CheckRunOutput `json:"output,omitempty"` + // Possible further actions the integrator can perform, which a user may trigger. (Optional.) + Actions *[]CheckRunAction `json:"actions,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// CreateCheckSuiteInput is an autogenerated input type of CreateCheckSuite. +type CreateCheckSuiteInput struct { + // The Node ID of the repository. (Required.) + RepositoryID ID `json:"repositoryId"` + // The SHA of the head commit. (Required.) + HeadSha GitObjectID `json:"headSha"` + + // 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.) @@ -302,6 +447,50 @@ type CreateContentAttachmentInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// CreateDeploymentInput is an autogenerated input type of CreateDeployment. +type CreateDeploymentInput struct { + // The node ID of the repository. (Required.) + RepositoryID ID `json:"repositoryId"` + // The node ID of the ref to be deployed. (Required.) + RefID ID `json:"refId"` + + // Attempt to automatically merge the default branch into the requested ref, defaults to true. (Optional.) + AutoMerge *Boolean `json:"autoMerge,omitempty"` + // The status contexts to verify against commit status checks. To bypass required contexts, pass an empty array. Defaults to all unique contexts. (Optional.) + RequiredContexts *[]String `json:"requiredContexts,omitempty"` + // Short description of the deployment. (Optional.) + Description *String `json:"description,omitempty"` + // Name for the target deployment environment. (Optional.) + Environment *String `json:"environment,omitempty"` + // Specifies a task to execute. (Optional.) + Task *String `json:"task,omitempty"` + // JSON payload with extra information about the deployment. (Optional.) + Payload *String `json:"payload,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// CreateDeploymentStatusInput is an autogenerated input type of CreateDeploymentStatus. +type CreateDeploymentStatusInput struct { + // The node ID of the deployment. (Required.) + DeploymentID ID `json:"deploymentId"` + // The state of the deployment. (Required.) + State DeploymentStatusState `json:"state"` + + // A short description of the status. Maximum length of 140 characters. (Optional.) + Description *String `json:"description,omitempty"` + // If provided, updates the environment of the deploy. Otherwise, does not modify the environment. (Optional.) + Environment *String `json:"environment,omitempty"` + // Sets the URL for accessing your environment. (Optional.) + EnvironmentURL *String `json:"environmentUrl,omitempty"` + // Adds a new inactive status to all non-transient, non-production environment deployments with the same repository and environment name as the created status's deployment. (Optional.) + AutoInactive *Boolean `json:"autoInactive,omitempty"` + // The log URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. (Optional.) + LogURL *String `json:"logUrl,omitempty"` + // 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.) @@ -323,6 +512,21 @@ type CreateIssueInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// CreateLabelInput is an autogenerated input type of CreateLabel. +type CreateLabelInput struct { + // The Node ID of the repository. (Required.) + RepositoryID ID `json:"repositoryId"` + // A 6 character hex code, without the leading #, identifying the color of the label. (Required.) + Color String `json:"color"` + // The name of the label. (Required.) + Name String `json:"name"` + + // A brief description of the label, such as its purpose. (Optional.) + Description *String `json:"description,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.) @@ -351,6 +555,72 @@ type CreatePullRequestInput struct { Body *String `json:"body,omitempty"` // Indicates whether maintainers can modify the pull request. (Optional.) MaintainerCanModify *Boolean `json:"maintainerCanModify,omitempty"` + // Indicates whether this pull request should be a draft. (Optional.) + Draft *Boolean `json:"draft,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// CreateRefInput is an autogenerated input type of CreateRef. +type CreateRefInput struct { + // The Node ID of the Repository to create the Ref in. (Required.) + RepositoryID ID `json:"repositoryId"` + // The fully qualified name of the new Ref (ie: `refs/heads/my_new_branch`). (Required.) + Name String `json:"name"` + // The GitObjectID that the new Ref shall target. Must point to a commit. (Required.) + Oid GitObjectID `json:"oid"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// CreateRepositoryInput is an autogenerated input type of CreateRepository. +type CreateRepositoryInput struct { + // The name of the new repository. (Required.) + Name String `json:"name"` + // Indicates the repository's visibility level. (Required.) + Visibility RepositoryVisibility `json:"visibility"` + + // The ID of the owner for the new repository. (Optional.) + OwnerID *ID `json:"ownerId,omitempty"` + // A short description of the new repository. (Optional.) + Description *String `json:"description,omitempty"` + // 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. (Optional.) + Template *Boolean `json:"template,omitempty"` + // The URL for a web page about this repository. (Optional.) + HomepageURL *URI `json:"homepageUrl,omitempty"` + // Indicates if the repository should have the wiki feature enabled. (Optional.) + HasWikiEnabled *Boolean `json:"hasWikiEnabled,omitempty"` + // Indicates if the repository should have the issues feature enabled. (Optional.) + HasIssuesEnabled *Boolean `json:"hasIssuesEnabled,omitempty"` + // When an organization is specified as the owner, this ID identifies the team that should be granted access to the new repository. (Optional.) + TeamID *ID `json:"teamId,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// CreateTeamDiscussionCommentInput is an autogenerated input type of CreateTeamDiscussionComment. +type CreateTeamDiscussionCommentInput struct { + // The ID of the discussion to which the comment belongs. (Required.) + DiscussionID ID `json:"discussionId"` + // The content of the comment. (Required.) + Body String `json:"body"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// CreateTeamDiscussionInput is an autogenerated input type of CreateTeamDiscussion. +type CreateTeamDiscussionInput struct { + // The ID of the team to which the discussion belongs. (Required.) + TeamID ID `json:"teamId"` + // The title of the discussion. (Required.) + Title String `json:"title"` + // The content of the discussion. (Required.) + Body String `json:"body"` + + // If true, restricts the visiblity of this discussion to team members and organization admins. If false or not specified, allows any organization member to view this discussion. (Optional.) + Private *Boolean `json:"private,omitempty"` // A unique identifier for the client performing the mutation. (Optional.) ClientMutationID *String `json:"clientMutationId,omitempty"` } @@ -395,6 +665,15 @@ type DeleteIssueInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// DeleteLabelInput is an autogenerated input type of DeleteLabel. +type DeleteLabelInput struct { + // The Node ID of the label to be deleted. (Required.) + ID ID `json:"id"` + + // 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.) @@ -440,6 +719,33 @@ type DeletePullRequestReviewInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// DeleteRefInput is an autogenerated input type of DeleteRef. +type DeleteRefInput struct { + // The Node ID of the Ref to be deleted. (Required.) + RefID ID `json:"refId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// DeleteTeamDiscussionCommentInput is an autogenerated input type of DeleteTeamDiscussionComment. +type DeleteTeamDiscussionCommentInput 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"` +} + +// DeleteTeamDiscussionInput is an autogenerated input type of DeleteTeamDiscussion. +type DeleteTeamDiscussionInput struct { + // The discussion ID to delete. (Required.) + ID ID `json:"id"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // DeploymentOrder represents ordering options for deployment connections. type DeploymentOrder struct { // The field to order deployments by. (Required.) @@ -542,6 +848,15 @@ type LockLockableInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// MarkPullRequestReadyForReviewInput is an autogenerated input type of MarkPullRequestReadyForReview. +type MarkPullRequestReadyForReviewInput struct { + // ID of the pull request to be marked as ready for review. (Required.) + PullRequestID ID `json:"pullRequestId"` + + // A unique identifier for the client performing the mutation. (Optional.) + 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.) @@ -762,6 +1077,17 @@ type RequestReviewsInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// RerequestCheckSuiteInput is an autogenerated input type of RerequestCheckSuite. +type RerequestCheckSuiteInput struct { + // The Node ID of the repository. (Required.) + RepositoryID ID `json:"repositoryId"` + // The Node ID of the check suite. (Required.) + CheckSuiteID ID `json:"checkSuiteId"` + + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // ResolveReviewThreadInput is an autogenerated input type of ResolveReviewThread. type ResolveReviewThreadInput struct { // The ID of the thread to resolve. (Required.) @@ -816,6 +1142,22 @@ type SubmitPullRequestReviewInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// TeamDiscussionCommentOrder represents ways in which team discussion comment connections can be ordered. +type TeamDiscussionCommentOrder struct { + // The field by which to order nodes. (Required.) + Field TeamDiscussionCommentOrderField `json:"field"` + // The direction in which to order nodes. (Required.) + Direction OrderDirection `json:"direction"` +} + +// TeamDiscussionOrder represents ways in which team discussion connections can be ordered. +type TeamDiscussionOrder struct { + // The field by which to order nodes. (Required.) + Field TeamDiscussionOrderField `json:"field"` + // The direction in which to order nodes. (Required.) + Direction OrderDirection `json:"direction"` +} + // TeamMemberOrder represents ordering options for team member connections. type TeamMemberOrder struct { // The field to order team members by. (Required.) @@ -924,6 +1266,46 @@ type UpdateBranchProtectionRuleInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// UpdateCheckRunInput is an autogenerated input type of UpdateCheckRun. +type UpdateCheckRunInput struct { + // The node ID of the repository. (Required.) + RepositoryID ID `json:"repositoryId"` + // The node of the check. (Required.) + CheckRunID ID `json:"checkRunId"` + + // The name of the check. (Optional.) + Name *String `json:"name,omitempty"` + // The URL of the integrator's site that has the full details of the check. (Optional.) + DetailsURL *URI `json:"detailsUrl,omitempty"` + // A reference for the run on the integrator's system. (Optional.) + ExternalID *String `json:"externalId,omitempty"` + // The current status. (Optional.) + Status *RequestableCheckStatusState `json:"status,omitempty"` + // The time that the check run began. (Optional.) + StartedAt *DateTime `json:"startedAt,omitempty"` + // The final conclusion of the check. (Optional.) + Conclusion *CheckConclusionState `json:"conclusion,omitempty"` + // The time that the check run finished. (Optional.) + CompletedAt *DateTime `json:"completedAt,omitempty"` + // Descriptive details about the run. (Optional.) + Output *CheckRunOutput `json:"output,omitempty"` + // Possible further actions the integrator can perform, which a user may trigger. (Optional.) + Actions *[]CheckRunAction `json:"actions,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// UpdateCheckSuitePreferencesInput is an autogenerated input type of UpdateCheckSuitePreferences. +type UpdateCheckSuitePreferencesInput struct { + // The Node ID of the repository. (Required.) + RepositoryID ID `json:"repositoryId"` + // The check suite preferences to modify. (Required.) + AutoTriggerPreferences []CheckSuiteAutoTriggerPreference `json:"autoTriggerPreferences"` + + // 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.) @@ -958,6 +1340,21 @@ type UpdateIssueInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// UpdateLabelInput is an autogenerated input type of UpdateLabel. +type UpdateLabelInput struct { + // The Node ID of the label to be updated. (Required.) + ID ID `json:"id"` + + // A 6 character hex code, without the leading #, identifying the updated color of the label. (Optional.) + Color *String `json:"color,omitempty"` + // A brief description of the label, such as its purpose. (Optional.) + Description *String `json:"description,omitempty"` + // The updated name of the label. (Optional.) + Name *String `json:"name,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.) @@ -1038,6 +1435,19 @@ type UpdatePullRequestReviewInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// UpdateRefInput is an autogenerated input type of UpdateRef. +type UpdateRefInput struct { + // The Node ID of the Ref to be updated. (Required.) + RefID ID `json:"refId"` + // The GitObjectID that the Ref shall be updated to target. (Required.) + Oid GitObjectID `json:"oid"` + + // Permit updates of branch Refs that are not fast-forwards?. (Optional.) + Force *Boolean `json:"force,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // UpdateSubscriptionInput is an autogenerated input type of UpdateSubscription. type UpdateSubscriptionInput struct { // The Node ID of the subscribable object to modify. (Required.) @@ -1049,6 +1459,36 @@ type UpdateSubscriptionInput struct { ClientMutationID *String `json:"clientMutationId,omitempty"` } +// UpdateTeamDiscussionCommentInput is an autogenerated input type of UpdateTeamDiscussionComment. +type UpdateTeamDiscussionCommentInput struct { + // The ID of the comment to modify. (Required.) + ID ID `json:"id"` + // The updated text of the comment. (Required.) + Body String `json:"body"` + + // The current version of the body content. (Optional.) + BodyVersion *String `json:"bodyVersion,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + +// UpdateTeamDiscussionInput is an autogenerated input type of UpdateTeamDiscussion. +type UpdateTeamDiscussionInput struct { + // The Node ID of the discussion to modify. (Required.) + ID ID `json:"id"` + + // The updated title of the discussion. (Optional.) + Title *String `json:"title,omitempty"` + // The updated text of the discussion. (Optional.) + Body *String `json:"body,omitempty"` + // The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. (Optional.) + BodyVersion *String `json:"bodyVersion,omitempty"` + // If provided, sets the pinned state of the updated discussion. (Optional.) + Pinned *Boolean `json:"pinned,omitempty"` + // A unique identifier for the client performing the mutation. (Optional.) + ClientMutationID *String `json:"clientMutationId,omitempty"` +} + // UpdateTopicsInput is an autogenerated input type of UpdateTopics. type UpdateTopicsInput struct { // The Node ID of the repository. (Required.)