diff --git a/scripts/update-endpoints/generated/endpoints.json b/scripts/update-endpoints/generated/endpoints.json index 284fd289..02864e9a 100644 --- a/scripts/update-endpoints/generated/endpoints.json +++ b/scripts/update-endpoints/generated/endpoints.json @@ -15031,7 +15031,7 @@ "responses": [ { "code": 201, - "schema": "{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"RepositoryRole\",\"Team\",\"Integration\",\"OrganizationAdmin\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}" + "schema": "{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"Integration\",\"OrganizationAdmin\",\"RepositoryRole\",\"Team\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}" }, { "code": 404, @@ -15187,7 +15187,7 @@ "responses": [ { "code": 201, - "schema": "{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"RepositoryRole\",\"Team\",\"Integration\",\"OrganizationAdmin\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}" + "schema": "{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"Integration\",\"OrganizationAdmin\",\"RepositoryRole\",\"Team\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}" }, { "code": 404, @@ -16658,7 +16658,7 @@ "responses": [ { "code": 200, - "schema": "{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"RepositoryRole\",\"Team\",\"Integration\",\"OrganizationAdmin\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}" + "schema": "{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"Integration\",\"OrganizationAdmin\",\"RepositoryRole\",\"Team\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}" }, { "code": 404, @@ -16680,7 +16680,7 @@ "responses": [ { "code": 200, - "schema": "{\"type\":\"array\",\"items\":{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"RepositoryRole\",\"Team\",\"Integration\",\"OrganizationAdmin\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}}" + "schema": "{\"type\":\"array\",\"items\":{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"Integration\",\"OrganizationAdmin\",\"RepositoryRole\",\"Team\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}}" }, { "code": 404, @@ -17005,7 +17005,7 @@ "responses": [ { "code": 200, - "schema": "{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"RepositoryRole\",\"Team\",\"Integration\",\"OrganizationAdmin\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}" + "schema": "{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"Integration\",\"OrganizationAdmin\",\"RepositoryRole\",\"Team\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}" }, { "code": 404, @@ -17032,7 +17032,7 @@ "responses": [ { "code": 200, - "schema": "{\"type\":\"array\",\"items\":{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"RepositoryRole\",\"Team\",\"Integration\",\"OrganizationAdmin\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}}" + "schema": "{\"type\":\"array\",\"items\":{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"Integration\",\"OrganizationAdmin\",\"RepositoryRole\",\"Team\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}}" }, { "code": 404, @@ -18687,7 +18687,7 @@ "responses": [ { "code": 200, - "schema": "{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"RepositoryRole\",\"Team\",\"Integration\",\"OrganizationAdmin\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}" + "schema": "{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"Integration\",\"OrganizationAdmin\",\"RepositoryRole\",\"Team\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}" }, { "code": 404, @@ -18828,7 +18828,7 @@ "responses": [ { "code": 200, - "schema": "{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"RepositoryRole\",\"Team\",\"Integration\",\"OrganizationAdmin\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}" + "schema": "{\"title\":\"Repository ruleset\",\"type\":\"object\",\"description\":\"A set of rules to apply when specified conditions are met.\",\"required\":[\"id\",\"name\",\"source\",\"enforcement\"],\"properties\":{\"id\":{\"type\":\"integer\",\"description\":\"The ID of the ruleset\"},\"name\":{\"type\":\"string\",\"description\":\"The name of the ruleset\"},\"target\":{\"type\":\"string\",\"description\":\"The target of the ruleset\",\"enum\":[\"branch\",\"tag\"]},\"source_type\":{\"type\":\"string\",\"description\":\"The type of the source of the ruleset\",\"enum\":[\"Repository\",\"Organization\"]},\"source\":{\"type\":\"string\",\"description\":\"The name of the source\"},\"enforcement\":{\"type\":\"string\",\"description\":\"The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page (`evaluate` is only available with GitHub Enterprise).\",\"enum\":[\"disabled\",\"active\",\"evaluate\"]},\"bypass_actors\":{\"type\":\"array\",\"description\":\"The actors that can bypass the rules in this ruleset\",\"items\":{\"title\":\"Repository Ruleset Bypass Actor\",\"type\":\"object\",\"description\":\"An actor that can bypass rules in a ruleset\",\"required\":[\"actor_id\",\"actor_type\",\"bypass_mode\"],\"properties\":{\"actor_id\":{\"type\":\"integer\",\"description\":\"The ID of the actor that can bypass a ruleset. If `actor_type` is `OrganizationAdmin`, this should be `1`.\"},\"actor_type\":{\"type\":\"string\",\"enum\":[\"Integration\",\"OrganizationAdmin\",\"RepositoryRole\",\"Team\"],\"description\":\"The type of actor that can bypass a ruleset\"},\"bypass_mode\":{\"type\":\"string\",\"description\":\"When the specified actor can bypass the ruleset. `pull_request` means that an actor can only bypass rules on pull requests.\",\"enum\":[\"always\",\"pull_request\"]}}}},\"current_user_can_bypass\":{\"type\":\"string\",\"description\":\"The bypass type of the user making the API request for this ruleset. This field is only returned when\\nquerying the repository-level endpoint.\",\"enum\":[\"always\",\"pull_requests_only\",\"never\"]},\"node_id\":{\"type\":\"string\"},\"_links\":{\"type\":\"object\",\"properties\":{\"self\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The URL of the ruleset\"}}},\"html\":{\"type\":\"object\",\"properties\":{\"href\":{\"type\":\"string\",\"description\":\"The html URL of the ruleset\"}}}}},\"conditions\":{\"nullable\":true,\"anyOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Organization ruleset conditions\",\"type\":\"object\",\"description\":\"Conditions for an organization ruleset. The conditions object should contain both `repository_name` and `ref_name` properties or both `repository_id` and `ref_name` properties.\\n\",\"oneOf\":[{\"type\":\"object\",\"title\":\"repository_name_and_ref_name\",\"description\":\"Conditions to target repositories by name and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository names\",\"type\":\"object\",\"description\":\"Parameters for a repository name condition\",\"properties\":{\"repository_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of repository names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}},\"protected\":{\"type\":\"boolean\",\"description\":\"Whether renaming of target repositories is prevented.\"}}}},\"required\":[\"repository_name\"]}]},{\"type\":\"object\",\"title\":\"repository_id_and_ref_name\",\"description\":\"Conditions to target repositories by id and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository IDs\",\"type\":\"object\",\"description\":\"Parameters for a repository ID condition\",\"properties\":{\"repository_id\":{\"type\":\"object\",\"properties\":{\"repository_ids\":{\"type\":\"array\",\"description\":\"The repository IDs that the ruleset applies to. One of these IDs must match for the condition to pass.\",\"items\":{\"type\":\"integer\"}}}}},\"required\":[\"repository_id\"]}]},{\"type\":\"object\",\"title\":\"repository_property_and_ref_name\",\"description\":\"Conditions to target repositories by property and refs by name\",\"allOf\":[{\"title\":\"Repository ruleset conditions for ref names\",\"type\":\"object\",\"description\":\"Parameters for a repository ruleset ref name condition\",\"properties\":{\"ref_name\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"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\"}},\"exclude\":{\"type\":\"array\",\"description\":\"Array of ref names or patterns to exclude. The condition will not pass if any of these patterns match.\",\"items\":{\"type\":\"string\"}}}}}},{\"title\":\"Repository ruleset conditions for repository properties\",\"type\":\"object\",\"description\":\"Parameters for a repository property condition\",\"properties\":{\"repository_property\":{\"type\":\"object\",\"properties\":{\"include\":{\"type\":\"array\",\"description\":\"The repository properties and values to include. All of these properties must match for the condition to pass.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}},\"exclude\":{\"type\":\"array\",\"description\":\"The repository properties and values to exclude. The condition will not pass if any of these properties match.\",\"items\":{\"title\":\"Repository ruleset property targeting definition\",\"type\":\"object\",\"description\":\"Parameters for a targeting a repository property\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"The name of the repository property to target\"},\"property_values\":{\"type\":\"array\",\"description\":\"The values to match for the repository property\",\"items\":{\"type\":\"string\"}}},\"required\":[\"name\",\"property_values\"]}}}}},\"required\":[\"repository_property\"]}]}]}]},\"rules\":{\"type\":\"array\",\"items\":{\"title\":\"Repository Rule\",\"type\":\"object\",\"description\":\"A repository rule.\",\"oneOf\":[{\"title\":\"creation\",\"description\":\"Only allow users with bypass permission to create matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"creation\"]}}},{\"title\":\"update\",\"description\":\"Only allow users with bypass permission to update matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"update\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"update_allows_fetch_and_merge\":{\"type\":\"boolean\",\"description\":\"Branch can pull changes from its upstream repository\"}},\"required\":[\"update_allows_fetch_and_merge\"]}}},{\"title\":\"deletion\",\"description\":\"Only allow users with bypass permissions to delete matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"deletion\"]}}},{\"title\":\"required_linear_history\",\"description\":\"Prevent merge commits from being pushed to matching refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_linear_history\"]}}},{\"title\":\"required_deployments\",\"description\":\"Choose which environments must be successfully deployed to before refs can be pushed into a ref that matches this rule.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_deployments\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_deployment_environments\":{\"type\":\"array\",\"description\":\"The environments that must be successfully deployed to before branches can be merged.\",\"items\":{\"type\":\"string\"}}},\"required\":[\"required_deployment_environments\"]}}},{\"title\":\"required_signatures\",\"description\":\"Commits pushed to matching refs must have verified signatures.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_signatures\"]}}},{\"title\":\"pull_request\",\"description\":\"Require all commits be made to a non-target branch and submitted via a pull request before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"pull_request\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"dismiss_stale_reviews_on_push\":{\"type\":\"boolean\",\"description\":\"New, reviewable commits pushed will dismiss previous pull request review approvals.\"},\"require_code_owner_review\":{\"type\":\"boolean\",\"description\":\"Require an approving review in pull requests that modify files that have a designated code owner.\"},\"require_last_push_approval\":{\"type\":\"boolean\",\"description\":\"Whether the most recent reviewable push must be approved by someone other than the person who pushed it.\"},\"required_approving_review_count\":{\"type\":\"integer\",\"description\":\"The number of approving reviews that are required before a pull request can be merged.\",\"minimum\":0,\"maximum\":10},\"required_review_thread_resolution\":{\"type\":\"boolean\",\"description\":\"All conversations on code must be resolved before a pull request can be merged.\"}},\"required\":[\"dismiss_stale_reviews_on_push\",\"require_code_owner_review\",\"require_last_push_approval\",\"required_approving_review_count\",\"required_review_thread_resolution\"]}}},{\"title\":\"required_status_checks\",\"description\":\"Choose which status checks must pass before the ref is updated. When enabled, commits must first be pushed to another ref where the checks pass.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"required_status_checks\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"required_status_checks\":{\"type\":\"array\",\"description\":\"Status checks that are required.\",\"items\":{\"title\":\"StatusCheckConfiguration\",\"description\":\"Required status check\",\"type\":\"object\",\"properties\":{\"context\":{\"type\":\"string\",\"description\":\"The status check context name that must be present on the commit.\"},\"integration_id\":{\"type\":\"integer\",\"description\":\"The optional integration ID that this status check must originate from.\"}},\"required\":[\"context\"]}},\"strict_required_status_checks_policy\":{\"type\":\"boolean\",\"description\":\"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.\"}},\"required\":[\"required_status_checks\",\"strict_required_status_checks_policy\"]}}},{\"title\":\"non_fast_forward\",\"description\":\"Prevent users with push access from force pushing to refs.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"non_fast_forward\"]}}},{\"title\":\"commit_message_pattern\",\"description\":\"Parameters to be used for the commit_message_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_message_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"commit_author_email_pattern\",\"description\":\"Parameters to be used for the commit_author_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"commit_author_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"committer_email_pattern\",\"description\":\"Parameters to be used for the committer_email_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"committer_email_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"branch_name_pattern\",\"description\":\"Parameters to be used for the branch_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"branch_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"tag_name_pattern\",\"description\":\"Parameters to be used for the tag_name_pattern rule\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"tag_name_pattern\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\",\"description\":\"How this rule will appear to users.\"},\"negate\":{\"type\":\"boolean\",\"description\":\"If true, the rule will fail if the pattern matches.\"},\"operator\":{\"type\":\"string\",\"description\":\"The operator to use for matching.\",\"enum\":[\"starts_with\",\"ends_with\",\"contains\",\"regex\"]},\"pattern\":{\"type\":\"string\",\"description\":\"The pattern to match with.\"}},\"required\":[\"operator\",\"pattern\"]}}},{\"title\":\"workflows\",\"description\":\"Require all changes made to a targeted branch to pass the specified workflows before they can be merged.\",\"type\":\"object\",\"required\":[\"type\"],\"properties\":{\"type\":{\"type\":\"string\",\"enum\":[\"workflows\"]},\"parameters\":{\"type\":\"object\",\"properties\":{\"workflows\":{\"type\":\"array\",\"description\":\"Workflows that must pass for this rule to pass.\",\"items\":{\"title\":\"WorkflowFileReference\",\"description\":\"A workflow that must run for this rule to pass\",\"type\":\"object\",\"properties\":{\"path\":{\"type\":\"string\",\"description\":\"The path to the workflow file\"},\"ref\":{\"type\":\"string\",\"description\":\"The ref (branch or tag) of the workflow file to use\"},\"repository_id\":{\"type\":\"integer\",\"description\":\"The ID of the repository where the workflow is defined\"},\"sha\":{\"type\":\"string\",\"description\":\"The commit SHA of the workflow file to use\"}},\"required\":[\"path\",\"repository_id\"]}}},\"required\":[\"workflows\"]}}}]}},\"created_at\":{\"type\":\"string\",\"format\":\"date-time\"},\"updated_at\":{\"type\":\"string\",\"format\":\"date-time\"}}}" }, { "code": 404,