{ "name": "GithubManageEnvironment", "fully_qualified_name": "GithubApi.GithubManageEnvironment@0.1.0", "description": "Create or update a GitHub environment with protection rules.\n\nUse this tool to create or update a GitHub environment, applying protection rules like required reviewers. Ensure you authenticate with an access token with the `repo` scope. GitHub Apps need `administration:write` permission for the repository.", "toolkit": { "name": "ArcadeGithubApi", "description": null, "version": "0.1.0" }, "input": { "parameters": [ { "name": "repository_owner", "required": true, "description": "The account owner of the repository. The name is not case sensitive.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The account owner of the repository. The name is not case sensitive." }, "inferrable": true, "http_endpoint_parameter_name": "owner" }, { "name": "repository_name", "required": true, "description": "The name of the GitHub repository. This value is not case sensitive.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The name of the repository. The name is not case sensitive." }, "inferrable": true, "http_endpoint_parameter_name": "repo" }, { "name": "environment_name", "required": true, "description": "The name of the GitHub environment to create or update. This should be a string that accurately identifies the environment within the repository.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The name of the environment." }, "inferrable": true, "http_endpoint_parameter_name": "environment_name" }, { "name": "environment_configuration", "required": false, "description": "JSON configuration for the environment, including deployment branch policy, reviewers, and wait timer. Use properties like 'deployment_branch_policy', 'reviewers', and 'wait_timer' to set specific rules.", "value_schema": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "deployment_branch_policy": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "custom_branch_policies": { "val_type": "boolean", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`." }, "protected_branches": { "val_type": "boolean", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`." } }, "inner_properties": null, "description": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`." }, "reviewers": { "val_type": "array", "inner_val_type": "json", "enum": null, "properties": null, "inner_properties": { "id": { "val_type": "integer", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The id of the user or team who can review the deployment" }, "type": { "val_type": "string", "inner_val_type": null, "enum": [ "User", "Team" ], "properties": null, "inner_properties": null, "description": "The type of reviewer." } }, "description": "The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed." }, "wait_timer": { "val_type": "integer", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days)." } }, "inner_properties": null, "description": "" }, "inferrable": true, "http_endpoint_parameter_name": "requestBody" } ] }, "output": { "description": "Response from the API endpoint 'repos/create-or-update-environment'.", "available_modes": [ "value", "error", "null" ], "value_schema": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": null } }, "requirements": { "authorization": { "provider_id": "arcade-github", "provider_type": "oauth2", "id": null, "oauth2": null }, "secrets": [ { "key": "GIT_SERVER_URL" } ], "metadata": null }, "deprecation_message": null, "metadata": { "object_type": "api_wrapper_tool", "version": "1.1.0", "description": "Tools that enable LLMs to interact directly with the GitHub API." }, "http_endpoint": { "metadata": { "object_type": "http_endpoint", "version": "1.2.0", "description": "" }, "url": "{git_server_url}/api/v3/repos/{owner}/{repo}/environments/{environment_name}", "http_method": "PUT", "headers": {}, "parameters": [ { "name": "owner", "tool_parameter_name": "repository_owner", "description": "The account owner of the repository. The name is not case sensitive.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The account owner of the repository. The name is not case sensitive." }, "accepted_as": "path", "required": true, "deprecated": false, "default": null, "documentation_urls": [] }, { "name": "repo", "tool_parameter_name": "repository_name", "description": "The name of the repository. The name is not case sensitive.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The name of the repository. The name is not case sensitive." }, "accepted_as": "path", "required": true, "deprecated": false, "default": null, "documentation_urls": [] }, { "name": "environment_name", "tool_parameter_name": "environment_name", "description": "The name of the environment.", "value_schema": { "val_type": "string", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The name of the environment." }, "accepted_as": "path", "required": true, "deprecated": false, "default": null, "documentation_urls": [] }, { "name": "requestBody", "tool_parameter_name": "environment_configuration", "description": "", "value_schema": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "deployment_branch_policy": { "val_type": "json", "inner_val_type": null, "enum": null, "properties": { "custom_branch_policies": { "val_type": "boolean", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`." }, "protected_branches": { "val_type": "boolean", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`." } }, "inner_properties": null, "description": "The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`." }, "reviewers": { "val_type": "array", "inner_val_type": "json", "enum": null, "properties": null, "inner_properties": { "id": { "val_type": "integer", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The id of the user or team who can review the deployment" }, "type": { "val_type": "string", "inner_val_type": null, "enum": [ "User", "Team" ], "properties": null, "inner_properties": null, "description": "The type of reviewer." } }, "description": "The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed." }, "wait_timer": { "val_type": "integer", "inner_val_type": null, "enum": null, "properties": null, "inner_properties": null, "description": "The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days)." } }, "inner_properties": null, "description": "" }, "accepted_as": "body", "required": false, "deprecated": false, "default": null, "documentation_urls": [] } ], "documentation_urls": [], "secrets": [ { "arcade_key": "GIT_SERVER_URL", "parameter_name": "git_server_url", "accepted_as": "path", "formatted_value": null, "description": "", "is_auth_token": false }, { "arcade_key": "auth_token", "parameter_name": "Authorization", "accepted_as": "header", "formatted_value": "Bearer {authorization}", "description": "The OAuth token to use for authentication.", "is_auth_token": true } ], "request_body_spec": "{\n \"content\": {\n \"application/json\": {\n \"examples\": {\n \"default\": {\n \"value\": {\n \"deployment_branch_policy\": {\n \"custom_branch_policies\": true,\n \"protected_branches\": false\n },\n \"reviewers\": [\n {\n \"id\": 1,\n \"type\": \"User\"\n },\n {\n \"id\": 1,\n \"type\": \"Team\"\n }\n ],\n \"wait_timer\": 30\n }\n }\n },\n \"schema\": {\n \"additionalProperties\": false,\n \"nullable\": true,\n \"properties\": {\n \"deployment_branch_policy\": {\n \"description\": \"The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`.\",\n \"nullable\": true,\n \"properties\": {\n \"custom_branch_policies\": {\n \"description\": \"Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`.\",\n \"type\": \"boolean\"\n },\n \"protected_branches\": {\n \"description\": \"Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`.\",\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"protected_branches\",\n \"custom_branch_policies\"\n ],\n \"type\": \"object\"\n },\n \"reviewers\": {\n \"description\": \"The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.\",\n \"items\": {\n \"properties\": {\n \"id\": {\n \"description\": \"The id of the user or team who can review the deployment\",\n \"example\": 4532992,\n \"type\": \"integer\"\n },\n \"type\": {\n \"description\": \"The type of reviewer.\",\n \"enum\": [\n \"User\",\n \"Team\"\n ],\n \"example\": \"User\",\n \"type\": \"string\"\n }\n },\n \"type\": \"object\"\n },\n \"nullable\": true,\n \"type\": \"array\"\n },\n \"wait_timer\": {\n \"description\": \"The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days).\",\n \"example\": 30,\n \"type\": \"integer\"\n }\n },\n \"type\": \"object\"\n }\n }\n },\n \"required\": false\n}", "use_request_body_schema_mode": true, "validate_request_body_schema": true } }