Repository: google/go-github
File: github/repos_rules.go (Go)

Code before:
	MinEntriesToMerge            int    `json:"min_entries_to_merge"`
	MinEntriesToMergeWaitMinutes int    `json:"min_entries_to_merge_wait_minutes"`
}

// RequiredStatusChecksRuleParameters represents the required_status_checks rule parameters.
type RequiredStatusChecksRuleParameters struct {
	DoNotEnforceOnCreate             *bool                      `json:"do_not_enforce_on_create,omitempty"`
	RequiredStatusChecks             []RuleRequiredStatusChecks `json:"required_status_checks"`
	StrictRequiredStatusChecksPolicy bool                       `json:"strict_required_status_checks_policy"`
}

// RuleRequiredWorkflow represents the Workflow for the RequireWorkflowsRuleParameters object.
type RuleRequiredWorkflow struct {
	Path         string  `json:"path"`
	Ref          *string `json:"ref,omitempty"`
	RepositoryID *int64  `json:"repository_id,omitempty"`
	Sha          *string `json:"sha,omitempty"`
}

// RequiredWorkflowsRuleParameters represents the workflows rule parameters.
type RequiredWorkflowsRuleParameters struct {
	DoNotEnforceOnCreate bool                    `json:"do_not_enforce_on_create,omitempty"`
	RequiredWorkflows    []*RuleRequiredWorkflow `json:"workflows"`
}

// RuleRequiredCodeScanningTool represents the RequiredCodeScanningTools for the RequiredCodeScanningParameters object.
type RuleRequiredCodeScanningTool struct {
	AlertsThreshold         string `json:"alerts_threshold"`
	SecurityAlertsThreshold string `json:"security_alerts_threshold"`
	Tool                    string `json:"tool"`
}

// RequiredCodeScanningRuleParameters represents the code_scanning rule parameters.
type RequiredCodeScanningRuleParameters struct {
	RequiredCodeScanningTools []*RuleRequiredCodeScanningTool `json:"code_scanning_tools"`
}

// RepositoryRule represents a GitHub Rule.
type RepositoryRule struct {
	Type              string           `json:"type"`
	Parameters        *json.RawMessage `json:"parameters,omitempty"`
	RulesetSourceType string           `json:"ruleset_source_type"`
	RulesetSource     string           `json:"ruleset_source"`
	RulesetID         int64            `json:"ruleset_id"`
}

// RepositoryRulesetEditedChanges represents  the changes made to a repository ruleset.
type RepositoryRulesetEditedChanges struct {
	Name        *RepositoryRulesetEditedSource     `json:"name,omitempty"`
	Enforcement *RepositoryRulesetEditedSource     `json:"enforcement,omitempty"`
	Conditions  *RepositoryRulesetEditedConditions `json:"conditions,omitempty"`

Review comment (suggestion):
We might as well go all in and update the comment too, agreed?
Maybe something like this?

```suggestion
// RuleRequiredCodeScanningTool represents a single required code-scanning tool for the RequiredCodeScanningParameters object.
```

Code after:
	MinEntriesToMerge            int    `json:"min_entries_to_merge"`
	MinEntriesToMergeWaitMinutes int    `json:"min_entries_to_merge_wait_minutes"`
}

// RequiredStatusChecksRuleParameters represents the required_status_checks rule parameters.
type RequiredStatusChecksRuleParameters struct {
	DoNotEnforceOnCreate             *bool                      `json:"do_not_enforce_on_create,omitempty"`
	RequiredStatusChecks             []RuleRequiredStatusChecks `json:"required_status_checks"`
	StrictRequiredStatusChecksPolicy bool                       `json:"strict_required_status_checks_policy"`
}

// RuleRequiredWorkflow represents the Workflow for the RequireWorkflowsRuleParameters object.
type RuleRequiredWorkflow struct {
	Path         string  `json:"path"`
	Ref          *string `json:"ref,omitempty"`
	RepositoryID *int64  `json:"repository_id,omitempty"`
	Sha          *string `json:"sha,omitempty"`
}

// RequiredWorkflowsRuleParameters represents the workflows rule parameters.
type RequiredWorkflowsRuleParameters struct {
	DoNotEnforceOnCreate bool                    `json:"do_not_enforce_on_create,omitempty"`
	RequiredWorkflows    []*RuleRequiredWorkflow `json:"workflows"`
}

// RuleRequiredCodeScanningTool represents a single required code-scanning tool for the RequiredCodeScanningParameters object.
type RuleRequiredCodeScanningTool struct {
	AlertsThreshold         string `json:"alerts_threshold"`
	SecurityAlertsThreshold string `json:"security_alerts_threshold"`
	Tool                    string `json:"tool"`
}

// RequiredCodeScanningRuleParameters represents the code_scanning rule parameters.
type RequiredCodeScanningRuleParameters struct {
	RequiredCodeScanningTools []*RuleRequiredCodeScanningTool `json:"code_scanning_tools"`
}

// RepositoryRule represents a GitHub Rule.
type RepositoryRule struct {
	Type              string           `json:"type"`
	Parameters        *json.RawMessage `json:"parameters,omitempty"`
	RulesetSourceType string           `json:"ruleset_source_type"`
	RulesetSource     string           `json:"ruleset_source"`
	RulesetID         int64            `json:"ruleset_id"`
}

// RepositoryRulesetEditedChanges represents  the changes made to a repository ruleset.
type RepositoryRulesetEditedChanges struct {
	Name        *RepositoryRulesetEditedSource     `json:"name,omitempty"`
	Enforcement *RepositoryRulesetEditedSource     `json:"enforcement,omitempty"`
	Conditions  *RepositoryRulesetEditedConditions `json:"conditions,omitempty"`