--- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.23.0 name: organizationrulesets.enterprise.github.m.upbound.io spec: group: enterprise.github.m.upbound.io names: categories: - crossplane - managed - github kind: OrganizationRuleset listKind: OrganizationRulesetList plural: organizationrulesets singular: organizationruleset scope: Namespaced versions: - additionalPrinterColumns: - jsonPath: .status.conditions[?(@.type=='Synced')].status name: SYNCED type: string - jsonPath: .status.conditions[?(@.type=='Ready')].status name: READY type: string - jsonPath: .metadata.annotations.crossplane\.io/external-name name: EXTERNAL-NAME type: string - jsonPath: .metadata.creationTimestamp name: AGE type: date name: v1alpha1 schema: openAPIV3Schema: description: OrganizationRuleset is the Schema for the OrganizationRulesets API. Creates a GitHub organization ruleset. properties: apiVersion: description: |- APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources type: string kind: description: |- Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds type: string metadata: type: object spec: description: OrganizationRulesetSpec defines the desired state of OrganizationRuleset properties: forProvider: properties: bypassActors: description: |- (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) The actors that can bypass the rules in this ruleset. items: properties: actorId: description: |- (Number) The ID of the actor that can bypass a ruleset. Must be omitted for ID-less actor types: OrganizationAdmin, EnterpriseOwner, and DeployKey — the GitHub API does not use an ID for these types and will ignore any value set. The ID of the actor that can bypass a ruleset. Must be omitted for ID-less actor types: `OrganizationAdmin`, `EnterpriseOwner`, and `DeployKey` — the GitHub API does not use an ID for these types and will ignore any value set. format: int64 type: integer actorType: description: |- (String) The type of actor that can bypass a ruleset. Can be one of: RepositoryRole, Team, Integration, OrganizationAdmin, DeployKey, EnterpriseOwner. The type of actor that can bypass a ruleset. Can be one of: `Integration`, `OrganizationAdmin`, `RepositoryRole`, `Team`, `DeployKey`, or `EnterpriseOwner`. type: string bypassMode: description: |- (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: always, pull_request, exempt. When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`, `exempt`. type: string type: object type: array conditions: description: |- (Block List, Max: 1) Parameters for an organization ruleset condition. For branch and tag targets, ref_name is required alongside one of repository_name or repository_id. For push targets, ref_name must NOT be set - only repository_name or repository_id should be used. (see below for nested schema) Parameters for an organization ruleset condition.The branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties. The push rulesets conditions object does not require the ref_name property. items: properties: refName: description: |- (Block List, Max: 1) Required for branch and tag targets. Must NOT be set for push targets. (see below for nested schema) Targets refs that match the specified patterns. Required for `branch` and `tag` targets. items: properties: exclude: description: |- (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. items: type: string type: array include: description: |- (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches. Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. items: type: string type: array type: object type: array repositoryId: description: |- (List of Number) The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. The repository IDs that the ruleset applies to. One of these IDs must match for the ruleset to apply. items: format: int64 type: integer type: array repositoryName: description: |- (Block List, Max: 1) Targets repositories that match the specified name patterns. (see below for nested schema) Targets repositories that match the specified name patterns. items: properties: exclude: description: |- (List of String) Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match. Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match. items: type: string type: array include: description: |- (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~ALL to include all repositories. Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. items: type: string type: array protected: description: |- (Boolean) Whether renaming of target repositories is prevented. Defaults to false. Whether renaming of target repositories is prevented. type: boolean type: object type: array repositoryProperty: description: |- (Block List, Max: 1) Targets repositories by custom or system properties. (see below for nested schema) Conditions to target repositories by custom or system properties. items: properties: exclude: description: |- (List of Repository Properties) The repository properties and values to exclude. The condition will not pass if any of these properties match. (see below for nested schema) The repository properties and values to exclude. The ruleset will not apply if any of these properties match. items: properties: name: description: |- (String) How this rule will appear to users. The name of the repository property to target. type: string propertyValues: description: |- (Array of String) The values to match for the repository property. The values to match for the repository property. items: type: string type: array source: description: |- (String) The source of the repository property. Defaults to 'custom' if not specified. Can be one of: custom, system The source of the repository property. Defaults to 'custom' if not specified. Can be one of: custom, system type: string type: object type: array include: description: |- (List of Repository Properties) The repository properties and values to include. All of these properties must match for the condition to pass. (see below for nested schema) The repository properties and values to include. All of these properties must match for the condition to pass. items: properties: name: description: |- (String) How this rule will appear to users. The name of the repository property to target. type: string propertyValues: description: |- (Array of String) The values to match for the repository property. The values to match for the repository property. items: type: string type: array source: description: |- (String) The source of the repository property. Defaults to 'custom' if not specified. Can be one of: custom, system The source of the repository property. Defaults to 'custom' if not specified. Can be one of: custom, system type: string type: object type: array type: object type: array type: object type: array enforcement: description: |- (String) Possible values for Enforcement are disabled, active, evaluate. Note: evaluate is currently only supported for owners of type organization. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Possible values are `disabled`, `active`, and `evaluate`. Note: `evaluate` is only available for Enterprise plans. type: string name: description: |- (String) The name of the ruleset. The name of the ruleset. type: string rules: description: |- (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) Rules within the ruleset. items: properties: branchNamePattern: description: |- (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with tag_name_pattern as it only applies to rulesets with target branch. (see below for nested schema) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. items: properties: name: description: |- (String) How this rule will appear to users. How this rule will appear to users. type: string negate: description: |- (Boolean) If true, the rule will fail if the pattern matches. If true, the rule will fail if the pattern matches. type: boolean operator: description: |- (String) The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex. The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. type: string pattern: description: |- (String) The pattern to match with. The pattern to match with. type: string type: object type: array commitAuthorEmailPattern: description: |- (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) Parameters to be used for the commit_author_email_pattern rule. items: properties: name: description: |- (String) How this rule will appear to users. How this rule will appear to users. type: string negate: description: |- (Boolean) If true, the rule will fail if the pattern matches. If true, the rule will fail if the pattern matches. type: boolean operator: description: |- (String) The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex. The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. type: string pattern: description: |- (String) The pattern to match with. The pattern to match with. type: string type: object type: array commitMessagePattern: description: |- (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) Parameters to be used for the commit_message_pattern rule. items: properties: name: description: |- (String) How this rule will appear to users. How this rule will appear to users. type: string negate: description: |- (Boolean) If true, the rule will fail if the pattern matches. If true, the rule will fail if the pattern matches. type: boolean operator: description: |- (String) The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex. The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. type: string pattern: description: |- (String) The pattern to match with. The pattern to match with. type: string type: object type: array committerEmailPattern: description: |- (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) Parameters to be used for the committer_email_pattern rule. items: properties: name: description: |- (String) How this rule will appear to users. How this rule will appear to users. type: string negate: description: |- (Boolean) If true, the rule will fail if the pattern matches. If true, the rule will fail if the pattern matches. type: boolean operator: description: |- (String) The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex. The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. type: string pattern: description: |- (String) The pattern to match with. The pattern to match with. type: string type: object type: array copilotCodeReview: description: |- (Block List, Max: 1) Automatically request Copilot code review for new pull requests if the author has access to Copilot code review and their premium requests quota has not reached the limit. (see below for nested schema) Automatically request Copilot code review for new pull requests if the author has access to Copilot code review and their premium requests quota has not reached the limit. items: properties: reviewDraftPullRequests: description: |- (Boolean) Copilot automatically reviews draft pull requests before they are marked as ready for review. Defaults to false. Copilot automatically reviews draft pull requests before they are marked as ready for review. Defaults to `false`. type: boolean reviewOnPush: description: |- (Boolean) Copilot automatically reviews each new push to the pull request. Defaults to false. Copilot automatically reviews each new push to the pull request. Defaults to `false`. type: boolean type: object type: array creation: description: |- (Boolean) Only allow users with bypass permission to create matching refs. Only allow users with bypass permission to create matching refs. type: boolean deletion: description: |- (Boolean) Only allow users with bypass permissions to delete matching refs. Only allow users with bypass permissions to delete matching refs. type: boolean fileExtensionRestriction: description: |- (Block List, Max: 1) Prevent commits that include files with specified file extensions from being pushed to the commit graph. This rule only applies to rulesets with target push. (see below for nested schema) Prevent pushes based on file extensions. items: properties: restrictedFileExtensions: description: |- (Block Set, Min: 1) The file extensions that are restricted from being pushed to the commit graph. The file extensions that are restricted from being pushed to the commit graph. items: type: string type: array x-kubernetes-list-type: set type: object type: array filePathRestriction: description: |- (Block List, Max: 1) Prevent commits that include changes to specified file paths from being pushed to the commit graph. This rule only applies to rulesets with target push. (see below for nested schema) Prevent commits that include changes in specified file paths from being pushed to the commit graph. items: properties: restrictedFilePaths: description: |- (Block Set, Min: 1) The file paths that are restricted from being pushed to the commit graph. The file paths that are restricted from being pushed to the commit graph. items: type: string type: array type: object type: array maxFilePathLength: description: |- (Block List, Max: 1) Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. This rule only applies to rulesets with target push. (see below for nested schema) Prevent pushes based on file path length. items: properties: maxFilePathLength: description: |- (Integer) The maximum number of characters allowed in file paths. The maximum allowed length of a file path. format: int64 type: integer type: object type: array maxFileSize: description: |- (Block List, Max: 1) Prevent commits that include files with a specified file size from being pushed to the commit graph. This rule only applies to rulesets with target push. (see below for nested schema) Prevent pushes based on file size. items: properties: maxFileSize: description: |- (Integer) The maximum allowed size, in megabytes (MB), of a file. Valid range is 1-100 MB. The maximum allowed size of a file in megabytes (MB). Valid range is 1-100 MB. format: int64 type: integer type: object type: array nonFastForward: description: |- (Boolean) Prevent users with push access from force pushing to branches. Prevent users with push access from force pushing to refs. type: boolean pullRequest: description: |- (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. items: properties: allowedMergeMethods: description: |- (List of String, Min: 1) Array of merge methods to be allowed. Allowed values include merge, squash, and rebase. At least one must be enabled. Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled. items: type: string type: array dismissStaleReviewsOnPush: description: |- (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to false. New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. type: boolean requireCodeOwnerReview: description: |- (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to false. Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. type: boolean requireLastPushApproval: description: |- (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to false. Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. type: boolean requiredApprovingReviewCount: description: |- (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to 0. The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. format: int64 type: integer requiredReviewThreadResolution: description: |- (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to false. All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. type: boolean requiredReviewers: description: |- (Block List) Require specific reviewers to approve pull requests. Note: This feature is in beta. (see below for nested schema) Require specific reviewers to approve pull requests targeting matching branches. Note: This feature is in beta and subject to change. items: properties: filePatterns: description: |- (List of String) File patterns (fnmatch syntax) that this reviewer must approve. File patterns (fnmatch syntax) that this reviewer must approve. items: type: string type: array minimumApprovals: description: |- (Number) Minimum number of approvals required from this reviewer. Set to 0 to make approval optional. Minimum number of approvals required from this reviewer. Set to 0 to make approval optional. format: int64 type: integer reviewer: description: |- (Block List, Max: 1) The reviewer that must review matching files. (see below for nested schema) The reviewer that must review matching files. items: properties: id: description: |- (Number) The ID of the reviewer (Team ID). The ID of the reviewer that must review. format: int64 type: integer type: description: |- (String) The type of reviewer. Currently only Team is supported. The type of reviewer. Currently only `Team` is supported. type: string type: object type: array type: object type: array type: object type: array requiredCodeScanning: description: |- (Block List, Max: 1) Define which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. Multiple code scanning tools can be specified. (see below for nested schema) Choose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. items: properties: requiredCodeScanningTool: description: |- (Block Set, Min: 1) Actions code scanning tools that are required. Multiple can be defined. (see below for nested schema) Tools that must provide code scanning results for this rule to pass. items: properties: alertsThreshold: description: |- (String) The severity level at which code scanning results that raise alerts block a reference update. Can be one of: none, errors, errors_and_warnings, all. The severity level at which code scanning results that raise alerts block a reference update. Can be one of: `none`, `errors`, `errors_and_warnings`, `all`. type: string securityAlertsThreshold: description: |- (String) The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: none, critical, high_or_higher, medium_or_higher, all. The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: `none`, `critical`, `high_or_higher`, `medium_or_higher`, `all`. type: string tool: description: |- (String) The name of a code scanning tool. The name of a code scanning tool. type: string type: object type: array type: object type: array requiredLinearHistory: description: |- (Boolean) Prevent merge commits from being pushed to matching branches. Prevent merge commits from being pushed to matching branches. type: boolean requiredSignatures: description: |- (Boolean) Commits pushed to matching branches must have verified signatures. Commits pushed to matching branches must have verified signatures. type: boolean requiredStatusChecks: description: |- (Block List, Max: 1) 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. (see below for nested schema) 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. items: properties: doNotEnforceOnCreate: description: |- (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to false. Allow repositories and branches to be created if a check would otherwise prohibit it. type: boolean requiredCheck: description: |- (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) Status checks that are required. Several can be defined. items: properties: context: description: |- (String) The status check context name that must be present on the commit. The status check context name that must be present on the commit. type: string integrationId: description: |- (Number) The optional integration ID that this status check must originate from. The optional integration ID that this status check must originate from. format: int64 type: integer type: object type: array strictRequiredStatusChecksPolicy: description: |- (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to false. Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. type: boolean type: object type: array requiredWorkflows: description: |- (Block List, Max: 1) Define which Actions workflows must pass before changes can be merged into a branch matching the rule. Multiple workflows can be specified. (see below for nested schema) Choose which Actions workflows must pass before branches can be merged into a branch that matches this rule. items: properties: doNotEnforceOnCreate: description: |- (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to false. Allow repositories and branches to be created if a check would otherwise prohibit it. type: boolean requiredWorkflow: description: |- (Block Set, Min: 1) Actions workflows that are required. Multiple can be defined. (see below for nested schema) Actions workflows that are required. Several can be defined. items: properties: path: description: |- (String) The path to the YAML definition file of the workflow. The path to the workflow YAML definition file. type: string ref: description: |- (String) The optional ref from which to fetch the workflow. Defaults to master. The ref (branch or tag) of the workflow file to use. type: string repositoryId: description: |- (Number) The ID of the repository. Names, full names and repository URLs are not supported. The repository in which the workflow is defined. format: int64 type: integer type: object type: array type: object type: array tagNamePattern: description: |- (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with branch_name_pattern as it only applies to rulesets with target tag. (see below for nested schema) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. items: properties: name: description: |- (String) How this rule will appear to users. How this rule will appear to users. type: string negate: description: |- (Boolean) If true, the rule will fail if the pattern matches. If true, the rule will fail if the pattern matches. type: boolean operator: description: |- (String) The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex. The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. type: string pattern: description: |- (String) The pattern to match with. The pattern to match with. type: string type: object type: array update: description: |- (Boolean) Only allow users with bypass permission to update matching refs. Only allow users with bypass permission to update matching refs. type: boolean type: object type: array target: description: |- (String) Possible values are branch, tag and push. The target of the ruleset. Possible values are branch, tag and push. type: string type: object initProvider: description: |- THIS IS A BETA FIELD. It will be honored unless the Management Policies feature flag is disabled. InitProvider holds the same fields as ForProvider, with the exception of Identifier and other resource reference fields. The fields that are in InitProvider are merged into ForProvider when the resource is created. The same fields are also added to the terraform ignore_changes hook, to avoid updating them after creation. This is useful for fields that are required on creation, but we do not desire to update them after creation, for example because of an external controller is managing them, like an autoscaler. properties: bypassActors: description: |- (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) The actors that can bypass the rules in this ruleset. items: properties: actorId: description: |- (Number) The ID of the actor that can bypass a ruleset. Must be omitted for ID-less actor types: OrganizationAdmin, EnterpriseOwner, and DeployKey — the GitHub API does not use an ID for these types and will ignore any value set. The ID of the actor that can bypass a ruleset. Must be omitted for ID-less actor types: `OrganizationAdmin`, `EnterpriseOwner`, and `DeployKey` — the GitHub API does not use an ID for these types and will ignore any value set. format: int64 type: integer actorType: description: |- (String) The type of actor that can bypass a ruleset. Can be one of: RepositoryRole, Team, Integration, OrganizationAdmin, DeployKey, EnterpriseOwner. The type of actor that can bypass a ruleset. Can be one of: `Integration`, `OrganizationAdmin`, `RepositoryRole`, `Team`, `DeployKey`, or `EnterpriseOwner`. type: string bypassMode: description: |- (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: always, pull_request, exempt. When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`, `exempt`. type: string type: object type: array conditions: description: |- (Block List, Max: 1) Parameters for an organization ruleset condition. For branch and tag targets, ref_name is required alongside one of repository_name or repository_id. For push targets, ref_name must NOT be set - only repository_name or repository_id should be used. (see below for nested schema) Parameters for an organization ruleset condition.The branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties. The push rulesets conditions object does not require the ref_name property. items: properties: refName: description: |- (Block List, Max: 1) Required for branch and tag targets. Must NOT be set for push targets. (see below for nested schema) Targets refs that match the specified patterns. Required for `branch` and `tag` targets. items: properties: exclude: description: |- (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. items: type: string type: array include: description: |- (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches. Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. items: type: string type: array type: object type: array repositoryId: description: |- (List of Number) The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. The repository IDs that the ruleset applies to. One of these IDs must match for the ruleset to apply. items: format: int64 type: integer type: array repositoryName: description: |- (Block List, Max: 1) Targets repositories that match the specified name patterns. (see below for nested schema) Targets repositories that match the specified name patterns. items: properties: exclude: description: |- (List of String) Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match. Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match. items: type: string type: array include: description: |- (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~ALL to include all repositories. Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. items: type: string type: array protected: description: |- (Boolean) Whether renaming of target repositories is prevented. Defaults to false. Whether renaming of target repositories is prevented. type: boolean type: object type: array repositoryProperty: description: |- (Block List, Max: 1) Targets repositories by custom or system properties. (see below for nested schema) Conditions to target repositories by custom or system properties. items: properties: exclude: description: |- (List of Repository Properties) The repository properties and values to exclude. The condition will not pass if any of these properties match. (see below for nested schema) The repository properties and values to exclude. The ruleset will not apply if any of these properties match. items: properties: name: description: |- (String) How this rule will appear to users. The name of the repository property to target. type: string propertyValues: description: |- (Array of String) The values to match for the repository property. The values to match for the repository property. items: type: string type: array source: description: |- (String) The source of the repository property. Defaults to 'custom' if not specified. Can be one of: custom, system The source of the repository property. Defaults to 'custom' if not specified. Can be one of: custom, system type: string type: object type: array include: description: |- (List of Repository Properties) The repository properties and values to include. All of these properties must match for the condition to pass. (see below for nested schema) The repository properties and values to include. All of these properties must match for the condition to pass. items: properties: name: description: |- (String) How this rule will appear to users. The name of the repository property to target. type: string propertyValues: description: |- (Array of String) The values to match for the repository property. The values to match for the repository property. items: type: string type: array source: description: |- (String) The source of the repository property. Defaults to 'custom' if not specified. Can be one of: custom, system The source of the repository property. Defaults to 'custom' if not specified. Can be one of: custom, system type: string type: object type: array type: object type: array type: object type: array enforcement: description: |- (String) Possible values for Enforcement are disabled, active, evaluate. Note: evaluate is currently only supported for owners of type organization. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Possible values are `disabled`, `active`, and `evaluate`. Note: `evaluate` is only available for Enterprise plans. type: string name: description: |- (String) The name of the ruleset. The name of the ruleset. type: string rules: description: |- (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) Rules within the ruleset. items: properties: branchNamePattern: description: |- (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with tag_name_pattern as it only applies to rulesets with target branch. (see below for nested schema) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. items: properties: name: description: |- (String) How this rule will appear to users. How this rule will appear to users. type: string negate: description: |- (Boolean) If true, the rule will fail if the pattern matches. If true, the rule will fail if the pattern matches. type: boolean operator: description: |- (String) The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex. The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. type: string pattern: description: |- (String) The pattern to match with. The pattern to match with. type: string type: object type: array commitAuthorEmailPattern: description: |- (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) Parameters to be used for the commit_author_email_pattern rule. items: properties: name: description: |- (String) How this rule will appear to users. How this rule will appear to users. type: string negate: description: |- (Boolean) If true, the rule will fail if the pattern matches. If true, the rule will fail if the pattern matches. type: boolean operator: description: |- (String) The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex. The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. type: string pattern: description: |- (String) The pattern to match with. The pattern to match with. type: string type: object type: array commitMessagePattern: description: |- (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) Parameters to be used for the commit_message_pattern rule. items: properties: name: description: |- (String) How this rule will appear to users. How this rule will appear to users. type: string negate: description: |- (Boolean) If true, the rule will fail if the pattern matches. If true, the rule will fail if the pattern matches. type: boolean operator: description: |- (String) The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex. The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. type: string pattern: description: |- (String) The pattern to match with. The pattern to match with. type: string type: object type: array committerEmailPattern: description: |- (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) Parameters to be used for the committer_email_pattern rule. items: properties: name: description: |- (String) How this rule will appear to users. How this rule will appear to users. type: string negate: description: |- (Boolean) If true, the rule will fail if the pattern matches. If true, the rule will fail if the pattern matches. type: boolean operator: description: |- (String) The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex. The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. type: string pattern: description: |- (String) The pattern to match with. The pattern to match with. type: string type: object type: array copilotCodeReview: description: |- (Block List, Max: 1) Automatically request Copilot code review for new pull requests if the author has access to Copilot code review and their premium requests quota has not reached the limit. (see below for nested schema) Automatically request Copilot code review for new pull requests if the author has access to Copilot code review and their premium requests quota has not reached the limit. items: properties: reviewDraftPullRequests: description: |- (Boolean) Copilot automatically reviews draft pull requests before they are marked as ready for review. Defaults to false. Copilot automatically reviews draft pull requests before they are marked as ready for review. Defaults to `false`. type: boolean reviewOnPush: description: |- (Boolean) Copilot automatically reviews each new push to the pull request. Defaults to false. Copilot automatically reviews each new push to the pull request. Defaults to `false`. type: boolean type: object type: array creation: description: |- (Boolean) Only allow users with bypass permission to create matching refs. Only allow users with bypass permission to create matching refs. type: boolean deletion: description: |- (Boolean) Only allow users with bypass permissions to delete matching refs. Only allow users with bypass permissions to delete matching refs. type: boolean fileExtensionRestriction: description: |- (Block List, Max: 1) Prevent commits that include files with specified file extensions from being pushed to the commit graph. This rule only applies to rulesets with target push. (see below for nested schema) Prevent pushes based on file extensions. items: properties: restrictedFileExtensions: description: |- (Block Set, Min: 1) The file extensions that are restricted from being pushed to the commit graph. The file extensions that are restricted from being pushed to the commit graph. items: type: string type: array x-kubernetes-list-type: set type: object type: array filePathRestriction: description: |- (Block List, Max: 1) Prevent commits that include changes to specified file paths from being pushed to the commit graph. This rule only applies to rulesets with target push. (see below for nested schema) Prevent commits that include changes in specified file paths from being pushed to the commit graph. items: properties: restrictedFilePaths: description: |- (Block Set, Min: 1) The file paths that are restricted from being pushed to the commit graph. The file paths that are restricted from being pushed to the commit graph. items: type: string type: array type: object type: array maxFilePathLength: description: |- (Block List, Max: 1) Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. This rule only applies to rulesets with target push. (see below for nested schema) Prevent pushes based on file path length. items: properties: maxFilePathLength: description: |- (Integer) The maximum number of characters allowed in file paths. The maximum allowed length of a file path. format: int64 type: integer type: object type: array maxFileSize: description: |- (Block List, Max: 1) Prevent commits that include files with a specified file size from being pushed to the commit graph. This rule only applies to rulesets with target push. (see below for nested schema) Prevent pushes based on file size. items: properties: maxFileSize: description: |- (Integer) The maximum allowed size, in megabytes (MB), of a file. Valid range is 1-100 MB. The maximum allowed size of a file in megabytes (MB). Valid range is 1-100 MB. format: int64 type: integer type: object type: array nonFastForward: description: |- (Boolean) Prevent users with push access from force pushing to branches. Prevent users with push access from force pushing to refs. type: boolean pullRequest: description: |- (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. items: properties: allowedMergeMethods: description: |- (List of String, Min: 1) Array of merge methods to be allowed. Allowed values include merge, squash, and rebase. At least one must be enabled. Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled. items: type: string type: array dismissStaleReviewsOnPush: description: |- (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to false. New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. type: boolean requireCodeOwnerReview: description: |- (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to false. Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. type: boolean requireLastPushApproval: description: |- (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to false. Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. type: boolean requiredApprovingReviewCount: description: |- (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to 0. The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. format: int64 type: integer requiredReviewThreadResolution: description: |- (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to false. All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. type: boolean requiredReviewers: description: |- (Block List) Require specific reviewers to approve pull requests. Note: This feature is in beta. (see below for nested schema) Require specific reviewers to approve pull requests targeting matching branches. Note: This feature is in beta and subject to change. items: properties: filePatterns: description: |- (List of String) File patterns (fnmatch syntax) that this reviewer must approve. File patterns (fnmatch syntax) that this reviewer must approve. items: type: string type: array minimumApprovals: description: |- (Number) Minimum number of approvals required from this reviewer. Set to 0 to make approval optional. Minimum number of approvals required from this reviewer. Set to 0 to make approval optional. format: int64 type: integer reviewer: description: |- (Block List, Max: 1) The reviewer that must review matching files. (see below for nested schema) The reviewer that must review matching files. items: properties: id: description: |- (Number) The ID of the reviewer (Team ID). The ID of the reviewer that must review. format: int64 type: integer type: description: |- (String) The type of reviewer. Currently only Team is supported. The type of reviewer. Currently only `Team` is supported. type: string type: object type: array type: object type: array type: object type: array requiredCodeScanning: description: |- (Block List, Max: 1) Define which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. Multiple code scanning tools can be specified. (see below for nested schema) Choose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. items: properties: requiredCodeScanningTool: description: |- (Block Set, Min: 1) Actions code scanning tools that are required. Multiple can be defined. (see below for nested schema) Tools that must provide code scanning results for this rule to pass. items: properties: alertsThreshold: description: |- (String) The severity level at which code scanning results that raise alerts block a reference update. Can be one of: none, errors, errors_and_warnings, all. The severity level at which code scanning results that raise alerts block a reference update. Can be one of: `none`, `errors`, `errors_and_warnings`, `all`. type: string securityAlertsThreshold: description: |- (String) The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: none, critical, high_or_higher, medium_or_higher, all. The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: `none`, `critical`, `high_or_higher`, `medium_or_higher`, `all`. type: string tool: description: |- (String) The name of a code scanning tool. The name of a code scanning tool. type: string type: object type: array type: object type: array requiredLinearHistory: description: |- (Boolean) Prevent merge commits from being pushed to matching branches. Prevent merge commits from being pushed to matching branches. type: boolean requiredSignatures: description: |- (Boolean) Commits pushed to matching branches must have verified signatures. Commits pushed to matching branches must have verified signatures. type: boolean requiredStatusChecks: description: |- (Block List, Max: 1) 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. (see below for nested schema) 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. items: properties: doNotEnforceOnCreate: description: |- (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to false. Allow repositories and branches to be created if a check would otherwise prohibit it. type: boolean requiredCheck: description: |- (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) Status checks that are required. Several can be defined. items: properties: context: description: |- (String) The status check context name that must be present on the commit. The status check context name that must be present on the commit. type: string integrationId: description: |- (Number) The optional integration ID that this status check must originate from. The optional integration ID that this status check must originate from. format: int64 type: integer type: object type: array strictRequiredStatusChecksPolicy: description: |- (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to false. Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. type: boolean type: object type: array requiredWorkflows: description: |- (Block List, Max: 1) Define which Actions workflows must pass before changes can be merged into a branch matching the rule. Multiple workflows can be specified. (see below for nested schema) Choose which Actions workflows must pass before branches can be merged into a branch that matches this rule. items: properties: doNotEnforceOnCreate: description: |- (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to false. Allow repositories and branches to be created if a check would otherwise prohibit it. type: boolean requiredWorkflow: description: |- (Block Set, Min: 1) Actions workflows that are required. Multiple can be defined. (see below for nested schema) Actions workflows that are required. Several can be defined. items: properties: path: description: |- (String) The path to the YAML definition file of the workflow. The path to the workflow YAML definition file. type: string ref: description: |- (String) The optional ref from which to fetch the workflow. Defaults to master. The ref (branch or tag) of the workflow file to use. type: string repositoryId: description: |- (Number) The ID of the repository. Names, full names and repository URLs are not supported. The repository in which the workflow is defined. format: int64 type: integer type: object type: array type: object type: array tagNamePattern: description: |- (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with branch_name_pattern as it only applies to rulesets with target tag. (see below for nested schema) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. items: properties: name: description: |- (String) How this rule will appear to users. How this rule will appear to users. type: string negate: description: |- (Boolean) If true, the rule will fail if the pattern matches. If true, the rule will fail if the pattern matches. type: boolean operator: description: |- (String) The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex. The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. type: string pattern: description: |- (String) The pattern to match with. The pattern to match with. type: string type: object type: array update: description: |- (Boolean) Only allow users with bypass permission to update matching refs. Only allow users with bypass permission to update matching refs. type: boolean type: object type: array target: description: |- (String) Possible values are branch, tag and push. The target of the ruleset. Possible values are branch, tag and push. type: string type: object managementPolicies: default: - '*' description: |- THIS IS A BETA FIELD. It is on by default but can be opted out through a Crossplane feature flag. ManagementPolicies specify the array of actions Crossplane is allowed to take on the managed and external resources. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md items: description: |- A ManagementAction represents an action that the Crossplane controllers can take on an external resource. enum: - Observe - Create - Update - Delete - LateInitialize - '*' type: string type: array providerConfigRef: default: kind: ClusterProviderConfig name: default description: |- ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured. properties: kind: description: Kind of the referenced object. type: string name: description: Name of the referenced object. type: string required: - kind - name type: object writeConnectionSecretToRef: description: |- WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. properties: name: description: Name of the secret. type: string required: - name type: object required: - forProvider type: object x-kubernetes-validations: - message: spec.forProvider.enforcement is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.enforcement) || (has(self.initProvider) && has(self.initProvider.enforcement))' - message: spec.forProvider.name is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))' - message: spec.forProvider.rules is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.rules) || (has(self.initProvider) && has(self.initProvider.rules))' - message: spec.forProvider.target is a required parameter rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies || ''Update'' in self.managementPolicies) || has(self.forProvider.target) || (has(self.initProvider) && has(self.initProvider.target))' status: description: OrganizationRulesetStatus defines the observed state of OrganizationRuleset. properties: atProvider: properties: bypassActors: description: |- (Block List) The actors that can bypass the rules in this ruleset. (see below for nested schema) The actors that can bypass the rules in this ruleset. items: properties: actorId: description: |- (Number) The ID of the actor that can bypass a ruleset. Must be omitted for ID-less actor types: OrganizationAdmin, EnterpriseOwner, and DeployKey — the GitHub API does not use an ID for these types and will ignore any value set. The ID of the actor that can bypass a ruleset. Must be omitted for ID-less actor types: `OrganizationAdmin`, `EnterpriseOwner`, and `DeployKey` — the GitHub API does not use an ID for these types and will ignore any value set. format: int64 type: integer actorType: description: |- (String) The type of actor that can bypass a ruleset. Can be one of: RepositoryRole, Team, Integration, OrganizationAdmin, DeployKey, EnterpriseOwner. The type of actor that can bypass a ruleset. Can be one of: `Integration`, `OrganizationAdmin`, `RepositoryRole`, `Team`, `DeployKey`, or `EnterpriseOwner`. type: string bypassMode: description: |- (String) When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: always, pull_request, exempt. When the specified actor can bypass the ruleset. pull_request means that an actor can only bypass rules on pull requests. Can be one of: `always`, `pull_request`, `exempt`. type: string type: object type: array conditions: description: |- (Block List, Max: 1) Parameters for an organization ruleset condition. For branch and tag targets, ref_name is required alongside one of repository_name or repository_id. For push targets, ref_name must NOT be set - only repository_name or repository_id should be used. (see below for nested schema) Parameters for an organization ruleset condition.The branch and tag rulesets conditions object should contain both repository_name and ref_name properties, or both repository_id and ref_name properties, or both repository_property and ref_name properties. The push rulesets conditions object does not require the ref_name property. items: properties: refName: description: |- (Block List, Max: 1) Required for branch and tag targets. Must NOT be set for push targets. (see below for nested schema) Targets refs that match the specified patterns. Required for `branch` and `tag` targets. items: properties: exclude: description: |- (List of String) Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match. items: type: string type: array include: description: |- (List of String) Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~DEFAULT_BRANCH to include the default branch or ~ALL to include all branches. Array of ref names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~DEFAULT_BRANCH` to include the default branch or `~ALL` to include all branches. items: type: string type: array type: object type: array repositoryId: description: |- (List of Number) The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass. The repository IDs that the ruleset applies to. One of these IDs must match for the ruleset to apply. items: format: int64 type: integer type: array repositoryName: description: |- (Block List, Max: 1) Targets repositories that match the specified name patterns. (see below for nested schema) Targets repositories that match the specified name patterns. items: properties: exclude: description: |- (List of String) Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match. Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match. items: type: string type: array include: description: |- (List of String) Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts ~ALL to include all repositories. Array of repository names or patterns to include. One of these patterns must match for the condition to pass. Also accepts `~ALL` to include all repositories. items: type: string type: array protected: description: |- (Boolean) Whether renaming of target repositories is prevented. Defaults to false. Whether renaming of target repositories is prevented. type: boolean type: object type: array repositoryProperty: description: |- (Block List, Max: 1) Targets repositories by custom or system properties. (see below for nested schema) Conditions to target repositories by custom or system properties. items: properties: exclude: description: |- (List of Repository Properties) The repository properties and values to exclude. The condition will not pass if any of these properties match. (see below for nested schema) The repository properties and values to exclude. The ruleset will not apply if any of these properties match. items: properties: name: description: |- (String) How this rule will appear to users. The name of the repository property to target. type: string propertyValues: description: |- (Array of String) The values to match for the repository property. The values to match for the repository property. items: type: string type: array source: description: |- (String) The source of the repository property. Defaults to 'custom' if not specified. Can be one of: custom, system The source of the repository property. Defaults to 'custom' if not specified. Can be one of: custom, system type: string type: object type: array include: description: |- (List of Repository Properties) The repository properties and values to include. All of these properties must match for the condition to pass. (see below for nested schema) The repository properties and values to include. All of these properties must match for the condition to pass. items: properties: name: description: |- (String) How this rule will appear to users. The name of the repository property to target. type: string propertyValues: description: |- (Array of String) The values to match for the repository property. The values to match for the repository property. items: type: string type: array source: description: |- (String) The source of the repository property. Defaults to 'custom' if not specified. Can be one of: custom, system The source of the repository property. Defaults to 'custom' if not specified. Can be one of: custom, system type: string type: object type: array type: object type: array type: object type: array enforcement: description: |- (String) Possible values for Enforcement are disabled, active, evaluate. Note: evaluate is currently only supported for owners of type organization. The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Possible values are `disabled`, `active`, and `evaluate`. Note: `evaluate` is only available for Enterprise plans. type: string etag: description: |- (String) An etag representing the ruleset for caching purposes. type: string id: description: (Number) The ID of the reviewer (Team ID). type: string name: description: |- (String) The name of the ruleset. The name of the ruleset. type: string nodeId: description: |- (String) GraphQL global node id for use with v4 API. GraphQL global node id for use with v4 API. type: string rules: description: |- (Block List, Min: 1, Max: 1) Rules within the ruleset. (see below for nested schema) Rules within the ruleset. items: properties: branchNamePattern: description: |- (Block List, Max: 1) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with tag_name_pattern as it only applies to rulesets with target branch. (see below for nested schema) Parameters to be used for the branch_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `tag_name_pattern` as it only applies to rulesets with target `branch`. items: properties: name: description: |- (String) How this rule will appear to users. How this rule will appear to users. type: string negate: description: |- (Boolean) If true, the rule will fail if the pattern matches. If true, the rule will fail if the pattern matches. type: boolean operator: description: |- (String) The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex. The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. type: string pattern: description: |- (String) The pattern to match with. The pattern to match with. type: string type: object type: array commitAuthorEmailPattern: description: |- (Block List, Max: 1) Parameters to be used for the commit_author_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) Parameters to be used for the commit_author_email_pattern rule. items: properties: name: description: |- (String) How this rule will appear to users. How this rule will appear to users. type: string negate: description: |- (Boolean) If true, the rule will fail if the pattern matches. If true, the rule will fail if the pattern matches. type: boolean operator: description: |- (String) The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex. The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. type: string pattern: description: |- (String) The pattern to match with. The pattern to match with. type: string type: object type: array commitMessagePattern: description: |- (Block List, Max: 1) Parameters to be used for the commit_message_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) Parameters to be used for the commit_message_pattern rule. items: properties: name: description: |- (String) How this rule will appear to users. How this rule will appear to users. type: string negate: description: |- (Boolean) If true, the rule will fail if the pattern matches. If true, the rule will fail if the pattern matches. type: boolean operator: description: |- (String) The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex. The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. type: string pattern: description: |- (String) The pattern to match with. The pattern to match with. type: string type: object type: array committerEmailPattern: description: |- (Block List, Max: 1) Parameters to be used for the committer_email_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. (see below for nested schema) Parameters to be used for the committer_email_pattern rule. items: properties: name: description: |- (String) How this rule will appear to users. How this rule will appear to users. type: string negate: description: |- (Boolean) If true, the rule will fail if the pattern matches. If true, the rule will fail if the pattern matches. type: boolean operator: description: |- (String) The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex. The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. type: string pattern: description: |- (String) The pattern to match with. The pattern to match with. type: string type: object type: array copilotCodeReview: description: |- (Block List, Max: 1) Automatically request Copilot code review for new pull requests if the author has access to Copilot code review and their premium requests quota has not reached the limit. (see below for nested schema) Automatically request Copilot code review for new pull requests if the author has access to Copilot code review and their premium requests quota has not reached the limit. items: properties: reviewDraftPullRequests: description: |- (Boolean) Copilot automatically reviews draft pull requests before they are marked as ready for review. Defaults to false. Copilot automatically reviews draft pull requests before they are marked as ready for review. Defaults to `false`. type: boolean reviewOnPush: description: |- (Boolean) Copilot automatically reviews each new push to the pull request. Defaults to false. Copilot automatically reviews each new push to the pull request. Defaults to `false`. type: boolean type: object type: array creation: description: |- (Boolean) Only allow users with bypass permission to create matching refs. Only allow users with bypass permission to create matching refs. type: boolean deletion: description: |- (Boolean) Only allow users with bypass permissions to delete matching refs. Only allow users with bypass permissions to delete matching refs. type: boolean fileExtensionRestriction: description: |- (Block List, Max: 1) Prevent commits that include files with specified file extensions from being pushed to the commit graph. This rule only applies to rulesets with target push. (see below for nested schema) Prevent pushes based on file extensions. items: properties: restrictedFileExtensions: description: |- (Block Set, Min: 1) The file extensions that are restricted from being pushed to the commit graph. The file extensions that are restricted from being pushed to the commit graph. items: type: string type: array x-kubernetes-list-type: set type: object type: array filePathRestriction: description: |- (Block List, Max: 1) Prevent commits that include changes to specified file paths from being pushed to the commit graph. This rule only applies to rulesets with target push. (see below for nested schema) Prevent commits that include changes in specified file paths from being pushed to the commit graph. items: properties: restrictedFilePaths: description: |- (Block Set, Min: 1) The file paths that are restricted from being pushed to the commit graph. The file paths that are restricted from being pushed to the commit graph. items: type: string type: array type: object type: array maxFilePathLength: description: |- (Block List, Max: 1) Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph. This rule only applies to rulesets with target push. (see below for nested schema) Prevent pushes based on file path length. items: properties: maxFilePathLength: description: |- (Integer) The maximum number of characters allowed in file paths. The maximum allowed length of a file path. format: int64 type: integer type: object type: array maxFileSize: description: |- (Block List, Max: 1) Prevent commits that include files with a specified file size from being pushed to the commit graph. This rule only applies to rulesets with target push. (see below for nested schema) Prevent pushes based on file size. items: properties: maxFileSize: description: |- (Integer) The maximum allowed size, in megabytes (MB), of a file. Valid range is 1-100 MB. The maximum allowed size of a file in megabytes (MB). Valid range is 1-100 MB. format: int64 type: integer type: object type: array nonFastForward: description: |- (Boolean) Prevent users with push access from force pushing to branches. Prevent users with push access from force pushing to refs. type: boolean pullRequest: description: |- (Block List, Max: 1) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. (see below for nested schema) Require all commits be made to a non-target branch and submitted via a pull request before they can be merged. items: properties: allowedMergeMethods: description: |- (List of String, Min: 1) Array of merge methods to be allowed. Allowed values include merge, squash, and rebase. At least one must be enabled. Array of allowed merge methods. Allowed values include `merge`, `squash`, and `rebase`. At least one option must be enabled. items: type: string type: array dismissStaleReviewsOnPush: description: |- (Boolean) New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to false. New, reviewable commits pushed will dismiss previous pull request review approvals. Defaults to `false`. type: boolean requireCodeOwnerReview: description: |- (Boolean) Require an approving review in pull requests that modify files that have a designated code owner. Defaults to false. Require an approving review in pull requests that modify files that have a designated code owner. Defaults to `false`. type: boolean requireLastPushApproval: description: |- (Boolean) Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to false. Whether the most recent reviewable push must be approved by someone other than the person who pushed it. Defaults to `false`. type: boolean requiredApprovingReviewCount: description: |- (Number) The number of approving reviews that are required before a pull request can be merged. Defaults to 0. The number of approving reviews that are required before a pull request can be merged. Defaults to `0`. format: int64 type: integer requiredReviewThreadResolution: description: |- (Boolean) All conversations on code must be resolved before a pull request can be merged. Defaults to false. All conversations on code must be resolved before a pull request can be merged. Defaults to `false`. type: boolean requiredReviewers: description: |- (Block List) Require specific reviewers to approve pull requests. Note: This feature is in beta. (see below for nested schema) Require specific reviewers to approve pull requests targeting matching branches. Note: This feature is in beta and subject to change. items: properties: filePatterns: description: |- (List of String) File patterns (fnmatch syntax) that this reviewer must approve. File patterns (fnmatch syntax) that this reviewer must approve. items: type: string type: array minimumApprovals: description: |- (Number) Minimum number of approvals required from this reviewer. Set to 0 to make approval optional. Minimum number of approvals required from this reviewer. Set to 0 to make approval optional. format: int64 type: integer reviewer: description: |- (Block List, Max: 1) The reviewer that must review matching files. (see below for nested schema) The reviewer that must review matching files. items: properties: id: description: |- (Number) The ID of the reviewer (Team ID). The ID of the reviewer that must review. format: int64 type: integer type: description: |- (String) The type of reviewer. Currently only Team is supported. The type of reviewer. Currently only `Team` is supported. type: string type: object type: array type: object type: array type: object type: array requiredCodeScanning: description: |- (Block List, Max: 1) Define which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. Multiple code scanning tools can be specified. (see below for nested schema) Choose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated. items: properties: requiredCodeScanningTool: description: |- (Block Set, Min: 1) Actions code scanning tools that are required. Multiple can be defined. (see below for nested schema) Tools that must provide code scanning results for this rule to pass. items: properties: alertsThreshold: description: |- (String) The severity level at which code scanning results that raise alerts block a reference update. Can be one of: none, errors, errors_and_warnings, all. The severity level at which code scanning results that raise alerts block a reference update. Can be one of: `none`, `errors`, `errors_and_warnings`, `all`. type: string securityAlertsThreshold: description: |- (String) The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: none, critical, high_or_higher, medium_or_higher, all. The severity level at which code scanning results that raise security alerts block a reference update. Can be one of: `none`, `critical`, `high_or_higher`, `medium_or_higher`, `all`. type: string tool: description: |- (String) The name of a code scanning tool. The name of a code scanning tool. type: string type: object type: array type: object type: array requiredLinearHistory: description: |- (Boolean) Prevent merge commits from being pushed to matching branches. Prevent merge commits from being pushed to matching branches. type: boolean requiredSignatures: description: |- (Boolean) Commits pushed to matching branches must have verified signatures. Commits pushed to matching branches must have verified signatures. type: boolean requiredStatusChecks: description: |- (Block List, Max: 1) 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. (see below for nested schema) 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. items: properties: doNotEnforceOnCreate: description: |- (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to false. Allow repositories and branches to be created if a check would otherwise prohibit it. type: boolean requiredCheck: description: |- (Block Set, Min: 1) Status checks that are required. Several can be defined. (see below for nested schema) Status checks that are required. Several can be defined. items: properties: context: description: |- (String) The status check context name that must be present on the commit. The status check context name that must be present on the commit. type: string integrationId: description: |- (Number) The optional integration ID that this status check must originate from. The optional integration ID that this status check must originate from. format: int64 type: integer type: object type: array strictRequiredStatusChecksPolicy: description: |- (Boolean) Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to false. Whether pull requests targeting a matching branch must be tested with the latest code. This setting will not take effect unless at least one status check is enabled. Defaults to `false`. type: boolean type: object type: array requiredWorkflows: description: |- (Block List, Max: 1) Define which Actions workflows must pass before changes can be merged into a branch matching the rule. Multiple workflows can be specified. (see below for nested schema) Choose which Actions workflows must pass before branches can be merged into a branch that matches this rule. items: properties: doNotEnforceOnCreate: description: |- (Boolean) Allow repositories and branches to be created if a check would otherwise prohibit it. Defaults to false. Allow repositories and branches to be created if a check would otherwise prohibit it. type: boolean requiredWorkflow: description: |- (Block Set, Min: 1) Actions workflows that are required. Multiple can be defined. (see below for nested schema) Actions workflows that are required. Several can be defined. items: properties: path: description: |- (String) The path to the YAML definition file of the workflow. The path to the workflow YAML definition file. type: string ref: description: |- (String) The optional ref from which to fetch the workflow. Defaults to master. The ref (branch or tag) of the workflow file to use. type: string repositoryId: description: |- (Number) The ID of the repository. Names, full names and repository URLs are not supported. The repository in which the workflow is defined. format: int64 type: integer type: object type: array type: object type: array tagNamePattern: description: |- (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with branch_name_pattern as it only applies to rulesets with target tag. (see below for nested schema) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applies to rulesets with target `tag`. items: properties: name: description: |- (String) How this rule will appear to users. How this rule will appear to users. type: string negate: description: |- (Boolean) If true, the rule will fail if the pattern matches. If true, the rule will fail if the pattern matches. type: boolean operator: description: |- (String) The operator to use for matching. Can be one of: starts_with, ends_with, contains, regex. The operator to use for matching. Can be one of: `starts_with`, `ends_with`, `contains`, `regex`. type: string pattern: description: |- (String) The pattern to match with. The pattern to match with. type: string type: object type: array update: description: |- (Boolean) Only allow users with bypass permission to update matching refs. Only allow users with bypass permission to update matching refs. type: boolean type: object type: array rulesetId: description: |- (Number) GitHub ID for the ruleset. GitHub ID for the ruleset. format: int64 type: integer target: description: |- (String) Possible values are branch, tag and push. The target of the ruleset. Possible values are branch, tag and push. type: string type: object conditions: description: Conditions of the resource. items: description: A Condition that may apply to a resource. properties: lastTransitionTime: description: |- LastTransitionTime is the last time this condition transitioned from one status to another. format: date-time type: string message: description: |- A Message containing details about this condition's last transition from one status to another, if any. type: string observedGeneration: description: |- ObservedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance. format: int64 type: integer reason: description: A Reason for this condition's last transition from one status to another. type: string status: description: Status of this condition; is it currently True, False, or Unknown? type: string type: description: |- Type of this condition. At most one of each condition type may apply to a resource at any point in time. type: string required: - lastTransitionTime - reason - status - type type: object type: array x-kubernetes-list-map-keys: - type x-kubernetes-list-type: map lastHandledReconcileAt: description: |- LastHandledReconcileAt holds the value of the most recent reconcile-requested-at annotation token that the controller has processed. Users can compare this to the annotation to determine whether a reconcile request has been handled. type: string observedGeneration: description: |- ObservedGeneration is the latest metadata.generation which resulted in either a ready state, or stalled due to error it can not recover from without human intervention. format: int64 type: integer type: object required: - spec type: object served: true storage: true subresources: status: {}