environments
Overview
Name | environments |
Type | Resource |
Id | github.repos.environments |
Fields
Name | Datatype | Description |
---|---|---|
id | integer | The id of the environment. |
name | string | The name of the environment. |
created_at | string | The time that the environment was created, in ISO 8601 format. |
deployment_branch_policy | object | The type of deployment branch policy for this environment. To allow all branches to deploy, set to null . |
html_url | string | |
node_id | string | |
protection_rules | array | Built-in deployment protection rules for the environment. |
updated_at | string | The time that the environment was last updated, in ISO 8601 format. |
url | string |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get_all_environments | SELECT | owner, repo | Lists the environments for a repository. Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the repo scope. GitHub Apps must have the actions:read permission to use this endpoint. |
get_environment | SELECT | environment_name, owner, repo | Note: To get information about name patterns that branches must match in order to deploy to this environment, see "Get a deployment branch policy." Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the repo scope. GitHubApps must have the actions:read permission to use this endpoint. |
create_or_update_environment | INSERT | environment_name, owner, repo | Create or update an environment with protection rules, such as required reviewers. For more information about environment protection rules, see "Environments." Note: To create or update name patterns that branches must match in order to deploy to this environment, see "Deployment branch policies." Note: To create or update secrets for an environment, see "GitHub Actions secrets." You must authenticate using an access token with the repo scope to use this endpoint. GitHub Apps must have the administration:write permission for the repository to use this endpoint. |
delete_an_environment | DELETE | environment_name, owner, repo | You must authenticate using an access token with the repo scope to use this endpoint. |