diff --git a/github/event_types.go b/github/event_types.go index 018904dbba..be8008daca 100644 --- a/github/event_types.go +++ b/github/event_types.go @@ -1505,17 +1505,17 @@ type RepositoryImportEvent struct { Sender *User `json:"sender,omitempty"` } -// RepositoryRuleSetEvent event occurs when there is activity relating to repository rulesets -// +// RepositoryRulesetEvent triggers whenever there is a change to the repository's ruleset configuration. +// This can include updates to protection rules, required status checks, code owners, or other related configurations. // GitHub API docs: https://docs.github.com/en/webhooks/webhook-events-and-payloads#repository_ruleset -type RepositoryRuleSetEvent struct { +type RepositoryRulesetEvent struct { Action *string `json:"action,omitempty"` Enterprise *Enterprise `json:"enterprise,omitempty"` Installation *Installation `json:"installation,omitempty"` Organization *Organization `json:"organization,omitempty"` Repository *Repository `json:"repository,omitempty"` - RepositoryRuleSet *RepositoryRuleSet `json:"repository_ruleset"` - Changes *RepositoryRuleSetEditedChanges `json:"changes,omitempty"` + RepositoryRuleset *RepositoryRuleset `json:"repository_ruleset"` + Changes *RepositoryRulesetEditedChanges `json:"changes,omitempty"` Sender *User `json:"sender"` } diff --git a/github/event_types_test.go b/github/event_types_test.go index 107f9d8c36..7e0dd4743d 100644 --- a/github/event_types_test.go +++ b/github/event_types_test.go @@ -9448,15 +9448,15 @@ func TestReleaseEvent_Marshal(t *testing.T) { testJSONMarshal(t, u, want) } -func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { - testJSONMarshal(t, &RepositoryRuleSetEvent{}, "{}") +func TestRepositoryRulesetEvent_Marshal(t *testing.T) { + testJSONMarshal(t, &RepositoryRulesetEvent{}, "{}") l := make(map[string]interface{}) l["key"] = "value" jsonMsg, _ := json.Marshal(&l) - u := &RepositoryRuleSetEvent{ + u := &RepositoryRulesetEvent{ Action: String("a"), Enterprise: &Enterprise{ ID: Int(1), @@ -9590,7 +9590,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { URL: String("u"), Name: String("n"), }, - RepositoryRuleSet: &RepositoryRuleSet{ + RepositoryRuleset: &RepositoryRuleset{ ID: 1, Name: "n", Target: String("branch"), @@ -9606,7 +9606,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { }, CurrentUserCanBypass: String("always"), NodeID: String("n"), - Links: &RepositoryRuleSetLink{ + Links: &RepositoryRulesetLink{ Self: &RulesetLink{ HRef: String("href"), }, @@ -9615,24 +9615,24 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { }, }, Conditions: (*json.RawMessage)(&jsonMsg), - Rules: []*RepositoryRuleSetRule{ + Rules: []*RepositoryRulesetRule{ { - Creation: &RepositoryRuleSetRuleType{ + Creation: &RepositoryRulesetRuleType{ Type: "creation", }, - Update: &RepositoryRuleSetUpdateRule{ + Update: &RepositoryRulesetUpdateRule{ Type: "update", Parameters: &UpdateAllowsFetchAndMergeRuleParameters{ UpdateAllowsFetchAndMerge: true, }, }, - Deletion: &RepositoryRuleSetRuleType{ + Deletion: &RepositoryRulesetRuleType{ Type: "deletion", }, - RequireLinearHistory: &RepositoryRuleSetRuleType{ + RequireLinearHistory: &RepositoryRulesetRuleType{ Type: "require_linear_history", }, - MergeQueue: &RepositoryRuleSetMergeQueueRule{ + MergeQueue: &RepositoryRulesetMergeQueueRule{ Type: "merge_queue", Parameters: &MergeQueueRuleParameters{ CheckResponseTimeoutMinutes: 35, @@ -9644,16 +9644,16 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { MinEntriesToMergeWaitMinutes: 13, }, }, - RequireDeployments: &RepositoryRuleSetRequireDeploymentsRule{ + RequireDeployments: &RepositoryRulesetRequireDeploymentsRule{ Type: "required_deployments", Parameters: &RequiredDeploymentEnvironmentsRuleParameters{ RequiredDeploymentEnvironments: []string{"test"}, }, }, - RequiredSignatures: &RepositoryRuleSetRuleType{ + RequiredSignatures: &RepositoryRulesetRuleType{ Type: "required_signatures", }, - PullRequest: &RepositoryRuleSetPullRequestRule{ + PullRequest: &RepositoryRulesetPullRequestRule{ Type: "pull_request", Parameters: &PullRequestRuleParameters{ RequireCodeOwnerReview: true, @@ -9663,7 +9663,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { DismissStaleReviewsOnPush: true, }, }, - RequiredStatusChecks: &RepositoryRuleSetRequiredStatusChecksRule{ + RequiredStatusChecks: &RepositoryRulesetRequiredStatusChecksRule{ Type: "required_status_checks", Parameters: &RequiredStatusChecksRuleParameters{ RequiredStatusChecks: []RuleRequiredStatusChecks{ @@ -9675,10 +9675,10 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { StrictRequiredStatusChecksPolicy: true, }, }, - NonFastForward: &RepositoryRuleSetRuleType{ + NonFastForward: &RepositoryRulesetRuleType{ Type: "non_fast_forward", }, - CommitMessagePattern: &RepositoryRuleSetPatternRule{ + CommitMessagePattern: &RepositoryRulesetPatternRule{ Type: "commit_message_pattern", Parameters: &RulePatternParameters{ Name: String("avoid test commits"), @@ -9687,14 +9687,14 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "[test]", }, }, - CommitAuthorEmailPattern: &RepositoryRuleSetPatternRule{ + CommitAuthorEmailPattern: &RepositoryRulesetPatternRule{ Type: "commit_author_email_pattern", Parameters: &RulePatternParameters{ Operator: "contains", Pattern: "github", }, }, - CommitterEmailPattern: &RepositoryRuleSetPatternRule{ + CommitterEmailPattern: &RepositoryRulesetPatternRule{ Type: "committer_email_pattern", Parameters: &RulePatternParameters{ Name: String("avoid commit emails"), @@ -9703,7 +9703,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "abc", }, }, - BranchNamePattern: &RepositoryRuleSetPatternRule{ + BranchNamePattern: &RepositoryRulesetPatternRule{ Type: "branch_name_pattern", Parameters: &RulePatternParameters{ Name: String("avoid branch names"), @@ -9712,7 +9712,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "github$", }, }, - TagNamePattern: &RepositoryRuleSetPatternRule{ + TagNamePattern: &RepositoryRulesetPatternRule{ Type: "tag_name_pattern", Parameters: &RulePatternParameters{ Name: String("avoid tag names"), @@ -9721,31 +9721,31 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "github", }, }, - FilePathRestriction: &RepositoryRuleSetFilePathRestrictionRule{ + FilePathRestriction: &RepositoryRulesetFilePathRestrictionRule{ Type: "file_path_restriction", Parameters: &RuleFileParameters{ RestrictedFilePaths: &[]string{"/a/file"}, }, }, - MaxFilePathLength: &RepositoryRuleSetMaxFilePathLengthRule{ + MaxFilePathLength: &RepositoryRulesetMaxFilePathLengthRule{ Type: "max_file_path_length", Parameters: &RuleMaxFilePathLengthParameters{ MaxFilePathLength: 255, }, }, - FileExtensionRestriction: &RepositoryRuleSetFileExtensionRestrictionRule{ + FileExtensionRestriction: &RepositoryRulesetFileExtensionRestrictionRule{ Type: "file_extension_restriction", Parameters: &RuleFileExtensionRestrictionParameters{ RestrictedFileExtensions: []string{".exe"}, }, }, - MaxFileSize: &RepositoryRuleSetMaxFileSizeRule{ + MaxFileSize: &RepositoryRulesetMaxFileSizeRule{ Type: "max_file_size", Parameters: &RuleMaxFileSizeParameters{ MaxFileSize: 1024, }, }, - Workflows: &RepositoryRuleSetWorkflowsRule{ + Workflows: &RepositoryRulesetWorkflowsRule{ Type: "workflows", Parameters: &RequiredWorkflowsRuleParameters{ RequiredWorkflows: []*RuleRequiredWorkflow{ @@ -9756,7 +9756,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { }, }, }, - CodeScanning: &RepositoryRuleSetCodeScanningRule{ + CodeScanning: &RepositoryRulesetCodeScanningRule{ Type: "code_scanning", Parameters: &RuleCodeScanningParameters{ CodeScanningTools: []CodeScanningTool{{ @@ -9771,15 +9771,15 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { CreatedAt: &Timestamp{referenceTime}, UpdatedAt: &Timestamp{referenceTime}, }, - Changes: &RepositoryRuleSetEditedChanges{ - Name: &RepositoryRuleSetEditedSource{ + Changes: &RepositoryRulesetEditedChanges{ + Name: &RepositoryRulesetEditedSource{ From: String("f"), }, - Enforcement: &RepositoryRuleSetEditedSource{ + Enforcement: &RepositoryRulesetEditedSource{ From: String("e"), }, - Conditions: &RepositoryRuleSetEditedConditions{ - Added: []*RepositoryRuleSetRefCondition{ + Conditions: &RepositoryRulesetEditedConditions{ + Added: []*RepositoryRulesetRefCondition{ { RefName: &RulesetRefConditionParameters{ Include: []string{"refs/heads/main", "refs/heads/master"}, @@ -9787,7 +9787,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { }, }, }, - Deleted: []*RepositoryRuleSetRefCondition{ + Deleted: []*RepositoryRulesetRefCondition{ { RefName: &RulesetRefConditionParameters{ Include: []string{"refs/heads/main", "refs/heads/master"}, @@ -9795,51 +9795,51 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { }, }, }, - Updated: []*RepositoryRuleSetEditedUpdatedConditions{ + Updated: []*RepositoryRulesetEditedUpdatedConditions{ { - Condition: &RepositoryRuleSetRefCondition{ + Condition: &RepositoryRulesetRefCondition{ RefName: &RulesetRefConditionParameters{ Include: []string{"refs/heads/main", "refs/heads/master"}, Exclude: []string{"refs/heads/dev*"}, }, }, - Changes: &RepositoryRuleSetUpdatedConditionsEdited{ - ConditionType: &RepositoryRuleSetEditedSource{ + Changes: &RepositoryRulesetUpdatedConditionsEdited{ + ConditionType: &RepositoryRulesetEditedSource{ From: String("c"), }, - Target: &RepositoryRuleSetEditedSource{ + Target: &RepositoryRulesetEditedSource{ From: String("t"), }, - Include: &RepositoryRuleSetEditedSources{ + Include: &RepositoryRulesetEditedSources{ From: []*string{String("from")}, }, - Exclude: &RepositoryRuleSetEditedSources{ + Exclude: &RepositoryRulesetEditedSources{ From: []*string{String("to")}, }, }, }, }, }, - Rules: &RepositoryRuleSetEditedRules{ - Added: []*RepositoryRuleSetRule{ + Rules: &RepositoryRulesetEditedRules{ + Added: []*RepositoryRulesetRule{ //Creating just one object with all the possible rules for testing { - Creation: &RepositoryRuleSetRuleType{ + Creation: &RepositoryRulesetRuleType{ Type: "creation", }, - Update: &RepositoryRuleSetUpdateRule{ + Update: &RepositoryRulesetUpdateRule{ Type: "update", Parameters: &UpdateAllowsFetchAndMergeRuleParameters{ UpdateAllowsFetchAndMerge: true, }, }, - Deletion: &RepositoryRuleSetRuleType{ + Deletion: &RepositoryRulesetRuleType{ Type: "deletion", }, - RequireLinearHistory: &RepositoryRuleSetRuleType{ + RequireLinearHistory: &RepositoryRulesetRuleType{ Type: "require_linear_history", }, - MergeQueue: &RepositoryRuleSetMergeQueueRule{ + MergeQueue: &RepositoryRulesetMergeQueueRule{ Type: "merge_queue", Parameters: &MergeQueueRuleParameters{ CheckResponseTimeoutMinutes: 35, @@ -9851,16 +9851,16 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { MinEntriesToMergeWaitMinutes: 13, }, }, - RequireDeployments: &RepositoryRuleSetRequireDeploymentsRule{ + RequireDeployments: &RepositoryRulesetRequireDeploymentsRule{ Type: "required_deployments", Parameters: &RequiredDeploymentEnvironmentsRuleParameters{ RequiredDeploymentEnvironments: []string{"test"}, }, }, - RequiredSignatures: &RepositoryRuleSetRuleType{ + RequiredSignatures: &RepositoryRulesetRuleType{ Type: "required_signatures", }, - PullRequest: &RepositoryRuleSetPullRequestRule{ + PullRequest: &RepositoryRulesetPullRequestRule{ Type: "pull_request", Parameters: &PullRequestRuleParameters{ RequireCodeOwnerReview: true, @@ -9870,7 +9870,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { DismissStaleReviewsOnPush: true, }, }, - RequiredStatusChecks: &RepositoryRuleSetRequiredStatusChecksRule{ + RequiredStatusChecks: &RepositoryRulesetRequiredStatusChecksRule{ Type: "required_status_checks", Parameters: &RequiredStatusChecksRuleParameters{ RequiredStatusChecks: []RuleRequiredStatusChecks{ @@ -9882,10 +9882,10 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { StrictRequiredStatusChecksPolicy: true, }, }, - NonFastForward: &RepositoryRuleSetRuleType{ + NonFastForward: &RepositoryRulesetRuleType{ Type: "non_fast_forward", }, - CommitMessagePattern: &RepositoryRuleSetPatternRule{ + CommitMessagePattern: &RepositoryRulesetPatternRule{ Type: "commit_message_pattern", Parameters: &RulePatternParameters{ Name: String("avoid test commits"), @@ -9894,14 +9894,14 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "[test]", }, }, - CommitAuthorEmailPattern: &RepositoryRuleSetPatternRule{ + CommitAuthorEmailPattern: &RepositoryRulesetPatternRule{ Type: "commit_author_email_pattern", Parameters: &RulePatternParameters{ Operator: "contains", Pattern: "github", }, }, - CommitterEmailPattern: &RepositoryRuleSetPatternRule{ + CommitterEmailPattern: &RepositoryRulesetPatternRule{ Type: "committer_email_pattern", Parameters: &RulePatternParameters{ Name: String("avoid commit emails"), @@ -9910,7 +9910,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "abc", }, }, - BranchNamePattern: &RepositoryRuleSetPatternRule{ + BranchNamePattern: &RepositoryRulesetPatternRule{ Type: "branch_name_pattern", Parameters: &RulePatternParameters{ Name: String("avoid branch names"), @@ -9919,7 +9919,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "github$", }, }, - TagNamePattern: &RepositoryRuleSetPatternRule{ + TagNamePattern: &RepositoryRulesetPatternRule{ Type: "tag_name_pattern", Parameters: &RulePatternParameters{ Name: String("avoid tag names"), @@ -9928,31 +9928,31 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "github", }, }, - FilePathRestriction: &RepositoryRuleSetFilePathRestrictionRule{ + FilePathRestriction: &RepositoryRulesetFilePathRestrictionRule{ Type: "file_path_restriction", Parameters: &RuleFileParameters{ RestrictedFilePaths: &[]string{"/a/file"}, }, }, - MaxFilePathLength: &RepositoryRuleSetMaxFilePathLengthRule{ + MaxFilePathLength: &RepositoryRulesetMaxFilePathLengthRule{ Type: "max_file_path_length", Parameters: &RuleMaxFilePathLengthParameters{ MaxFilePathLength: 255, }, }, - FileExtensionRestriction: &RepositoryRuleSetFileExtensionRestrictionRule{ + FileExtensionRestriction: &RepositoryRulesetFileExtensionRestrictionRule{ Type: "file_extension_restriction", Parameters: &RuleFileExtensionRestrictionParameters{ RestrictedFileExtensions: []string{".exe"}, }, }, - MaxFileSize: &RepositoryRuleSetMaxFileSizeRule{ + MaxFileSize: &RepositoryRulesetMaxFileSizeRule{ Type: "max_file_size", Parameters: &RuleMaxFileSizeParameters{ MaxFileSize: 1024, }, }, - Workflows: &RepositoryRuleSetWorkflowsRule{ + Workflows: &RepositoryRulesetWorkflowsRule{ Type: "workflows", Parameters: &RequiredWorkflowsRuleParameters{ RequiredWorkflows: []*RuleRequiredWorkflow{ @@ -9963,7 +9963,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { }, }, }, - CodeScanning: &RepositoryRuleSetCodeScanningRule{ + CodeScanning: &RepositoryRulesetCodeScanningRule{ Type: "code_scanning", Parameters: &RuleCodeScanningParameters{ CodeScanningTools: []CodeScanningTool{{ @@ -9975,25 +9975,25 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { }, }, }, - Deleted: []*RepositoryRuleSetRule{ + Deleted: []*RepositoryRulesetRule{ //Creating just one object with all the possible rules for testing { - Creation: &RepositoryRuleSetRuleType{ + Creation: &RepositoryRulesetRuleType{ Type: "creation", }, - Update: &RepositoryRuleSetUpdateRule{ + Update: &RepositoryRulesetUpdateRule{ Type: "update", Parameters: &UpdateAllowsFetchAndMergeRuleParameters{ UpdateAllowsFetchAndMerge: true, }, }, - Deletion: &RepositoryRuleSetRuleType{ + Deletion: &RepositoryRulesetRuleType{ Type: "deletion", }, - RequireLinearHistory: &RepositoryRuleSetRuleType{ + RequireLinearHistory: &RepositoryRulesetRuleType{ Type: "require_linear_history", }, - MergeQueue: &RepositoryRuleSetMergeQueueRule{ + MergeQueue: &RepositoryRulesetMergeQueueRule{ Type: "merge_queue", Parameters: &MergeQueueRuleParameters{ CheckResponseTimeoutMinutes: 35, @@ -10005,16 +10005,16 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { MinEntriesToMergeWaitMinutes: 13, }, }, - RequireDeployments: &RepositoryRuleSetRequireDeploymentsRule{ + RequireDeployments: &RepositoryRulesetRequireDeploymentsRule{ Type: "required_deployments", Parameters: &RequiredDeploymentEnvironmentsRuleParameters{ RequiredDeploymentEnvironments: []string{"test"}, }, }, - RequiredSignatures: &RepositoryRuleSetRuleType{ + RequiredSignatures: &RepositoryRulesetRuleType{ Type: "required_signatures", }, - PullRequest: &RepositoryRuleSetPullRequestRule{ + PullRequest: &RepositoryRulesetPullRequestRule{ Type: "pull_request", Parameters: &PullRequestRuleParameters{ RequireCodeOwnerReview: true, @@ -10024,7 +10024,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { DismissStaleReviewsOnPush: true, }, }, - RequiredStatusChecks: &RepositoryRuleSetRequiredStatusChecksRule{ + RequiredStatusChecks: &RepositoryRulesetRequiredStatusChecksRule{ Type: "required_status_checks", Parameters: &RequiredStatusChecksRuleParameters{ RequiredStatusChecks: []RuleRequiredStatusChecks{ @@ -10036,10 +10036,10 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { StrictRequiredStatusChecksPolicy: true, }, }, - NonFastForward: &RepositoryRuleSetRuleType{ + NonFastForward: &RepositoryRulesetRuleType{ Type: "non_fast_forward", }, - CommitMessagePattern: &RepositoryRuleSetPatternRule{ + CommitMessagePattern: &RepositoryRulesetPatternRule{ Type: "commit_message_pattern", Parameters: &RulePatternParameters{ Name: String("avoid test commits"), @@ -10048,14 +10048,14 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "[test]", }, }, - CommitAuthorEmailPattern: &RepositoryRuleSetPatternRule{ + CommitAuthorEmailPattern: &RepositoryRulesetPatternRule{ Type: "commit_author_email_pattern", Parameters: &RulePatternParameters{ Operator: "contains", Pattern: "github", }, }, - CommitterEmailPattern: &RepositoryRuleSetPatternRule{ + CommitterEmailPattern: &RepositoryRulesetPatternRule{ Type: "committer_email_pattern", Parameters: &RulePatternParameters{ Name: String("avoid commit emails"), @@ -10064,7 +10064,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "abc", }, }, - BranchNamePattern: &RepositoryRuleSetPatternRule{ + BranchNamePattern: &RepositoryRulesetPatternRule{ Type: "branch_name_pattern", Parameters: &RulePatternParameters{ Name: String("avoid branch names"), @@ -10073,7 +10073,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "github$", }, }, - TagNamePattern: &RepositoryRuleSetPatternRule{ + TagNamePattern: &RepositoryRulesetPatternRule{ Type: "tag_name_pattern", Parameters: &RulePatternParameters{ Name: String("avoid tag names"), @@ -10082,31 +10082,31 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "github", }, }, - FilePathRestriction: &RepositoryRuleSetFilePathRestrictionRule{ + FilePathRestriction: &RepositoryRulesetFilePathRestrictionRule{ Type: "file_path_restriction", Parameters: &RuleFileParameters{ RestrictedFilePaths: &[]string{"/a/file"}, }, }, - MaxFilePathLength: &RepositoryRuleSetMaxFilePathLengthRule{ + MaxFilePathLength: &RepositoryRulesetMaxFilePathLengthRule{ Type: "max_file_path_length", Parameters: &RuleMaxFilePathLengthParameters{ MaxFilePathLength: 255, }, }, - FileExtensionRestriction: &RepositoryRuleSetFileExtensionRestrictionRule{ + FileExtensionRestriction: &RepositoryRulesetFileExtensionRestrictionRule{ Type: "file_extension_restriction", Parameters: &RuleFileExtensionRestrictionParameters{ RestrictedFileExtensions: []string{".exe"}, }, }, - MaxFileSize: &RepositoryRuleSetMaxFileSizeRule{ + MaxFileSize: &RepositoryRulesetMaxFileSizeRule{ Type: "max_file_size", Parameters: &RuleMaxFileSizeParameters{ MaxFileSize: 1024, }, }, - Workflows: &RepositoryRuleSetWorkflowsRule{ + Workflows: &RepositoryRulesetWorkflowsRule{ Type: "workflows", Parameters: &RequiredWorkflowsRuleParameters{ RequiredWorkflows: []*RuleRequiredWorkflow{ @@ -10117,7 +10117,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { }, }, }, - CodeScanning: &RepositoryRuleSetCodeScanningRule{ + CodeScanning: &RepositoryRulesetCodeScanningRule{ Type: "code_scanning", Parameters: &RuleCodeScanningParameters{ CodeScanningTools: []CodeScanningTool{{ @@ -10129,25 +10129,25 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { }, }, }, - Updated: []*RepositoryRuleSetUpdatedRules{ + Updated: []*RepositoryRulesetUpdatedRules{ { - Rule: &RepositoryRuleSetRule{ - Creation: &RepositoryRuleSetRuleType{ + Rule: &RepositoryRulesetRule{ + Creation: &RepositoryRulesetRuleType{ Type: "creation", }, - Update: &RepositoryRuleSetUpdateRule{ + Update: &RepositoryRulesetUpdateRule{ Type: "update", Parameters: &UpdateAllowsFetchAndMergeRuleParameters{ UpdateAllowsFetchAndMerge: true, }, }, - Deletion: &RepositoryRuleSetRuleType{ + Deletion: &RepositoryRulesetRuleType{ Type: "deletion", }, - RequireLinearHistory: &RepositoryRuleSetRuleType{ + RequireLinearHistory: &RepositoryRulesetRuleType{ Type: "require_linear_history", }, - MergeQueue: &RepositoryRuleSetMergeQueueRule{ + MergeQueue: &RepositoryRulesetMergeQueueRule{ Type: "merge_queue", Parameters: &MergeQueueRuleParameters{ CheckResponseTimeoutMinutes: 35, @@ -10159,16 +10159,16 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { MinEntriesToMergeWaitMinutes: 13, }, }, - RequireDeployments: &RepositoryRuleSetRequireDeploymentsRule{ + RequireDeployments: &RepositoryRulesetRequireDeploymentsRule{ Type: "required_deployments", Parameters: &RequiredDeploymentEnvironmentsRuleParameters{ RequiredDeploymentEnvironments: []string{"test"}, }, }, - RequiredSignatures: &RepositoryRuleSetRuleType{ + RequiredSignatures: &RepositoryRulesetRuleType{ Type: "required_signatures", }, - PullRequest: &RepositoryRuleSetPullRequestRule{ + PullRequest: &RepositoryRulesetPullRequestRule{ Type: "pull_request", Parameters: &PullRequestRuleParameters{ RequireCodeOwnerReview: true, @@ -10178,7 +10178,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { DismissStaleReviewsOnPush: true, }, }, - RequiredStatusChecks: &RepositoryRuleSetRequiredStatusChecksRule{ + RequiredStatusChecks: &RepositoryRulesetRequiredStatusChecksRule{ Type: "required_status_checks", Parameters: &RequiredStatusChecksRuleParameters{ RequiredStatusChecks: []RuleRequiredStatusChecks{ @@ -10190,10 +10190,10 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { StrictRequiredStatusChecksPolicy: true, }, }, - NonFastForward: &RepositoryRuleSetRuleType{ + NonFastForward: &RepositoryRulesetRuleType{ Type: "non_fast_forward", }, - CommitMessagePattern: &RepositoryRuleSetPatternRule{ + CommitMessagePattern: &RepositoryRulesetPatternRule{ Type: "commit_message_pattern", Parameters: &RulePatternParameters{ Name: String("avoid test commits"), @@ -10202,14 +10202,14 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "[test]", }, }, - CommitAuthorEmailPattern: &RepositoryRuleSetPatternRule{ + CommitAuthorEmailPattern: &RepositoryRulesetPatternRule{ Type: "commit_author_email_pattern", Parameters: &RulePatternParameters{ Operator: "contains", Pattern: "github", }, }, - CommitterEmailPattern: &RepositoryRuleSetPatternRule{ + CommitterEmailPattern: &RepositoryRulesetPatternRule{ Type: "committer_email_pattern", Parameters: &RulePatternParameters{ Name: String("avoid commit emails"), @@ -10218,7 +10218,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "abc", }, }, - BranchNamePattern: &RepositoryRuleSetPatternRule{ + BranchNamePattern: &RepositoryRulesetPatternRule{ Type: "branch_name_pattern", Parameters: &RulePatternParameters{ Name: String("avoid branch names"), @@ -10227,7 +10227,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "github$", }, }, - TagNamePattern: &RepositoryRuleSetPatternRule{ + TagNamePattern: &RepositoryRulesetPatternRule{ Type: "tag_name_pattern", Parameters: &RulePatternParameters{ Name: String("avoid tag names"), @@ -10236,31 +10236,31 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { Pattern: "github", }, }, - FilePathRestriction: &RepositoryRuleSetFilePathRestrictionRule{ + FilePathRestriction: &RepositoryRulesetFilePathRestrictionRule{ Type: "file_path_restriction", Parameters: &RuleFileParameters{ RestrictedFilePaths: &[]string{"/a/file"}, }, }, - MaxFilePathLength: &RepositoryRuleSetMaxFilePathLengthRule{ + MaxFilePathLength: &RepositoryRulesetMaxFilePathLengthRule{ Type: "max_file_path_length", Parameters: &RuleMaxFilePathLengthParameters{ MaxFilePathLength: 255, }, }, - FileExtensionRestriction: &RepositoryRuleSetFileExtensionRestrictionRule{ + FileExtensionRestriction: &RepositoryRulesetFileExtensionRestrictionRule{ Type: "file_extension_restriction", Parameters: &RuleFileExtensionRestrictionParameters{ RestrictedFileExtensions: []string{".exe"}, }, }, - MaxFileSize: &RepositoryRuleSetMaxFileSizeRule{ + MaxFileSize: &RepositoryRulesetMaxFileSizeRule{ Type: "max_file_size", Parameters: &RuleMaxFileSizeParameters{ MaxFileSize: 1024, }, }, - Workflows: &RepositoryRuleSetWorkflowsRule{ + Workflows: &RepositoryRulesetWorkflowsRule{ Type: "workflows", Parameters: &RequiredWorkflowsRuleParameters{ RequiredWorkflows: []*RuleRequiredWorkflow{ @@ -10271,7 +10271,7 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { }, }, }, - CodeScanning: &RepositoryRuleSetCodeScanningRule{ + CodeScanning: &RepositoryRulesetCodeScanningRule{ Type: "code_scanning", Parameters: &RuleCodeScanningParameters{ CodeScanningTools: []CodeScanningTool{{ @@ -10282,14 +10282,14 @@ func TestRepositoryRuleSetEvent_Marshal(t *testing.T) { }, }, }, - Changes: &RepositoryRuleSetEditedRuleChanges{ - Configuration: &RepositoryRuleSetEditedSources{ + Changes: &RepositoryRulesetEditedRuleChanges{ + Configuration: &RepositoryRulesetEditedSources{ From: []*string{String("from")}, }, - RuleType: &RepositoryRuleSetEditedSources{ + RuleType: &RepositoryRulesetEditedSources{ From: []*string{String("from")}, }, - Pattern: &RepositoryRuleSetEditedSources{ + Pattern: &RepositoryRulesetEditedSources{ From: []*string{String("from")}, }, }, diff --git a/github/github-accessors.go b/github/github-accessors.go index 96e9011f57..1131f45dd4 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -20607,7 +20607,7 @@ func (r *RepositoryRule) GetParameters() json.RawMessage { } // GetConditions returns the Conditions field if it's non-nil, zero value otherwise. -func (r *RepositoryRuleSet) GetConditions() json.RawMessage { +func (r *RepositoryRuleset) GetConditions() json.RawMessage { if r == nil || r.Conditions == nil { return json.RawMessage{} } @@ -20615,7 +20615,7 @@ func (r *RepositoryRuleSet) GetConditions() json.RawMessage { } // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. -func (r *RepositoryRuleSet) GetCreatedAt() Timestamp { +func (r *RepositoryRuleset) GetCreatedAt() Timestamp { if r == nil || r.CreatedAt == nil { return Timestamp{} } @@ -20623,7 +20623,7 @@ func (r *RepositoryRuleSet) GetCreatedAt() Timestamp { } // GetCurrentUserCanBypass returns the CurrentUserCanBypass field if it's non-nil, zero value otherwise. -func (r *RepositoryRuleSet) GetCurrentUserCanBypass() string { +func (r *RepositoryRuleset) GetCurrentUserCanBypass() string { if r == nil || r.CurrentUserCanBypass == nil { return "" } @@ -20631,7 +20631,7 @@ func (r *RepositoryRuleSet) GetCurrentUserCanBypass() string { } // GetLinks returns the Links field. -func (r *RepositoryRuleSet) GetLinks() *RepositoryRuleSetLink { +func (r *RepositoryRuleset) GetLinks() *RepositoryRulesetLink { if r == nil { return nil } @@ -20639,7 +20639,7 @@ func (r *RepositoryRuleSet) GetLinks() *RepositoryRuleSetLink { } // GetNodeID returns the NodeID field if it's non-nil, zero value otherwise. -func (r *RepositoryRuleSet) GetNodeID() string { +func (r *RepositoryRuleset) GetNodeID() string { if r == nil || r.NodeID == nil { return "" } @@ -20647,7 +20647,7 @@ func (r *RepositoryRuleSet) GetNodeID() string { } // GetSourceType returns the SourceType field if it's non-nil, zero value otherwise. -func (r *RepositoryRuleSet) GetSourceType() string { +func (r *RepositoryRuleset) GetSourceType() string { if r == nil || r.SourceType == nil { return "" } @@ -20655,7 +20655,7 @@ func (r *RepositoryRuleSet) GetSourceType() string { } // GetTarget returns the Target field if it's non-nil, zero value otherwise. -func (r *RepositoryRuleSet) GetTarget() string { +func (r *RepositoryRuleset) GetTarget() string { if r == nil || r.Target == nil { return "" } @@ -20663,7 +20663,7 @@ func (r *RepositoryRuleSet) GetTarget() string { } // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (r *RepositoryRuleSet) GetUpdatedAt() Timestamp { +func (r *RepositoryRuleset) GetUpdatedAt() Timestamp { if r == nil || r.UpdatedAt == nil { return Timestamp{} } @@ -20671,7 +20671,7 @@ func (r *RepositoryRuleSet) GetUpdatedAt() Timestamp { } // GetParameters returns the Parameters field. -func (r *RepositoryRuleSetCodeScanningRule) GetParameters() *RuleCodeScanningParameters { +func (r *RepositoryRulesetCodeScanningRule) GetParameters() *RuleCodeScanningParameters { if r == nil { return nil } @@ -20679,7 +20679,7 @@ func (r *RepositoryRuleSetCodeScanningRule) GetParameters() *RuleCodeScanningPar } // GetConditions returns the Conditions field. -func (r *RepositoryRuleSetEditedChanges) GetConditions() *RepositoryRuleSetEditedConditions { +func (r *RepositoryRulesetEditedChanges) GetConditions() *RepositoryRulesetEditedConditions { if r == nil { return nil } @@ -20687,7 +20687,7 @@ func (r *RepositoryRuleSetEditedChanges) GetConditions() *RepositoryRuleSetEdite } // GetEnforcement returns the Enforcement field. -func (r *RepositoryRuleSetEditedChanges) GetEnforcement() *RepositoryRuleSetEditedSource { +func (r *RepositoryRulesetEditedChanges) GetEnforcement() *RepositoryRulesetEditedSource { if r == nil { return nil } @@ -20695,7 +20695,7 @@ func (r *RepositoryRuleSetEditedChanges) GetEnforcement() *RepositoryRuleSetEdit } // GetName returns the Name field. -func (r *RepositoryRuleSetEditedChanges) GetName() *RepositoryRuleSetEditedSource { +func (r *RepositoryRulesetEditedChanges) GetName() *RepositoryRulesetEditedSource { if r == nil { return nil } @@ -20703,7 +20703,7 @@ func (r *RepositoryRuleSetEditedChanges) GetName() *RepositoryRuleSetEditedSourc } // GetRules returns the Rules field. -func (r *RepositoryRuleSetEditedChanges) GetRules() *RepositoryRuleSetEditedRules { +func (r *RepositoryRulesetEditedChanges) GetRules() *RepositoryRulesetEditedRules { if r == nil { return nil } @@ -20711,7 +20711,7 @@ func (r *RepositoryRuleSetEditedChanges) GetRules() *RepositoryRuleSetEditedRule } // GetConfiguration returns the Configuration field. -func (r *RepositoryRuleSetEditedRuleChanges) GetConfiguration() *RepositoryRuleSetEditedSources { +func (r *RepositoryRulesetEditedRuleChanges) GetConfiguration() *RepositoryRulesetEditedSources { if r == nil { return nil } @@ -20719,7 +20719,7 @@ func (r *RepositoryRuleSetEditedRuleChanges) GetConfiguration() *RepositoryRuleS } // GetPattern returns the Pattern field. -func (r *RepositoryRuleSetEditedRuleChanges) GetPattern() *RepositoryRuleSetEditedSources { +func (r *RepositoryRulesetEditedRuleChanges) GetPattern() *RepositoryRulesetEditedSources { if r == nil { return nil } @@ -20727,7 +20727,7 @@ func (r *RepositoryRuleSetEditedRuleChanges) GetPattern() *RepositoryRuleSetEdit } // GetRuleType returns the RuleType field. -func (r *RepositoryRuleSetEditedRuleChanges) GetRuleType() *RepositoryRuleSetEditedSources { +func (r *RepositoryRulesetEditedRuleChanges) GetRuleType() *RepositoryRulesetEditedSources { if r == nil { return nil } @@ -20735,7 +20735,7 @@ func (r *RepositoryRuleSetEditedRuleChanges) GetRuleType() *RepositoryRuleSetEdi } // GetFrom returns the From field if it's non-nil, zero value otherwise. -func (r *RepositoryRuleSetEditedSource) GetFrom() string { +func (r *RepositoryRulesetEditedSource) GetFrom() string { if r == nil || r.From == nil { return "" } @@ -20743,7 +20743,7 @@ func (r *RepositoryRuleSetEditedSource) GetFrom() string { } // GetChanges returns the Changes field. -func (r *RepositoryRuleSetEditedUpdatedConditions) GetChanges() *RepositoryRuleSetUpdatedConditionsEdited { +func (r *RepositoryRulesetEditedUpdatedConditions) GetChanges() *RepositoryRulesetUpdatedConditionsEdited { if r == nil { return nil } @@ -20751,7 +20751,7 @@ func (r *RepositoryRuleSetEditedUpdatedConditions) GetChanges() *RepositoryRuleS } // GetCondition returns the Condition field. -func (r *RepositoryRuleSetEditedUpdatedConditions) GetCondition() *RepositoryRuleSetRefCondition { +func (r *RepositoryRulesetEditedUpdatedConditions) GetCondition() *RepositoryRulesetRefCondition { if r == nil { return nil } @@ -20759,7 +20759,7 @@ func (r *RepositoryRuleSetEditedUpdatedConditions) GetCondition() *RepositoryRul } // GetAction returns the Action field if it's non-nil, zero value otherwise. -func (r *RepositoryRuleSetEvent) GetAction() string { +func (r *RepositoryRulesetEvent) GetAction() string { if r == nil || r.Action == nil { return "" } @@ -20767,7 +20767,7 @@ func (r *RepositoryRuleSetEvent) GetAction() string { } // GetChanges returns the Changes field. -func (r *RepositoryRuleSetEvent) GetChanges() *RepositoryRuleSetEditedChanges { +func (r *RepositoryRulesetEvent) GetChanges() *RepositoryRulesetEditedChanges { if r == nil { return nil } @@ -20775,7 +20775,7 @@ func (r *RepositoryRuleSetEvent) GetChanges() *RepositoryRuleSetEditedChanges { } // GetEnterprise returns the Enterprise field. -func (r *RepositoryRuleSetEvent) GetEnterprise() *Enterprise { +func (r *RepositoryRulesetEvent) GetEnterprise() *Enterprise { if r == nil { return nil } @@ -20783,7 +20783,7 @@ func (r *RepositoryRuleSetEvent) GetEnterprise() *Enterprise { } // GetInstallation returns the Installation field. -func (r *RepositoryRuleSetEvent) GetInstallation() *Installation { +func (r *RepositoryRulesetEvent) GetInstallation() *Installation { if r == nil { return nil } @@ -20791,7 +20791,7 @@ func (r *RepositoryRuleSetEvent) GetInstallation() *Installation { } // GetOrganization returns the Organization field. -func (r *RepositoryRuleSetEvent) GetOrganization() *Organization { +func (r *RepositoryRulesetEvent) GetOrganization() *Organization { if r == nil { return nil } @@ -20799,23 +20799,23 @@ func (r *RepositoryRuleSetEvent) GetOrganization() *Organization { } // GetRepository returns the Repository field. -func (r *RepositoryRuleSetEvent) GetRepository() *Repository { +func (r *RepositoryRulesetEvent) GetRepository() *Repository { if r == nil { return nil } return r.Repository } -// GetRepositoryRuleSet returns the RepositoryRuleSet field. -func (r *RepositoryRuleSetEvent) GetRepositoryRuleSet() *RepositoryRuleSet { +// GetRepositoryRuleset returns the RepositoryRuleset field. +func (r *RepositoryRulesetEvent) GetRepositoryRuleset() *RepositoryRuleset { if r == nil { return nil } - return r.RepositoryRuleSet + return r.RepositoryRuleset } // GetSender returns the Sender field. -func (r *RepositoryRuleSetEvent) GetSender() *User { +func (r *RepositoryRulesetEvent) GetSender() *User { if r == nil { return nil } @@ -20823,7 +20823,7 @@ func (r *RepositoryRuleSetEvent) GetSender() *User { } // GetParameters returns the Parameters field. -func (r *RepositoryRuleSetFileExtensionRestrictionRule) GetParameters() *RuleFileExtensionRestrictionParameters { +func (r *RepositoryRulesetFileExtensionRestrictionRule) GetParameters() *RuleFileExtensionRestrictionParameters { if r == nil { return nil } @@ -20831,7 +20831,7 @@ func (r *RepositoryRuleSetFileExtensionRestrictionRule) GetParameters() *RuleFil } // GetParameters returns the Parameters field. -func (r *RepositoryRuleSetFilePathRestrictionRule) GetParameters() *RuleFileParameters { +func (r *RepositoryRulesetFilePathRestrictionRule) GetParameters() *RuleFileParameters { if r == nil { return nil } @@ -20839,7 +20839,7 @@ func (r *RepositoryRuleSetFilePathRestrictionRule) GetParameters() *RuleFilePara } // GetHTML returns the HTML field. -func (r *RepositoryRuleSetLink) GetHTML() *RulesetLink { +func (r *RepositoryRulesetLink) GetHTML() *RulesetLink { if r == nil { return nil } @@ -20847,7 +20847,7 @@ func (r *RepositoryRuleSetLink) GetHTML() *RulesetLink { } // GetSelf returns the Self field. -func (r *RepositoryRuleSetLink) GetSelf() *RulesetLink { +func (r *RepositoryRulesetLink) GetSelf() *RulesetLink { if r == nil { return nil } @@ -20855,7 +20855,7 @@ func (r *RepositoryRuleSetLink) GetSelf() *RulesetLink { } // GetParameters returns the Parameters field. -func (r *RepositoryRuleSetMaxFilePathLengthRule) GetParameters() *RuleMaxFilePathLengthParameters { +func (r *RepositoryRulesetMaxFilePathLengthRule) GetParameters() *RuleMaxFilePathLengthParameters { if r == nil { return nil } @@ -20863,7 +20863,7 @@ func (r *RepositoryRuleSetMaxFilePathLengthRule) GetParameters() *RuleMaxFilePat } // GetParameters returns the Parameters field. -func (r *RepositoryRuleSetMaxFileSizeRule) GetParameters() *RuleMaxFileSizeParameters { +func (r *RepositoryRulesetMaxFileSizeRule) GetParameters() *RuleMaxFileSizeParameters { if r == nil { return nil } @@ -20871,7 +20871,7 @@ func (r *RepositoryRuleSetMaxFileSizeRule) GetParameters() *RuleMaxFileSizeParam } // GetParameters returns the Parameters field. -func (r *RepositoryRuleSetMergeQueueRule) GetParameters() *MergeQueueRuleParameters { +func (r *RepositoryRulesetMergeQueueRule) GetParameters() *MergeQueueRuleParameters { if r == nil { return nil } @@ -20879,7 +20879,7 @@ func (r *RepositoryRuleSetMergeQueueRule) GetParameters() *MergeQueueRuleParamet } // GetParameters returns the Parameters field. -func (r *RepositoryRuleSetPatternRule) GetParameters() *RulePatternParameters { +func (r *RepositoryRulesetPatternRule) GetParameters() *RulePatternParameters { if r == nil { return nil } @@ -20887,7 +20887,7 @@ func (r *RepositoryRuleSetPatternRule) GetParameters() *RulePatternParameters { } // GetParameters returns the Parameters field. -func (r *RepositoryRuleSetPullRequestRule) GetParameters() *PullRequestRuleParameters { +func (r *RepositoryRulesetPullRequestRule) GetParameters() *PullRequestRuleParameters { if r == nil { return nil } @@ -20895,7 +20895,7 @@ func (r *RepositoryRuleSetPullRequestRule) GetParameters() *PullRequestRuleParam } // GetRefName returns the RefName field. -func (r *RepositoryRuleSetRefCondition) GetRefName() *RulesetRefConditionParameters { +func (r *RepositoryRulesetRefCondition) GetRefName() *RulesetRefConditionParameters { if r == nil { return nil } @@ -20903,7 +20903,7 @@ func (r *RepositoryRuleSetRefCondition) GetRefName() *RulesetRefConditionParamet } // GetParameters returns the Parameters field. -func (r *RepositoryRuleSetRequireDeploymentsRule) GetParameters() *RequiredDeploymentEnvironmentsRuleParameters { +func (r *RepositoryRulesetRequireDeploymentsRule) GetParameters() *RequiredDeploymentEnvironmentsRuleParameters { if r == nil { return nil } @@ -20911,7 +20911,7 @@ func (r *RepositoryRuleSetRequireDeploymentsRule) GetParameters() *RequiredDeplo } // GetParameters returns the Parameters field. -func (r *RepositoryRuleSetRequiredStatusChecksRule) GetParameters() *RequiredStatusChecksRuleParameters { +func (r *RepositoryRulesetRequiredStatusChecksRule) GetParameters() *RequiredStatusChecksRuleParameters { if r == nil { return nil } @@ -20919,7 +20919,7 @@ func (r *RepositoryRuleSetRequiredStatusChecksRule) GetParameters() *RequiredSta } // GetBranchNamePattern returns the BranchNamePattern field. -func (r *RepositoryRuleSetRule) GetBranchNamePattern() *RepositoryRuleSetPatternRule { +func (r *RepositoryRulesetRule) GetBranchNamePattern() *RepositoryRulesetPatternRule { if r == nil { return nil } @@ -20927,7 +20927,7 @@ func (r *RepositoryRuleSetRule) GetBranchNamePattern() *RepositoryRuleSetPattern } // GetCodeScanning returns the CodeScanning field. -func (r *RepositoryRuleSetRule) GetCodeScanning() *RepositoryRuleSetCodeScanningRule { +func (r *RepositoryRulesetRule) GetCodeScanning() *RepositoryRulesetCodeScanningRule { if r == nil { return nil } @@ -20935,7 +20935,7 @@ func (r *RepositoryRuleSetRule) GetCodeScanning() *RepositoryRuleSetCodeScanning } // GetCommitAuthorEmailPattern returns the CommitAuthorEmailPattern field. -func (r *RepositoryRuleSetRule) GetCommitAuthorEmailPattern() *RepositoryRuleSetPatternRule { +func (r *RepositoryRulesetRule) GetCommitAuthorEmailPattern() *RepositoryRulesetPatternRule { if r == nil { return nil } @@ -20943,7 +20943,7 @@ func (r *RepositoryRuleSetRule) GetCommitAuthorEmailPattern() *RepositoryRuleSet } // GetCommitMessagePattern returns the CommitMessagePattern field. -func (r *RepositoryRuleSetRule) GetCommitMessagePattern() *RepositoryRuleSetPatternRule { +func (r *RepositoryRulesetRule) GetCommitMessagePattern() *RepositoryRulesetPatternRule { if r == nil { return nil } @@ -20951,7 +20951,7 @@ func (r *RepositoryRuleSetRule) GetCommitMessagePattern() *RepositoryRuleSetPatt } // GetCommitterEmailPattern returns the CommitterEmailPattern field. -func (r *RepositoryRuleSetRule) GetCommitterEmailPattern() *RepositoryRuleSetPatternRule { +func (r *RepositoryRulesetRule) GetCommitterEmailPattern() *RepositoryRulesetPatternRule { if r == nil { return nil } @@ -20959,7 +20959,7 @@ func (r *RepositoryRuleSetRule) GetCommitterEmailPattern() *RepositoryRuleSetPat } // GetCreation returns the Creation field. -func (r *RepositoryRuleSetRule) GetCreation() *RepositoryRuleSetRuleType { +func (r *RepositoryRulesetRule) GetCreation() *RepositoryRulesetRuleType { if r == nil { return nil } @@ -20967,7 +20967,7 @@ func (r *RepositoryRuleSetRule) GetCreation() *RepositoryRuleSetRuleType { } // GetDeletion returns the Deletion field. -func (r *RepositoryRuleSetRule) GetDeletion() *RepositoryRuleSetRuleType { +func (r *RepositoryRulesetRule) GetDeletion() *RepositoryRulesetRuleType { if r == nil { return nil } @@ -20975,7 +20975,7 @@ func (r *RepositoryRuleSetRule) GetDeletion() *RepositoryRuleSetRuleType { } // GetFileExtensionRestriction returns the FileExtensionRestriction field. -func (r *RepositoryRuleSetRule) GetFileExtensionRestriction() *RepositoryRuleSetFileExtensionRestrictionRule { +func (r *RepositoryRulesetRule) GetFileExtensionRestriction() *RepositoryRulesetFileExtensionRestrictionRule { if r == nil { return nil } @@ -20983,7 +20983,7 @@ func (r *RepositoryRuleSetRule) GetFileExtensionRestriction() *RepositoryRuleSet } // GetFilePathRestriction returns the FilePathRestriction field. -func (r *RepositoryRuleSetRule) GetFilePathRestriction() *RepositoryRuleSetFilePathRestrictionRule { +func (r *RepositoryRulesetRule) GetFilePathRestriction() *RepositoryRulesetFilePathRestrictionRule { if r == nil { return nil } @@ -20991,7 +20991,7 @@ func (r *RepositoryRuleSetRule) GetFilePathRestriction() *RepositoryRuleSetFileP } // GetMaxFilePathLength returns the MaxFilePathLength field. -func (r *RepositoryRuleSetRule) GetMaxFilePathLength() *RepositoryRuleSetMaxFilePathLengthRule { +func (r *RepositoryRulesetRule) GetMaxFilePathLength() *RepositoryRulesetMaxFilePathLengthRule { if r == nil { return nil } @@ -20999,7 +20999,7 @@ func (r *RepositoryRuleSetRule) GetMaxFilePathLength() *RepositoryRuleSetMaxFile } // GetMaxFileSize returns the MaxFileSize field. -func (r *RepositoryRuleSetRule) GetMaxFileSize() *RepositoryRuleSetMaxFileSizeRule { +func (r *RepositoryRulesetRule) GetMaxFileSize() *RepositoryRulesetMaxFileSizeRule { if r == nil { return nil } @@ -21007,7 +21007,7 @@ func (r *RepositoryRuleSetRule) GetMaxFileSize() *RepositoryRuleSetMaxFileSizeRu } // GetMergeQueue returns the MergeQueue field. -func (r *RepositoryRuleSetRule) GetMergeQueue() *RepositoryRuleSetMergeQueueRule { +func (r *RepositoryRulesetRule) GetMergeQueue() *RepositoryRulesetMergeQueueRule { if r == nil { return nil } @@ -21015,7 +21015,7 @@ func (r *RepositoryRuleSetRule) GetMergeQueue() *RepositoryRuleSetMergeQueueRule } // GetNonFastForward returns the NonFastForward field. -func (r *RepositoryRuleSetRule) GetNonFastForward() *RepositoryRuleSetRuleType { +func (r *RepositoryRulesetRule) GetNonFastForward() *RepositoryRulesetRuleType { if r == nil { return nil } @@ -21023,7 +21023,7 @@ func (r *RepositoryRuleSetRule) GetNonFastForward() *RepositoryRuleSetRuleType { } // GetPullRequest returns the PullRequest field. -func (r *RepositoryRuleSetRule) GetPullRequest() *RepositoryRuleSetPullRequestRule { +func (r *RepositoryRulesetRule) GetPullRequest() *RepositoryRulesetPullRequestRule { if r == nil { return nil } @@ -21031,7 +21031,7 @@ func (r *RepositoryRuleSetRule) GetPullRequest() *RepositoryRuleSetPullRequestRu } // GetRequireDeployments returns the RequireDeployments field. -func (r *RepositoryRuleSetRule) GetRequireDeployments() *RepositoryRuleSetRequireDeploymentsRule { +func (r *RepositoryRulesetRule) GetRequireDeployments() *RepositoryRulesetRequireDeploymentsRule { if r == nil { return nil } @@ -21039,7 +21039,7 @@ func (r *RepositoryRuleSetRule) GetRequireDeployments() *RepositoryRuleSetRequir } // GetRequiredSignatures returns the RequiredSignatures field. -func (r *RepositoryRuleSetRule) GetRequiredSignatures() *RepositoryRuleSetRuleType { +func (r *RepositoryRulesetRule) GetRequiredSignatures() *RepositoryRulesetRuleType { if r == nil { return nil } @@ -21047,7 +21047,7 @@ func (r *RepositoryRuleSetRule) GetRequiredSignatures() *RepositoryRuleSetRuleTy } // GetRequiredStatusChecks returns the RequiredStatusChecks field. -func (r *RepositoryRuleSetRule) GetRequiredStatusChecks() *RepositoryRuleSetRequiredStatusChecksRule { +func (r *RepositoryRulesetRule) GetRequiredStatusChecks() *RepositoryRulesetRequiredStatusChecksRule { if r == nil { return nil } @@ -21055,7 +21055,7 @@ func (r *RepositoryRuleSetRule) GetRequiredStatusChecks() *RepositoryRuleSetRequ } // GetRequireLinearHistory returns the RequireLinearHistory field. -func (r *RepositoryRuleSetRule) GetRequireLinearHistory() *RepositoryRuleSetRuleType { +func (r *RepositoryRulesetRule) GetRequireLinearHistory() *RepositoryRulesetRuleType { if r == nil { return nil } @@ -21063,7 +21063,7 @@ func (r *RepositoryRuleSetRule) GetRequireLinearHistory() *RepositoryRuleSetRule } // GetTagNamePattern returns the TagNamePattern field. -func (r *RepositoryRuleSetRule) GetTagNamePattern() *RepositoryRuleSetPatternRule { +func (r *RepositoryRulesetRule) GetTagNamePattern() *RepositoryRulesetPatternRule { if r == nil { return nil } @@ -21071,7 +21071,7 @@ func (r *RepositoryRuleSetRule) GetTagNamePattern() *RepositoryRuleSetPatternRul } // GetUpdate returns the Update field. -func (r *RepositoryRuleSetRule) GetUpdate() *RepositoryRuleSetUpdateRule { +func (r *RepositoryRulesetRule) GetUpdate() *RepositoryRulesetUpdateRule { if r == nil { return nil } @@ -21079,7 +21079,7 @@ func (r *RepositoryRuleSetRule) GetUpdate() *RepositoryRuleSetUpdateRule { } // GetWorkflows returns the Workflows field. -func (r *RepositoryRuleSetRule) GetWorkflows() *RepositoryRuleSetWorkflowsRule { +func (r *RepositoryRulesetRule) GetWorkflows() *RepositoryRulesetWorkflowsRule { if r == nil { return nil } @@ -21087,7 +21087,7 @@ func (r *RepositoryRuleSetRule) GetWorkflows() *RepositoryRuleSetWorkflowsRule { } // GetConditionType returns the ConditionType field. -func (r *RepositoryRuleSetUpdatedConditionsEdited) GetConditionType() *RepositoryRuleSetEditedSource { +func (r *RepositoryRulesetUpdatedConditionsEdited) GetConditionType() *RepositoryRulesetEditedSource { if r == nil { return nil } @@ -21095,7 +21095,7 @@ func (r *RepositoryRuleSetUpdatedConditionsEdited) GetConditionType() *Repositor } // GetExclude returns the Exclude field. -func (r *RepositoryRuleSetUpdatedConditionsEdited) GetExclude() *RepositoryRuleSetEditedSources { +func (r *RepositoryRulesetUpdatedConditionsEdited) GetExclude() *RepositoryRulesetEditedSources { if r == nil { return nil } @@ -21103,7 +21103,7 @@ func (r *RepositoryRuleSetUpdatedConditionsEdited) GetExclude() *RepositoryRuleS } // GetInclude returns the Include field. -func (r *RepositoryRuleSetUpdatedConditionsEdited) GetInclude() *RepositoryRuleSetEditedSources { +func (r *RepositoryRulesetUpdatedConditionsEdited) GetInclude() *RepositoryRulesetEditedSources { if r == nil { return nil } @@ -21111,7 +21111,7 @@ func (r *RepositoryRuleSetUpdatedConditionsEdited) GetInclude() *RepositoryRuleS } // GetTarget returns the Target field. -func (r *RepositoryRuleSetUpdatedConditionsEdited) GetTarget() *RepositoryRuleSetEditedSource { +func (r *RepositoryRulesetUpdatedConditionsEdited) GetTarget() *RepositoryRulesetEditedSource { if r == nil { return nil } @@ -21119,7 +21119,7 @@ func (r *RepositoryRuleSetUpdatedConditionsEdited) GetTarget() *RepositoryRuleSe } // GetChanges returns the Changes field. -func (r *RepositoryRuleSetUpdatedRules) GetChanges() *RepositoryRuleSetEditedRuleChanges { +func (r *RepositoryRulesetUpdatedRules) GetChanges() *RepositoryRulesetEditedRuleChanges { if r == nil { return nil } @@ -21127,7 +21127,7 @@ func (r *RepositoryRuleSetUpdatedRules) GetChanges() *RepositoryRuleSetEditedRul } // GetRule returns the Rule field. -func (r *RepositoryRuleSetUpdatedRules) GetRule() *RepositoryRuleSetRule { +func (r *RepositoryRulesetUpdatedRules) GetRule() *RepositoryRulesetRule { if r == nil { return nil } @@ -21135,7 +21135,7 @@ func (r *RepositoryRuleSetUpdatedRules) GetRule() *RepositoryRuleSetRule { } // GetParameters returns the Parameters field. -func (r *RepositoryRuleSetUpdateRule) GetParameters() *UpdateAllowsFetchAndMergeRuleParameters { +func (r *RepositoryRulesetUpdateRule) GetParameters() *UpdateAllowsFetchAndMergeRuleParameters { if r == nil { return nil } @@ -21143,7 +21143,7 @@ func (r *RepositoryRuleSetUpdateRule) GetParameters() *UpdateAllowsFetchAndMerge } // GetParameters returns the Parameters field. -func (r *RepositoryRuleSetWorkflowsRule) GetParameters() *RequiredWorkflowsRuleParameters { +func (r *RepositoryRulesetWorkflowsRule) GetParameters() *RequiredWorkflowsRuleParameters { if r == nil { return nil } diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index 74508d8b6e..198ed5db24 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -23913,504 +23913,504 @@ func TestRepositoryRule_GetParameters(tt *testing.T) { r.GetParameters() } -func TestRepositoryRuleSet_GetConditions(tt *testing.T) { +func TestRepositoryRuleset_GetConditions(tt *testing.T) { var zeroValue json.RawMessage - r := &RepositoryRuleSet{Conditions: &zeroValue} + r := &RepositoryRuleset{Conditions: &zeroValue} r.GetConditions() - r = &RepositoryRuleSet{} + r = &RepositoryRuleset{} r.GetConditions() r = nil r.GetConditions() } -func TestRepositoryRuleSet_GetCreatedAt(tt *testing.T) { +func TestRepositoryRuleset_GetCreatedAt(tt *testing.T) { var zeroValue Timestamp - r := &RepositoryRuleSet{CreatedAt: &zeroValue} + r := &RepositoryRuleset{CreatedAt: &zeroValue} r.GetCreatedAt() - r = &RepositoryRuleSet{} + r = &RepositoryRuleset{} r.GetCreatedAt() r = nil r.GetCreatedAt() } -func TestRepositoryRuleSet_GetCurrentUserCanBypass(tt *testing.T) { +func TestRepositoryRuleset_GetCurrentUserCanBypass(tt *testing.T) { var zeroValue string - r := &RepositoryRuleSet{CurrentUserCanBypass: &zeroValue} + r := &RepositoryRuleset{CurrentUserCanBypass: &zeroValue} r.GetCurrentUserCanBypass() - r = &RepositoryRuleSet{} + r = &RepositoryRuleset{} r.GetCurrentUserCanBypass() r = nil r.GetCurrentUserCanBypass() } -func TestRepositoryRuleSet_GetLinks(tt *testing.T) { - r := &RepositoryRuleSet{} +func TestRepositoryRuleset_GetLinks(tt *testing.T) { + r := &RepositoryRuleset{} r.GetLinks() r = nil r.GetLinks() } -func TestRepositoryRuleSet_GetNodeID(tt *testing.T) { +func TestRepositoryRuleset_GetNodeID(tt *testing.T) { var zeroValue string - r := &RepositoryRuleSet{NodeID: &zeroValue} + r := &RepositoryRuleset{NodeID: &zeroValue} r.GetNodeID() - r = &RepositoryRuleSet{} + r = &RepositoryRuleset{} r.GetNodeID() r = nil r.GetNodeID() } -func TestRepositoryRuleSet_GetSourceType(tt *testing.T) { +func TestRepositoryRuleset_GetSourceType(tt *testing.T) { var zeroValue string - r := &RepositoryRuleSet{SourceType: &zeroValue} + r := &RepositoryRuleset{SourceType: &zeroValue} r.GetSourceType() - r = &RepositoryRuleSet{} + r = &RepositoryRuleset{} r.GetSourceType() r = nil r.GetSourceType() } -func TestRepositoryRuleSet_GetTarget(tt *testing.T) { +func TestRepositoryRuleset_GetTarget(tt *testing.T) { var zeroValue string - r := &RepositoryRuleSet{Target: &zeroValue} + r := &RepositoryRuleset{Target: &zeroValue} r.GetTarget() - r = &RepositoryRuleSet{} + r = &RepositoryRuleset{} r.GetTarget() r = nil r.GetTarget() } -func TestRepositoryRuleSet_GetUpdatedAt(tt *testing.T) { +func TestRepositoryRuleset_GetUpdatedAt(tt *testing.T) { var zeroValue Timestamp - r := &RepositoryRuleSet{UpdatedAt: &zeroValue} + r := &RepositoryRuleset{UpdatedAt: &zeroValue} r.GetUpdatedAt() - r = &RepositoryRuleSet{} + r = &RepositoryRuleset{} r.GetUpdatedAt() r = nil r.GetUpdatedAt() } -func TestRepositoryRuleSetCodeScanningRule_GetParameters(tt *testing.T) { - r := &RepositoryRuleSetCodeScanningRule{} +func TestRepositoryRulesetCodeScanningRule_GetParameters(tt *testing.T) { + r := &RepositoryRulesetCodeScanningRule{} r.GetParameters() r = nil r.GetParameters() } -func TestRepositoryRuleSetEditedChanges_GetConditions(tt *testing.T) { - r := &RepositoryRuleSetEditedChanges{} +func TestRepositoryRulesetEditedChanges_GetConditions(tt *testing.T) { + r := &RepositoryRulesetEditedChanges{} r.GetConditions() r = nil r.GetConditions() } -func TestRepositoryRuleSetEditedChanges_GetEnforcement(tt *testing.T) { - r := &RepositoryRuleSetEditedChanges{} +func TestRepositoryRulesetEditedChanges_GetEnforcement(tt *testing.T) { + r := &RepositoryRulesetEditedChanges{} r.GetEnforcement() r = nil r.GetEnforcement() } -func TestRepositoryRuleSetEditedChanges_GetName(tt *testing.T) { - r := &RepositoryRuleSetEditedChanges{} +func TestRepositoryRulesetEditedChanges_GetName(tt *testing.T) { + r := &RepositoryRulesetEditedChanges{} r.GetName() r = nil r.GetName() } -func TestRepositoryRuleSetEditedChanges_GetRules(tt *testing.T) { - r := &RepositoryRuleSetEditedChanges{} +func TestRepositoryRulesetEditedChanges_GetRules(tt *testing.T) { + r := &RepositoryRulesetEditedChanges{} r.GetRules() r = nil r.GetRules() } -func TestRepositoryRuleSetEditedRuleChanges_GetConfiguration(tt *testing.T) { - r := &RepositoryRuleSetEditedRuleChanges{} +func TestRepositoryRulesetEditedRuleChanges_GetConfiguration(tt *testing.T) { + r := &RepositoryRulesetEditedRuleChanges{} r.GetConfiguration() r = nil r.GetConfiguration() } -func TestRepositoryRuleSetEditedRuleChanges_GetPattern(tt *testing.T) { - r := &RepositoryRuleSetEditedRuleChanges{} +func TestRepositoryRulesetEditedRuleChanges_GetPattern(tt *testing.T) { + r := &RepositoryRulesetEditedRuleChanges{} r.GetPattern() r = nil r.GetPattern() } -func TestRepositoryRuleSetEditedRuleChanges_GetRuleType(tt *testing.T) { - r := &RepositoryRuleSetEditedRuleChanges{} +func TestRepositoryRulesetEditedRuleChanges_GetRuleType(tt *testing.T) { + r := &RepositoryRulesetEditedRuleChanges{} r.GetRuleType() r = nil r.GetRuleType() } -func TestRepositoryRuleSetEditedSource_GetFrom(tt *testing.T) { +func TestRepositoryRulesetEditedSource_GetFrom(tt *testing.T) { var zeroValue string - r := &RepositoryRuleSetEditedSource{From: &zeroValue} + r := &RepositoryRulesetEditedSource{From: &zeroValue} r.GetFrom() - r = &RepositoryRuleSetEditedSource{} + r = &RepositoryRulesetEditedSource{} r.GetFrom() r = nil r.GetFrom() } -func TestRepositoryRuleSetEditedUpdatedConditions_GetChanges(tt *testing.T) { - r := &RepositoryRuleSetEditedUpdatedConditions{} +func TestRepositoryRulesetEditedUpdatedConditions_GetChanges(tt *testing.T) { + r := &RepositoryRulesetEditedUpdatedConditions{} r.GetChanges() r = nil r.GetChanges() } -func TestRepositoryRuleSetEditedUpdatedConditions_GetCondition(tt *testing.T) { - r := &RepositoryRuleSetEditedUpdatedConditions{} +func TestRepositoryRulesetEditedUpdatedConditions_GetCondition(tt *testing.T) { + r := &RepositoryRulesetEditedUpdatedConditions{} r.GetCondition() r = nil r.GetCondition() } -func TestRepositoryRuleSetEvent_GetAction(tt *testing.T) { +func TestRepositoryRulesetEvent_GetAction(tt *testing.T) { var zeroValue string - r := &RepositoryRuleSetEvent{Action: &zeroValue} + r := &RepositoryRulesetEvent{Action: &zeroValue} r.GetAction() - r = &RepositoryRuleSetEvent{} + r = &RepositoryRulesetEvent{} r.GetAction() r = nil r.GetAction() } -func TestRepositoryRuleSetEvent_GetChanges(tt *testing.T) { - r := &RepositoryRuleSetEvent{} +func TestRepositoryRulesetEvent_GetChanges(tt *testing.T) { + r := &RepositoryRulesetEvent{} r.GetChanges() r = nil r.GetChanges() } -func TestRepositoryRuleSetEvent_GetEnterprise(tt *testing.T) { - r := &RepositoryRuleSetEvent{} +func TestRepositoryRulesetEvent_GetEnterprise(tt *testing.T) { + r := &RepositoryRulesetEvent{} r.GetEnterprise() r = nil r.GetEnterprise() } -func TestRepositoryRuleSetEvent_GetInstallation(tt *testing.T) { - r := &RepositoryRuleSetEvent{} +func TestRepositoryRulesetEvent_GetInstallation(tt *testing.T) { + r := &RepositoryRulesetEvent{} r.GetInstallation() r = nil r.GetInstallation() } -func TestRepositoryRuleSetEvent_GetOrganization(tt *testing.T) { - r := &RepositoryRuleSetEvent{} +func TestRepositoryRulesetEvent_GetOrganization(tt *testing.T) { + r := &RepositoryRulesetEvent{} r.GetOrganization() r = nil r.GetOrganization() } -func TestRepositoryRuleSetEvent_GetRepository(tt *testing.T) { - r := &RepositoryRuleSetEvent{} +func TestRepositoryRulesetEvent_GetRepository(tt *testing.T) { + r := &RepositoryRulesetEvent{} r.GetRepository() r = nil r.GetRepository() } -func TestRepositoryRuleSetEvent_GetRepositoryRuleSet(tt *testing.T) { - r := &RepositoryRuleSetEvent{} - r.GetRepositoryRuleSet() +func TestRepositoryRulesetEvent_GetRepositoryRuleset(tt *testing.T) { + r := &RepositoryRulesetEvent{} + r.GetRepositoryRuleset() r = nil - r.GetRepositoryRuleSet() + r.GetRepositoryRuleset() } -func TestRepositoryRuleSetEvent_GetSender(tt *testing.T) { - r := &RepositoryRuleSetEvent{} +func TestRepositoryRulesetEvent_GetSender(tt *testing.T) { + r := &RepositoryRulesetEvent{} r.GetSender() r = nil r.GetSender() } -func TestRepositoryRuleSetFileExtensionRestrictionRule_GetParameters(tt *testing.T) { - r := &RepositoryRuleSetFileExtensionRestrictionRule{} +func TestRepositoryRulesetFileExtensionRestrictionRule_GetParameters(tt *testing.T) { + r := &RepositoryRulesetFileExtensionRestrictionRule{} r.GetParameters() r = nil r.GetParameters() } -func TestRepositoryRuleSetFilePathRestrictionRule_GetParameters(tt *testing.T) { - r := &RepositoryRuleSetFilePathRestrictionRule{} +func TestRepositoryRulesetFilePathRestrictionRule_GetParameters(tt *testing.T) { + r := &RepositoryRulesetFilePathRestrictionRule{} r.GetParameters() r = nil r.GetParameters() } -func TestRepositoryRuleSetLink_GetHTML(tt *testing.T) { - r := &RepositoryRuleSetLink{} +func TestRepositoryRulesetLink_GetHTML(tt *testing.T) { + r := &RepositoryRulesetLink{} r.GetHTML() r = nil r.GetHTML() } -func TestRepositoryRuleSetLink_GetSelf(tt *testing.T) { - r := &RepositoryRuleSetLink{} +func TestRepositoryRulesetLink_GetSelf(tt *testing.T) { + r := &RepositoryRulesetLink{} r.GetSelf() r = nil r.GetSelf() } -func TestRepositoryRuleSetMaxFilePathLengthRule_GetParameters(tt *testing.T) { - r := &RepositoryRuleSetMaxFilePathLengthRule{} +func TestRepositoryRulesetMaxFilePathLengthRule_GetParameters(tt *testing.T) { + r := &RepositoryRulesetMaxFilePathLengthRule{} r.GetParameters() r = nil r.GetParameters() } -func TestRepositoryRuleSetMaxFileSizeRule_GetParameters(tt *testing.T) { - r := &RepositoryRuleSetMaxFileSizeRule{} +func TestRepositoryRulesetMaxFileSizeRule_GetParameters(tt *testing.T) { + r := &RepositoryRulesetMaxFileSizeRule{} r.GetParameters() r = nil r.GetParameters() } -func TestRepositoryRuleSetMergeQueueRule_GetParameters(tt *testing.T) { - r := &RepositoryRuleSetMergeQueueRule{} +func TestRepositoryRulesetMergeQueueRule_GetParameters(tt *testing.T) { + r := &RepositoryRulesetMergeQueueRule{} r.GetParameters() r = nil r.GetParameters() } -func TestRepositoryRuleSetPatternRule_GetParameters(tt *testing.T) { - r := &RepositoryRuleSetPatternRule{} +func TestRepositoryRulesetPatternRule_GetParameters(tt *testing.T) { + r := &RepositoryRulesetPatternRule{} r.GetParameters() r = nil r.GetParameters() } -func TestRepositoryRuleSetPullRequestRule_GetParameters(tt *testing.T) { - r := &RepositoryRuleSetPullRequestRule{} +func TestRepositoryRulesetPullRequestRule_GetParameters(tt *testing.T) { + r := &RepositoryRulesetPullRequestRule{} r.GetParameters() r = nil r.GetParameters() } -func TestRepositoryRuleSetRefCondition_GetRefName(tt *testing.T) { - r := &RepositoryRuleSetRefCondition{} +func TestRepositoryRulesetRefCondition_GetRefName(tt *testing.T) { + r := &RepositoryRulesetRefCondition{} r.GetRefName() r = nil r.GetRefName() } -func TestRepositoryRuleSetRequireDeploymentsRule_GetParameters(tt *testing.T) { - r := &RepositoryRuleSetRequireDeploymentsRule{} +func TestRepositoryRulesetRequireDeploymentsRule_GetParameters(tt *testing.T) { + r := &RepositoryRulesetRequireDeploymentsRule{} r.GetParameters() r = nil r.GetParameters() } -func TestRepositoryRuleSetRequiredStatusChecksRule_GetParameters(tt *testing.T) { - r := &RepositoryRuleSetRequiredStatusChecksRule{} +func TestRepositoryRulesetRequiredStatusChecksRule_GetParameters(tt *testing.T) { + r := &RepositoryRulesetRequiredStatusChecksRule{} r.GetParameters() r = nil r.GetParameters() } -func TestRepositoryRuleSetRule_GetBranchNamePattern(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetBranchNamePattern(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetBranchNamePattern() r = nil r.GetBranchNamePattern() } -func TestRepositoryRuleSetRule_GetCodeScanning(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetCodeScanning(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetCodeScanning() r = nil r.GetCodeScanning() } -func TestRepositoryRuleSetRule_GetCommitAuthorEmailPattern(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetCommitAuthorEmailPattern(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetCommitAuthorEmailPattern() r = nil r.GetCommitAuthorEmailPattern() } -func TestRepositoryRuleSetRule_GetCommitMessagePattern(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetCommitMessagePattern(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetCommitMessagePattern() r = nil r.GetCommitMessagePattern() } -func TestRepositoryRuleSetRule_GetCommitterEmailPattern(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetCommitterEmailPattern(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetCommitterEmailPattern() r = nil r.GetCommitterEmailPattern() } -func TestRepositoryRuleSetRule_GetCreation(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetCreation(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetCreation() r = nil r.GetCreation() } -func TestRepositoryRuleSetRule_GetDeletion(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetDeletion(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetDeletion() r = nil r.GetDeletion() } -func TestRepositoryRuleSetRule_GetFileExtensionRestriction(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetFileExtensionRestriction(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetFileExtensionRestriction() r = nil r.GetFileExtensionRestriction() } -func TestRepositoryRuleSetRule_GetFilePathRestriction(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetFilePathRestriction(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetFilePathRestriction() r = nil r.GetFilePathRestriction() } -func TestRepositoryRuleSetRule_GetMaxFilePathLength(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetMaxFilePathLength(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetMaxFilePathLength() r = nil r.GetMaxFilePathLength() } -func TestRepositoryRuleSetRule_GetMaxFileSize(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetMaxFileSize(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetMaxFileSize() r = nil r.GetMaxFileSize() } -func TestRepositoryRuleSetRule_GetMergeQueue(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetMergeQueue(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetMergeQueue() r = nil r.GetMergeQueue() } -func TestRepositoryRuleSetRule_GetNonFastForward(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetNonFastForward(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetNonFastForward() r = nil r.GetNonFastForward() } -func TestRepositoryRuleSetRule_GetPullRequest(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetPullRequest(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetPullRequest() r = nil r.GetPullRequest() } -func TestRepositoryRuleSetRule_GetRequireDeployments(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetRequireDeployments(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetRequireDeployments() r = nil r.GetRequireDeployments() } -func TestRepositoryRuleSetRule_GetRequiredSignatures(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetRequiredSignatures(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetRequiredSignatures() r = nil r.GetRequiredSignatures() } -func TestRepositoryRuleSetRule_GetRequiredStatusChecks(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetRequiredStatusChecks(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetRequiredStatusChecks() r = nil r.GetRequiredStatusChecks() } -func TestRepositoryRuleSetRule_GetRequireLinearHistory(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetRequireLinearHistory(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetRequireLinearHistory() r = nil r.GetRequireLinearHistory() } -func TestRepositoryRuleSetRule_GetTagNamePattern(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetTagNamePattern(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetTagNamePattern() r = nil r.GetTagNamePattern() } -func TestRepositoryRuleSetRule_GetUpdate(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetUpdate(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetUpdate() r = nil r.GetUpdate() } -func TestRepositoryRuleSetRule_GetWorkflows(tt *testing.T) { - r := &RepositoryRuleSetRule{} +func TestRepositoryRulesetRule_GetWorkflows(tt *testing.T) { + r := &RepositoryRulesetRule{} r.GetWorkflows() r = nil r.GetWorkflows() } -func TestRepositoryRuleSetUpdatedConditionsEdited_GetConditionType(tt *testing.T) { - r := &RepositoryRuleSetUpdatedConditionsEdited{} +func TestRepositoryRulesetUpdatedConditionsEdited_GetConditionType(tt *testing.T) { + r := &RepositoryRulesetUpdatedConditionsEdited{} r.GetConditionType() r = nil r.GetConditionType() } -func TestRepositoryRuleSetUpdatedConditionsEdited_GetExclude(tt *testing.T) { - r := &RepositoryRuleSetUpdatedConditionsEdited{} +func TestRepositoryRulesetUpdatedConditionsEdited_GetExclude(tt *testing.T) { + r := &RepositoryRulesetUpdatedConditionsEdited{} r.GetExclude() r = nil r.GetExclude() } -func TestRepositoryRuleSetUpdatedConditionsEdited_GetInclude(tt *testing.T) { - r := &RepositoryRuleSetUpdatedConditionsEdited{} +func TestRepositoryRulesetUpdatedConditionsEdited_GetInclude(tt *testing.T) { + r := &RepositoryRulesetUpdatedConditionsEdited{} r.GetInclude() r = nil r.GetInclude() } -func TestRepositoryRuleSetUpdatedConditionsEdited_GetTarget(tt *testing.T) { - r := &RepositoryRuleSetUpdatedConditionsEdited{} +func TestRepositoryRulesetUpdatedConditionsEdited_GetTarget(tt *testing.T) { + r := &RepositoryRulesetUpdatedConditionsEdited{} r.GetTarget() r = nil r.GetTarget() } -func TestRepositoryRuleSetUpdatedRules_GetChanges(tt *testing.T) { - r := &RepositoryRuleSetUpdatedRules{} +func TestRepositoryRulesetUpdatedRules_GetChanges(tt *testing.T) { + r := &RepositoryRulesetUpdatedRules{} r.GetChanges() r = nil r.GetChanges() } -func TestRepositoryRuleSetUpdatedRules_GetRule(tt *testing.T) { - r := &RepositoryRuleSetUpdatedRules{} +func TestRepositoryRulesetUpdatedRules_GetRule(tt *testing.T) { + r := &RepositoryRulesetUpdatedRules{} r.GetRule() r = nil r.GetRule() } -func TestRepositoryRuleSetUpdateRule_GetParameters(tt *testing.T) { - r := &RepositoryRuleSetUpdateRule{} +func TestRepositoryRulesetUpdateRule_GetParameters(tt *testing.T) { + r := &RepositoryRulesetUpdateRule{} r.GetParameters() r = nil r.GetParameters() } -func TestRepositoryRuleSetWorkflowsRule_GetParameters(tt *testing.T) { - r := &RepositoryRuleSetWorkflowsRule{} +func TestRepositoryRulesetWorkflowsRule_GetParameters(tt *testing.T) { + r := &RepositoryRulesetWorkflowsRule{} r.GetParameters() r = nil r.GetParameters() diff --git a/github/messages.go b/github/messages.go index 197234c866..d4b9bfe09b 100644 --- a/github/messages.go +++ b/github/messages.go @@ -98,7 +98,7 @@ var ( "repository": &RepositoryEvent{}, "repository_dispatch": &RepositoryDispatchEvent{}, "repository_import": &RepositoryImportEvent{}, - "repository_ruleset": &RepositoryRuleSetEvent{}, + "repository_ruleset": &RepositoryRulesetEvent{}, "repository_vulnerability_alert": &RepositoryVulnerabilityAlertEvent{}, "release": &ReleaseEvent{}, "secret_scanning_alert": &SecretScanningAlertEvent{}, diff --git a/github/messages_test.go b/github/messages_test.go index 2f7e4460e7..65d87109f6 100644 --- a/github/messages_test.go +++ b/github/messages_test.go @@ -457,7 +457,7 @@ func TestParseWebHook(t *testing.T) { messageType: "repository", }, { - payload: &RepositoryRuleSetEvent{}, + payload: &RepositoryRulesetEvent{}, messageType: "repository_ruleset", }, { diff --git a/github/repos_rules.go b/github/repos_rules.go index 8b14c40558..780644a900 100644 --- a/github/repos_rules.go +++ b/github/repos_rules.go @@ -168,60 +168,60 @@ type RepositoryRule struct { RulesetID int64 `json:"ruleset_id"` } -type RepositoryRuleSetEditedChanges struct { - Name *RepositoryRuleSetEditedSource `json:"name,omitempty"` - Enforcement *RepositoryRuleSetEditedSource `json:"enforcement,omitempty"` - Conditions *RepositoryRuleSetEditedConditions `json:"conditions,omitempty"` - Rules *RepositoryRuleSetEditedRules `json:"rules,omitempty"` +type RepositoryRulesetEditedChanges struct { + Name *RepositoryRulesetEditedSource `json:"name,omitempty"` + Enforcement *RepositoryRulesetEditedSource `json:"enforcement,omitempty"` + Conditions *RepositoryRulesetEditedConditions `json:"conditions,omitempty"` + Rules *RepositoryRulesetEditedRules `json:"rules,omitempty"` } -type RepositoryRuleSetEditedSource struct { +type RepositoryRulesetEditedSource struct { From *string `json:"from,omitempty"` } -type RepositoryRuleSetEditedSources struct { +type RepositoryRulesetEditedSources struct { From []*string `json:"from,omitempty"` } -type RepositoryRuleSetEditedConditions struct { - Added []*RepositoryRuleSetRefCondition `json:"added,omitempty"` - Deleted []*RepositoryRuleSetRefCondition `json:"deleted,omitempty"` - Updated []*RepositoryRuleSetEditedUpdatedConditions `json:"updated,omitempty"` +type RepositoryRulesetEditedConditions struct { + Added []*RepositoryRulesetRefCondition `json:"added,omitempty"` + Deleted []*RepositoryRulesetRefCondition `json:"deleted,omitempty"` + Updated []*RepositoryRulesetEditedUpdatedConditions `json:"updated,omitempty"` } -type RepositoryRuleSetEditedRules struct { - Added []*RepositoryRuleSetRule `json:"added,omitempty"` - Deleted []*RepositoryRuleSetRule `json:"deleted,omitempty"` - Updated []*RepositoryRuleSetUpdatedRules `json:"updated,omitempty"` +type RepositoryRulesetEditedRules struct { + Added []*RepositoryRulesetRule `json:"added,omitempty"` + Deleted []*RepositoryRulesetRule `json:"deleted,omitempty"` + Updated []*RepositoryRulesetUpdatedRules `json:"updated,omitempty"` } -type RepositoryRuleSetRefCondition struct { +type RepositoryRulesetRefCondition struct { RefName *RulesetRefConditionParameters `json:"ref_name,omitempty"` } -type RepositoryRuleSetEditedUpdatedConditions struct { - Condition *RepositoryRuleSetRefCondition `json:"condition,omitempty"` - Changes *RepositoryRuleSetUpdatedConditionsEdited `json:"changes,omitempty"` +type RepositoryRulesetEditedUpdatedConditions struct { + Condition *RepositoryRulesetRefCondition `json:"condition,omitempty"` + Changes *RepositoryRulesetUpdatedConditionsEdited `json:"changes,omitempty"` } -type RepositoryRuleSetUpdatedConditionsEdited struct { - ConditionType *RepositoryRuleSetEditedSource `json:"condition_type,omitempty"` - Target *RepositoryRuleSetEditedSource `json:"target,omitempty"` - Include *RepositoryRuleSetEditedSources `json:"include,omitempty"` - Exclude *RepositoryRuleSetEditedSources `json:"exclude,omitempty"` +type RepositoryRulesetUpdatedConditionsEdited struct { + ConditionType *RepositoryRulesetEditedSource `json:"condition_type,omitempty"` + Target *RepositoryRulesetEditedSource `json:"target,omitempty"` + Include *RepositoryRulesetEditedSources `json:"include,omitempty"` + Exclude *RepositoryRulesetEditedSources `json:"exclude,omitempty"` } -type RepositoryRuleSetUpdatedRules struct { - Rule *RepositoryRuleSetRule `json:"rule,omitempty"` - Changes *RepositoryRuleSetEditedRuleChanges `json:"changes,omitempty"` +type RepositoryRulesetUpdatedRules struct { + Rule *RepositoryRulesetRule `json:"rule,omitempty"` + Changes *RepositoryRulesetEditedRuleChanges `json:"changes,omitempty"` } -type RepositoryRuleSetEditedRuleChanges struct { - Configuration *RepositoryRuleSetEditedSources `json:"configuration,omitempty"` - RuleType *RepositoryRuleSetEditedSources `json:"rule_type,omitempty"` - Pattern *RepositoryRuleSetEditedSources `json:"pattern,omitempty"` +type RepositoryRulesetEditedRuleChanges struct { + Configuration *RepositoryRulesetEditedSources `json:"configuration,omitempty"` + RuleType *RepositoryRulesetEditedSources `json:"rule_type,omitempty"` + Pattern *RepositoryRulesetEditedSources `json:"pattern,omitempty"` } -type RepositoryRuleSet struct { +type RepositoryRuleset struct { ID int64 `json:"id"` Name string `json:"name"` //Possible values for target: "branch", "tag", "push" @@ -235,114 +235,114 @@ type RepositoryRuleSet struct { // Possible values for current user can bypass: "always", "pull_requests_only", "never" CurrentUserCanBypass *string `json:"current_user_can_bypass,omitempty"` NodeID *string `json:"node_id,omitempty"` - Links *RepositoryRuleSetLink `json:"_links,omitempty"` + Links *RepositoryRulesetLink `json:"_links,omitempty"` Conditions *json.RawMessage `json:"conditions,omitempty"` - Rules []*RepositoryRuleSetRule `json:"rules,omitempty"` + Rules []*RepositoryRulesetRule `json:"rules,omitempty"` CreatedAt *Timestamp `json:"created_at,omitempty"` UpdatedAt *Timestamp `json:"updated_at,omitempty"` } -type RepositoryRuleSetRule struct { - Creation *RepositoryRuleSetRuleType `json:"creation,omitempty"` - Update *RepositoryRuleSetUpdateRule `json:"update,omitempty"` - Deletion *RepositoryRuleSetRuleType `json:"deletion,omitempty"` - RequireLinearHistory *RepositoryRuleSetRuleType `json:"required_linear_history,omitempty"` - MergeQueue *RepositoryRuleSetMergeQueueRule `json:"merge_queue,omitempty"` - RequireDeployments *RepositoryRuleSetRequireDeploymentsRule `json:"required_deployments,omitempty"` - RequiredSignatures *RepositoryRuleSetRuleType `json:"required_signatures,omitempty"` - PullRequest *RepositoryRuleSetPullRequestRule `json:"pull_request,omitempty"` - RequiredStatusChecks *RepositoryRuleSetRequiredStatusChecksRule `json:"required_status_checks,omitempty"` - NonFastForward *RepositoryRuleSetRuleType `json:"non_fast_forward,omitempty"` - CommitMessagePattern *RepositoryRuleSetPatternRule `json:"commit_message_pattern,omitempty"` - CommitAuthorEmailPattern *RepositoryRuleSetPatternRule `json:"commit_author_email_pattern,omitempty"` - CommitterEmailPattern *RepositoryRuleSetPatternRule `json:"committer_email_pattern,omitempty"` - BranchNamePattern *RepositoryRuleSetPatternRule `json:"branch_name_pattern,omitempty"` - TagNamePattern *RepositoryRuleSetPatternRule `json:"tag_name_pattern,omitempty"` - FilePathRestriction *RepositoryRuleSetFilePathRestrictionRule `json:"file_path_restriction,omitempty"` - MaxFilePathLength *RepositoryRuleSetMaxFilePathLengthRule `json:"max_file_path_length,omitempty"` - FileExtensionRestriction *RepositoryRuleSetFileExtensionRestrictionRule `json:"file_extension_restriction,omitempty"` - MaxFileSize *RepositoryRuleSetMaxFileSizeRule `json:"max_file_size,omitempty"` - Workflows *RepositoryRuleSetWorkflowsRule `json:"workflows,omitempty"` - CodeScanning *RepositoryRuleSetCodeScanningRule `json:"code_scanning,omitempty"` -} -type RepositoryRuleSetLink struct { +type RepositoryRulesetRule struct { + Creation *RepositoryRulesetRuleType `json:"creation,omitempty"` + Update *RepositoryRulesetUpdateRule `json:"update,omitempty"` + Deletion *RepositoryRulesetRuleType `json:"deletion,omitempty"` + RequireLinearHistory *RepositoryRulesetRuleType `json:"required_linear_history,omitempty"` + MergeQueue *RepositoryRulesetMergeQueueRule `json:"merge_queue,omitempty"` + RequireDeployments *RepositoryRulesetRequireDeploymentsRule `json:"required_deployments,omitempty"` + RequiredSignatures *RepositoryRulesetRuleType `json:"required_signatures,omitempty"` + PullRequest *RepositoryRulesetPullRequestRule `json:"pull_request,omitempty"` + RequiredStatusChecks *RepositoryRulesetRequiredStatusChecksRule `json:"required_status_checks,omitempty"` + NonFastForward *RepositoryRulesetRuleType `json:"non_fast_forward,omitempty"` + CommitMessagePattern *RepositoryRulesetPatternRule `json:"commit_message_pattern,omitempty"` + CommitAuthorEmailPattern *RepositoryRulesetPatternRule `json:"commit_author_email_pattern,omitempty"` + CommitterEmailPattern *RepositoryRulesetPatternRule `json:"committer_email_pattern,omitempty"` + BranchNamePattern *RepositoryRulesetPatternRule `json:"branch_name_pattern,omitempty"` + TagNamePattern *RepositoryRulesetPatternRule `json:"tag_name_pattern,omitempty"` + FilePathRestriction *RepositoryRulesetFilePathRestrictionRule `json:"file_path_restriction,omitempty"` + MaxFilePathLength *RepositoryRulesetMaxFilePathLengthRule `json:"max_file_path_length,omitempty"` + FileExtensionRestriction *RepositoryRulesetFileExtensionRestrictionRule `json:"file_extension_restriction,omitempty"` + MaxFileSize *RepositoryRulesetMaxFileSizeRule `json:"max_file_size,omitempty"` + Workflows *RepositoryRulesetWorkflowsRule `json:"workflows,omitempty"` + CodeScanning *RepositoryRulesetCodeScanningRule `json:"code_scanning,omitempty"` +} +type RepositoryRulesetLink struct { Self *RulesetLink `json:"self,omitempty"` HTML *RulesetLink `json:"html,omitempty"` } -type RepositoryRuleSetRuleType struct { +type RepositoryRulesetRuleType struct { Type string `json:"type"` } -type RepositoryRuleSetUpdateRule struct { +type RepositoryRulesetUpdateRule struct { //Value for Type: "update" Type string `json:"type"` Parameters *UpdateAllowsFetchAndMergeRuleParameters `json:"parameters,omitempty"` } -type RepositoryRuleSetMergeQueueRule struct { +type RepositoryRulesetMergeQueueRule struct { //Value for Type: "merge_queue" Type string `json:"type"` Parameters *MergeQueueRuleParameters `json:"parameters,omitempty"` } -type RepositoryRuleSetRequireDeploymentsRule struct { +type RepositoryRulesetRequireDeploymentsRule struct { //Value for Type: "required_deployments" Type string `json:"type"` Parameters *RequiredDeploymentEnvironmentsRuleParameters `json:"parameters,omitempty"` } -type RepositoryRuleSetPullRequestRule struct { +type RepositoryRulesetPullRequestRule struct { //Value for Type: "pull_request" Type string `json:"type"` Parameters *PullRequestRuleParameters `json:"parameters,omitempty"` } -type RepositoryRuleSetRequiredStatusChecksRule struct { +type RepositoryRulesetRequiredStatusChecksRule struct { //Value for Type: "required_status_checks" Type string `json:"type"` Parameters *RequiredStatusChecksRuleParameters `json:"parameters,omitempty"` } -type RepositoryRuleSetPatternRule struct { +type RepositoryRulesetPatternRule struct { Type string `json:"type"` Parameters *RulePatternParameters `json:"parameters,omitempty"` } -type RepositoryRuleSetFilePathRestrictionRule struct { +type RepositoryRulesetFilePathRestrictionRule struct { //Value for Type: "file_path_restriction" Type string `json:"type"` Parameters *RuleFileParameters `json:"parameters,omitempty"` } -type RepositoryRuleSetMaxFilePathLengthRule struct { +type RepositoryRulesetMaxFilePathLengthRule struct { //Value for Type: "max_file_path_length" Type string `json:"type"` Parameters *RuleMaxFilePathLengthParameters `json:"parameters,omitempty"` } -type RepositoryRuleSetFileExtensionRestrictionRule struct { +type RepositoryRulesetFileExtensionRestrictionRule struct { //Value for Type: "file_extension_restriction" Type string `json:"type"` Parameters *RuleFileExtensionRestrictionParameters `json:"parameters,omitempty"` } -type RepositoryRuleSetMaxFileSizeRule struct { +type RepositoryRulesetMaxFileSizeRule struct { //Value for Type: "max_file_size" Type string `json:"type"` Parameters *RuleMaxFileSizeParameters `json:"parameters,omitempty"` } -type RepositoryRuleSetWorkflowsRule struct { +type RepositoryRulesetWorkflowsRule struct { //Value for Type: "workflows" Type string `json:"type"` Parameters *RequiredWorkflowsRuleParameters `json:"parameters,omitempty"` } -type RepositoryRuleSetCodeScanningRule struct { +type RepositoryRulesetCodeScanningRule struct { //Value for Type:"code_scanning" Type string `json:"type"` Parameters *RuleCodeScanningParameters `json:"parameters,omitempty"`