diff --git a/clientgenv2/template.gotpl b/clientgenv2/template.gotpl index b43042d..b868499 100644 --- a/clientgenv2/template.gotpl +++ b/clientgenv2/template.gotpl @@ -80,3 +80,9 @@ type {{ .Query.Name | go }} {{ .Query.Type | ref }} } {{- end}} {{- end}} + +var DocumentOperationNames = map[string]string{ + {{- range $model := .Operation}} + {{ $model.Name|go }}Document: "{{ $model.Name }}", + {{- end}} +} diff --git a/example/github/gen/client.go b/example/github/gen/client.go index 77fd808..6cc45ab 100644 --- a/example/github/gen/client.go +++ b/example/github/gen/client.go @@ -55,9 +55,9 @@ type Query struct { User *User "json:\"user,omitempty\" graphql:\"user\"" Viewer User "json:\"viewer\" graphql:\"viewer\"" } - type Mutation struct { AbortQueuedMigrations *AbortQueuedMigrationsPayload "json:\"abortQueuedMigrations,omitempty\" graphql:\"abortQueuedMigrations\"" + AbortRepositoryMigration *AbortRepositoryMigrationPayload "json:\"abortRepositoryMigration,omitempty\" graphql:\"abortRepositoryMigration\"" AcceptEnterpriseAdministratorInvitation *AcceptEnterpriseAdministratorInvitationPayload "json:\"acceptEnterpriseAdministratorInvitation,omitempty\" graphql:\"acceptEnterpriseAdministratorInvitation\"" AcceptTopicSuggestion *AcceptTopicSuggestionPayload "json:\"acceptTopicSuggestion,omitempty\" graphql:\"acceptTopicSuggestion\"" AddAssigneesToAssignable *AddAssigneesToAssignablePayload "json:\"addAssigneesToAssignable,omitempty\" graphql:\"addAssigneesToAssignable\"" @@ -274,7 +274,6 @@ type Mutation struct { UpdateTopics *UpdateTopicsPayload "json:\"updateTopics,omitempty\" graphql:\"updateTopics\"" VerifyVerifiableDomain *VerifyVerifiableDomainPayload "json:\"verifyVerifiableDomain,omitempty\" graphql:\"verifyVerifiableDomain\"" } - type LanguageFragment struct { ID string "json:\"id\" graphql:\"id\"" Name string "json:\"name\" graphql:\"name\"" @@ -286,7 +285,6 @@ func (t *LanguageFragment) GetID() string { } return t.ID } - func (t *LanguageFragment) GetName() string { if t == nil { t = &LanguageFragment{} @@ -305,7 +303,6 @@ func (t *RepositoryFragment) GetID() string { } return t.ID } - func (t *RepositoryFragment) GetName() string { if t == nil { t = &RepositoryFragment{} @@ -336,14 +333,12 @@ func (t *GetUser_Viewer_Repositories_Nodes) GetID() string { } return t.ID } - func (t *GetUser_Viewer_Repositories_Nodes) GetName() string { if t == nil { t = &GetUser_Viewer_Repositories_Nodes{} } return t.Name } - func (t *GetUser_Viewer_Repositories_Nodes) GetLanguages() *GetUser_Viewer_Repositories_Nodes_Languages { if t == nil { t = &GetUser_Viewer_Repositories_Nodes{} @@ -374,14 +369,12 @@ func (t *GetUser_Viewer) GetID() string { } return t.ID } - func (t *GetUser_Viewer) GetName() *string { if t == nil { t = &GetUser_Viewer{} } return t.Name } - func (t *GetUser_Viewer) GetRepositories() *GetUser_Viewer_Repositories { if t == nil { t = &GetUser_Viewer{} @@ -411,7 +404,6 @@ func (t *GetNode_Node_Reaction) GetID() string { } return t.ID } - func (t *GetNode_Node_Reaction) GetUser() *GetNode_Node_Reaction_User { if t == nil { t = &GetNode_Node_Reaction{} @@ -431,14 +423,12 @@ func (t *GetNode_Node) GetID() string { } return t.ID } - func (t *GetNode_Node) GetRepository() *RepositoryFragment { if t == nil { t = &GetNode_Node{} } return &t.Repository } - func (t *GetNode_Node) GetReaction() *GetNode_Node_Reaction { if t == nil { t = &GetNode_Node{} @@ -457,7 +447,6 @@ func (t *AddStar_AddStar_Starrable_Repository) GetID() string { } return t.ID } - func (t *AddStar_AddStar_Starrable_Repository) GetName() string { if t == nil { t = &AddStar_AddStar_Starrable_Repository{} @@ -477,14 +466,12 @@ func (t *AddStar_AddStar_Starrable) GetID() string { } return t.ID } - func (t *AddStar_AddStar_Starrable) GetViewerHasStarred() bool { if t == nil { t = &AddStar_AddStar_Starrable{} } return t.ViewerHasStarred } - func (t *AddStar_AddStar_Starrable) GetRepository() *AddStar_AddStar_Starrable_Repository { if t == nil { t = &AddStar_AddStar_Starrable{} @@ -526,14 +513,12 @@ func (t *GetNode2_Node_Release) GetID() string { } return t.ID } - func (t *GetNode2_Node_Release) GetName() *string { if t == nil { t = &GetNode2_Node_Release{} } return t.Name } - func (t *GetNode2_Node_Release) GetReactionGroups() []*GetNode2_Node_Release_ReactionGroups { if t == nil { t = &GetNode2_Node_Release{} @@ -616,6 +601,10 @@ func (c *Client) GetUser(ctx context.Context, repositoryFirst int, languageFirst var res GetUser if err := c.Client.Post(ctx, "GetUser", GetUserDocument, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } @@ -649,6 +638,10 @@ func (c *Client) GetNode(ctx context.Context, id string, interceptors ...clientv var res GetNode if err := c.Client.Post(ctx, "GetNode", GetNodeDocument, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } @@ -676,6 +669,10 @@ func (c *Client) AddStar(ctx context.Context, input AddStarInput, interceptors . var res AddStar if err := c.Client.Post(ctx, "AddStar", AddStarDocument, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } @@ -702,8 +699,19 @@ func (c *Client) GetNode2(ctx context.Context, id string, interceptors ...client var res GetNode2 if err := c.Client.Post(ctx, "GetNode2", GetNode2Document, &res, vars, interceptors...); err != nil { + if c.Client.ParseDataWhenErrors { + return &res, err + } + return nil, err } return &res, nil } + +var DocumentOperationNames = map[string]string{ + GetUserDocument: "GetUser", + GetNodeDocument: "GetNode", + AddStarDocument: "AddStar", + GetNode2Document: "GetNode2", +} diff --git a/example/github/gen/models_gen.go b/example/github/gen/models_gen.go index 3aa4b3b..fe245b2 100644 --- a/example/github/gen/models_gen.go +++ b/example/github/gen/models_gen.go @@ -889,6 +889,22 @@ type AbortQueuedMigrationsPayload struct { Success *bool `json:"success,omitempty"` } +// Autogenerated input type of AbortRepositoryMigration +type AbortRepositoryMigrationInput struct { + // The ID of the migration to be aborted. + MigrationID string `json:"migrationId"` + // A unique identifier for the client performing the mutation. + ClientMutationID *string `json:"clientMutationId,omitempty"` +} + +// Autogenerated return type of AbortRepositoryMigration +type AbortRepositoryMigrationPayload struct { + // A unique identifier for the client performing the mutation. + ClientMutationID *string `json:"clientMutationId,omitempty"` + // Did the operation succeed? + Success *bool `json:"success,omitempty"` +} + // Autogenerated input type of AcceptEnterpriseAdministratorInvitation type AcceptEnterpriseAdministratorInvitationInput struct { // The id of the invitation being accepted @@ -4005,6 +4021,8 @@ type CreateLinkedBranchInput struct { type CreateLinkedBranchPayload struct { // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId,omitempty"` + // The issue that was linked to. + Issue *Issue `json:"issue,omitempty"` // The new branch issue reference. LinkedBranch *LinkedBranch `json:"linkedBranch,omitempty"` } @@ -5353,6 +5371,8 @@ type DeploymentOrder struct { type DeploymentProtectionRule struct { // Identifies the primary key from the database. DatabaseID *int `json:"databaseId,omitempty"` + // Whether deployments to this environment can be approved by the user who created the deployment. + PreventSelfReview *bool `json:"preventSelfReview,omitempty"` // The teams or users that can review the deployment Reviewers DeploymentReviewerConnection `json:"reviewers"` // The timeout in minutes for this protection rule. @@ -5618,6 +5638,8 @@ type Discussion struct { ID string `json:"id"` // Check if this comment was edited and includes an edit with the creation data IncludesCreatedEdit bool `json:"includesCreatedEdit"` + // Only return answered/unanswered discussions + IsAnswered *bool `json:"isAnswered,omitempty"` // A list of labels associated with the object. Labels *LabelConnection `json:"labels,omitempty"` // The moment the editor made the last edit @@ -14659,6 +14681,8 @@ type PermissionSource struct { Organization Organization `json:"organization"` // The level of access this source has granted to the user. Permission DefaultRepositoryPermissionField `json:"permission"` + // The name of the role this source has granted to the user. + RoleName *string `json:"roleName,omitempty"` // The source of this permission. Source PermissionGranter `json:"source"` } @@ -16993,8 +17017,12 @@ type PullRequestReview struct { ID string `json:"id"` // Check if this comment was edited and includes an edit with the creation data IncludesCreatedEdit bool `json:"includesCreatedEdit"` + // Returns whether or not a comment has been minimized. + IsMinimized bool `json:"isMinimized"` // The moment the editor made the last edit LastEditedAt *time.Time `json:"lastEditedAt,omitempty"` + // Returns why the comment was minimized. One of `abuse`, `off-topic`, `outdated`, `resolved`, `duplicate` and `spam`. Note that the case and formatting of these values differs from the inputs to the `MinimizeComment` mutation. + MinimizedReason *string `json:"minimizedReason,omitempty"` // A list of teams that this review was made on behalf of. OnBehalfOf TeamConnection `json:"onBehalfOf"` // Identifies when the comment was published at. @@ -17021,6 +17049,8 @@ type PullRequestReview struct { UserContentEdits *UserContentEditConnection `json:"userContentEdits,omitempty"` // Check if the current viewer can delete this object. ViewerCanDelete bool `json:"viewerCanDelete"` + // Check if the current viewer can minimize this object. + ViewerCanMinimize bool `json:"viewerCanMinimize"` // Can user react to this subject ViewerCanReact bool `json:"viewerCanReact"` // Check if the current viewer can update this object. @@ -17085,6 +17115,17 @@ func (PullRequestReview) IsDeletable() {} // Check if the current viewer can delete this object. func (this PullRequestReview) GetViewerCanDelete() bool { return this.ViewerCanDelete } +func (PullRequestReview) IsMinimizable() {} + +// Returns whether or not a comment has been minimized. +func (this PullRequestReview) GetIsMinimized() bool { return this.IsMinimized } + +// Returns why the comment was minimized. One of `abuse`, `off-topic`, `outdated`, `resolved`, `duplicate` and `spam`. Note that the case and formatting of these values differs from the inputs to the `MinimizeComment` mutation. +func (this PullRequestReview) GetMinimizedReason() *string { return this.MinimizedReason } + +// Check if the current viewer can minimize this object. +func (this PullRequestReview) GetViewerCanMinimize() bool { return this.ViewerCanMinimize } + func (PullRequestReview) IsNode() {} // ID of the object. @@ -21697,7 +21738,7 @@ type RepositoryConnection struct { PageInfo PageInfo `json:"pageInfo"` // Identifies the total count of items in the connection. TotalCount int `json:"totalCount"` - // The total size in kilobytes of all repositories in the connection. + // The total size in kilobytes of all repositories in the connection. Value will never be larger than max 32-bit signed integer. TotalDiskUsage int `json:"totalDiskUsage"` } @@ -22522,7 +22563,7 @@ type RequestedReviewerEdge struct { Node RequestedReviewer `json:"node,omitempty"` } -// Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. +// Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule. type RequiredDeploymentsParameters struct { // The environments that must be successfully deployed to before branches can be merged. RequiredDeploymentEnvironments []string `json:"requiredDeploymentEnvironments"` @@ -22530,7 +22571,7 @@ type RequiredDeploymentsParameters struct { func (RequiredDeploymentsParameters) IsRuleParameters() {} -// Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. +// Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule. type RequiredDeploymentsParametersInput struct { // The environments that must be successfully deployed to before branches can be merged. RequiredDeploymentEnvironments []string `json:"requiredDeploymentEnvironments"` @@ -22552,7 +22593,7 @@ type RequiredStatusCheckInput struct { AppID *string `json:"appId,omitempty"` } -// Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. +// Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass. type RequiredStatusChecksParameters struct { // Status checks that are required. RequiredStatusChecks []*StatusCheckConfiguration `json:"requiredStatusChecks"` @@ -22562,7 +22603,7 @@ type RequiredStatusChecksParameters struct { func (RequiredStatusChecksParameters) IsRuleParameters() {} -// Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. +// Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass. type RequiredStatusChecksParametersInput struct { // Status checks that are required. RequiredStatusChecks []*StatusCheckConfigurationInput `json:"requiredStatusChecks"` @@ -22924,6 +22965,8 @@ type RuleParametersInput struct { BranchNamePattern *BranchNamePatternParametersInput `json:"branchNamePattern,omitempty"` // Parameters used for the `tag_name_pattern` rule type TagNamePattern *TagNamePatternParametersInput `json:"tagNamePattern,omitempty"` + // Parameters used for the `workflows` rule type + Workflows *WorkflowsParametersInput `json:"workflows,omitempty"` } // A Saved Reply is text a user can use to reply quickly. @@ -26671,6 +26714,8 @@ type UpdateEnvironmentInput struct { WaitTimer *int `json:"waitTimer,omitempty"` // The ids of users or teams that can approve deployments to this environment Reviewers []string `json:"reviewers,omitempty"` + // Whether deployments to this environment can be approved by the user who created the deployment. + PreventSelfReview *bool `json:"preventSelfReview,omitempty"` // A unique identifier for the client performing the mutation. ClientMutationID *string `json:"clientMutationId,omitempty"` } @@ -28052,6 +28097,30 @@ func (this Workflow) GetResourcePath() string { return this.ResourcePath } // The URL to this resource. func (this Workflow) GetURL() string { return this.URL } +// A workflow that must run for this rule to pass +type WorkflowFileReference struct { + // The path to the workflow file + Path string `json:"path"` + // The ref (branch or tag) of the workflow file to use + Ref *string `json:"ref,omitempty"` + // The ID of the repository where the workflow is defined + RepositoryID int `json:"repositoryId"` + // The commit SHA of the workflow file to use + Sha *string `json:"sha,omitempty"` +} + +// A workflow that must run for this rule to pass +type WorkflowFileReferenceInput struct { + // The path to the workflow file + Path string `json:"path"` + // The ref (branch or tag) of the workflow file to use + Ref *string `json:"ref,omitempty"` + // The ID of the repository where the workflow is defined + RepositoryID int `json:"repositoryId"` + // The commit SHA of the workflow file to use + Sha *string `json:"sha,omitempty"` +} + // A workflow run. type WorkflowRun struct { // The check suite this workflow run belongs to. @@ -28156,6 +28225,20 @@ type WorkflowRunOrder struct { Direction OrderDirection `json:"direction"` } +// Require all changes made to a targeted branch to pass the specified workflows before they can be merged. +type WorkflowsParameters struct { + // Workflows that must pass for this rule to pass. + Workflows []*WorkflowFileReference `json:"workflows"` +} + +func (WorkflowsParameters) IsRuleParameters() {} + +// Require all changes made to a targeted branch to pass the specified workflows before they can be merged. +type WorkflowsParametersInput struct { + // Workflows that must pass for this rule to pass. + Workflows []*WorkflowFileReferenceInput `json:"workflows"` +} + // The actor's type. type ActorType string @@ -35901,6 +35984,8 @@ const ( RepositoryLockReasonMigrating RepositoryLockReason = "MIGRATING" // The repository is locked due to a trade controls related reason. RepositoryLockReasonTradeRestriction RepositoryLockReason = "TRADE_RESTRICTION" + // The repository is locked due to an ownership transfer. + RepositoryLockReasonTransferringOwnership RepositoryLockReason = "TRANSFERRING_OWNERSHIP" ) var AllRepositoryLockReason = []RepositoryLockReason{ @@ -35909,11 +35994,12 @@ var AllRepositoryLockReason = []RepositoryLockReason{ RepositoryLockReasonRename, RepositoryLockReasonMigrating, RepositoryLockReasonTradeRestriction, + RepositoryLockReasonTransferringOwnership, } func (e RepositoryLockReason) IsValid() bool { switch e { - case RepositoryLockReasonMoving, RepositoryLockReasonBilling, RepositoryLockReasonRename, RepositoryLockReasonMigrating, RepositoryLockReasonTradeRestriction: + case RepositoryLockReasonMoving, RepositoryLockReasonBilling, RepositoryLockReasonRename, RepositoryLockReasonMigrating, RepositoryLockReasonTradeRestriction, RepositoryLockReasonTransferringOwnership: return true } return false @@ -36185,18 +36271,34 @@ const ( RepositoryRuleTypeUpdate RepositoryRuleType = "UPDATE" // Only allow users with bypass permissions to delete matching refs. RepositoryRuleTypeDeletion RepositoryRuleType = "DELETION" - // Prevent merge commits from being pushed to matching branches. + // Prevent merge commits from being pushed to matching refs. RepositoryRuleTypeRequiredLinearHistory RepositoryRuleType = "REQUIRED_LINEAR_HISTORY" - // Choose which environments must be successfully deployed to before branches can be merged into a branch that matches this rule. + // Merges must be performed via a merge queue. + RepositoryRuleTypeMergeQueue RepositoryRuleType = "MERGE_QUEUE" + // When enabled, all conversations on code must be resolved before a pull request can be merged into a branch that matches this rule. + RepositoryRuleTypeRequiredReviewThreadResolution RepositoryRuleType = "REQUIRED_REVIEW_THREAD_RESOLUTION" + // Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule. RepositoryRuleTypeRequiredDeployments RepositoryRuleType = "REQUIRED_DEPLOYMENTS" - // Commits pushed to matching branches must have verified signatures. + // Commits pushed to matching refs must have verified signatures. RepositoryRuleTypeRequiredSignatures RepositoryRuleType = "REQUIRED_SIGNATURES" // Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. RepositoryRuleTypePullRequest RepositoryRuleType = "PULL_REQUEST" - // Choose which status checks must pass before branches can be merged into a branch that matches this rule. When enabled, commits must first be pushed to another branch, then merged or pushed directly to a branch that matches this rule after status checks have passed. + // Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass. RepositoryRuleTypeRequiredStatusChecks RepositoryRuleType = "REQUIRED_STATUS_CHECKS" - // Prevent users with push access from force pushing to branches. + // Require all commits be made to a non-target branch and submitted via a pull request and required workflow checks to pass before they can be merged. + RepositoryRuleTypeRequiredWorkflowStatusChecks RepositoryRuleType = "REQUIRED_WORKFLOW_STATUS_CHECKS" + // Prevent users with push access from force pushing to refs. RepositoryRuleTypeNonFastForward RepositoryRuleType = "NON_FAST_FORWARD" + // Authorization + RepositoryRuleTypeAuthorization RepositoryRuleType = "AUTHORIZATION" + // Tag + RepositoryRuleTypeTag RepositoryRuleType = "TAG" + // Merge queue locked ref + RepositoryRuleTypeMergeQueueLockedRef RepositoryRuleType = "MERGE_QUEUE_LOCKED_REF" + // Branch is read-only. Users cannot push to the branch. + RepositoryRuleTypeLockBranch RepositoryRuleType = "LOCK_BRANCH" + // Max ref updates + RepositoryRuleTypeMaxRefUpdates RepositoryRuleType = "MAX_REF_UPDATES" // Commit message pattern RepositoryRuleTypeCommitMessagePattern RepositoryRuleType = "COMMIT_MESSAGE_PATTERN" // Commit author email pattern @@ -36207,6 +36309,14 @@ const ( RepositoryRuleTypeBranchNamePattern RepositoryRuleType = "BRANCH_NAME_PATTERN" // Tag name pattern RepositoryRuleTypeTagNamePattern RepositoryRuleType = "TAG_NAME_PATTERN" + // Require all changes made to a targeted branch to pass the specified workflows before they can be merged. + RepositoryRuleTypeWorkflows RepositoryRuleType = "WORKFLOWS" + // Commits pushed to matching refs must have verified signatures. + RepositoryRuleTypeRulesetRequiredSignatures RepositoryRuleType = "RULESET_REQUIRED_SIGNATURES" + // Secret scanning + RepositoryRuleTypeSecretScanning RepositoryRuleType = "SECRET_SCANNING" + // Workflow files cannot be modified. + RepositoryRuleTypeWorkflowUpdates RepositoryRuleType = "WORKFLOW_UPDATES" ) var AllRepositoryRuleType = []RepositoryRuleType{ @@ -36214,21 +36324,33 @@ var AllRepositoryRuleType = []RepositoryRuleType{ RepositoryRuleTypeUpdate, RepositoryRuleTypeDeletion, RepositoryRuleTypeRequiredLinearHistory, + RepositoryRuleTypeMergeQueue, + RepositoryRuleTypeRequiredReviewThreadResolution, RepositoryRuleTypeRequiredDeployments, RepositoryRuleTypeRequiredSignatures, RepositoryRuleTypePullRequest, RepositoryRuleTypeRequiredStatusChecks, + RepositoryRuleTypeRequiredWorkflowStatusChecks, RepositoryRuleTypeNonFastForward, + RepositoryRuleTypeAuthorization, + RepositoryRuleTypeTag, + RepositoryRuleTypeMergeQueueLockedRef, + RepositoryRuleTypeLockBranch, + RepositoryRuleTypeMaxRefUpdates, RepositoryRuleTypeCommitMessagePattern, RepositoryRuleTypeCommitAuthorEmailPattern, RepositoryRuleTypeCommitterEmailPattern, RepositoryRuleTypeBranchNamePattern, RepositoryRuleTypeTagNamePattern, + RepositoryRuleTypeWorkflows, + RepositoryRuleTypeRulesetRequiredSignatures, + RepositoryRuleTypeSecretScanning, + RepositoryRuleTypeWorkflowUpdates, } func (e RepositoryRuleType) IsValid() bool { switch e { - case RepositoryRuleTypeCreation, RepositoryRuleTypeUpdate, RepositoryRuleTypeDeletion, RepositoryRuleTypeRequiredLinearHistory, RepositoryRuleTypeRequiredDeployments, RepositoryRuleTypeRequiredSignatures, RepositoryRuleTypePullRequest, RepositoryRuleTypeRequiredStatusChecks, RepositoryRuleTypeNonFastForward, RepositoryRuleTypeCommitMessagePattern, RepositoryRuleTypeCommitAuthorEmailPattern, RepositoryRuleTypeCommitterEmailPattern, RepositoryRuleTypeBranchNamePattern, RepositoryRuleTypeTagNamePattern: + case RepositoryRuleTypeCreation, RepositoryRuleTypeUpdate, RepositoryRuleTypeDeletion, RepositoryRuleTypeRequiredLinearHistory, RepositoryRuleTypeMergeQueue, RepositoryRuleTypeRequiredReviewThreadResolution, RepositoryRuleTypeRequiredDeployments, RepositoryRuleTypeRequiredSignatures, RepositoryRuleTypePullRequest, RepositoryRuleTypeRequiredStatusChecks, RepositoryRuleTypeRequiredWorkflowStatusChecks, RepositoryRuleTypeNonFastForward, RepositoryRuleTypeAuthorization, RepositoryRuleTypeTag, RepositoryRuleTypeMergeQueueLockedRef, RepositoryRuleTypeLockBranch, RepositoryRuleTypeMaxRefUpdates, RepositoryRuleTypeCommitMessagePattern, RepositoryRuleTypeCommitAuthorEmailPattern, RepositoryRuleTypeCommitterEmailPattern, RepositoryRuleTypeBranchNamePattern, RepositoryRuleTypeTagNamePattern, RepositoryRuleTypeWorkflows, RepositoryRuleTypeRulesetRequiredSignatures, RepositoryRuleTypeSecretScanning, RepositoryRuleTypeWorkflowUpdates: return true } return false @@ -37143,6 +37265,8 @@ const ( SocialAccountProviderTwitter SocialAccountProvider = "TWITTER" // Online video platform. SocialAccountProviderYoutube SocialAccountProvider = "YOUTUBE" + // JavaScript package registry. + SocialAccountProviderNpm SocialAccountProvider = "NPM" ) var AllSocialAccountProvider = []SocialAccountProvider{ @@ -37156,11 +37280,12 @@ var AllSocialAccountProvider = []SocialAccountProvider{ SocialAccountProviderTwitch, SocialAccountProviderTwitter, SocialAccountProviderYoutube, + SocialAccountProviderNpm, } func (e SocialAccountProvider) IsValid() bool { switch e { - case SocialAccountProviderGeneric, SocialAccountProviderFacebook, SocialAccountProviderHometown, SocialAccountProviderInstagram, SocialAccountProviderLinkedin, SocialAccountProviderMastodon, SocialAccountProviderReddit, SocialAccountProviderTwitch, SocialAccountProviderTwitter, SocialAccountProviderYoutube: + case SocialAccountProviderGeneric, SocialAccountProviderFacebook, SocialAccountProviderHometown, SocialAccountProviderInstagram, SocialAccountProviderLinkedin, SocialAccountProviderMastodon, SocialAccountProviderReddit, SocialAccountProviderTwitch, SocialAccountProviderTwitter, SocialAccountProviderYoutube, SocialAccountProviderNpm: return true } return false @@ -37869,7 +37994,7 @@ const ( SponsorsCountryOrRegionCodeTt SponsorsCountryOrRegionCode = "TT" // Tunisia SponsorsCountryOrRegionCodeTn SponsorsCountryOrRegionCode = "TN" - // Turkey + // Türkiye SponsorsCountryOrRegionCodeTr SponsorsCountryOrRegionCode = "TR" // Turkmenistan SponsorsCountryOrRegionCodeTm SponsorsCountryOrRegionCode = "TM"