Skip to content

Commit c462b14

Browse files
authored
repo sync
2 parents 87699fd + 7f87af1 commit c462b14

8 files changed

Lines changed: 59 additions & 6 deletions

File tree

content/actions/managing-workflow-runs/reviewing-deployments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ versions:
1313

1414
Jobs that reference an environment configured with required reviewers will wait for an approval before starting. While a job is awaiting approval, it has a status of "Waiting". If a job is not approved within 30 days, the workflow run will be automatically canceled.
1515

16-
For more information about environments and required approvals, see "[Environments](/actions/reference/environments)."
16+
For more information about environments and required approvals, see "[Environments](/actions/reference/environments)." For information about how to review deployments with the REST API, see "[Workflow Runs](/rest/reference/actions#workflow-runs)."
1717

1818
### Approving or rejecting a job
1919

content/actions/reference/environments.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Secrets stored in an environment are only available to workflow jobs that refere
5656
1. Enter a name for the environment, then click **Configure environment**. Environment names are not case sensitive. An environment name may not exceed 255 characters and must be unique within the repository.
5757
1. Configure any environment protection rules or environment secrets.
5858

59+
You can also create and configure environments through the REST API. For more information, see "[Environments](/rest/reference/repos#environments)" and "[Secrets](/rest/reference/actions#secrets)."
60+
5961
Running a workflow that references an environment that does not exist will create an environment with the referenced name. The newly created environment will not have any protection rules or secrets configured. Anyone that can edit workflows in the repository can create environments via a workflow file, but only repository admins can configure the environment.
6062

6163
### Referencing an environment
@@ -77,3 +79,5 @@ Deleting an environment will delete all secrets and protection rules associated
7779
{% data reusables.github-actions.sidebar-environment %}
7880
1. Next the the environment that you want to delete, click {% octicon "trashcan" aria-label="The trashcan icon" %}.
7981
2. Click **I understand, delete this environment**.
82+
83+
You can also delete environments through the REST API. For more information, see "[Environments](/rest/reference/repos#environments)."

content/rest/reference/repos.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,15 @@ You can communicate that a transient environment no longer exists by setting its
152152
{% if operation.subcategory == 'deployments' %}{% include rest_operation %}{% endif %}
153153
{% endfor %}
154154

155+
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" %}
156+
## Environments
157+
158+
The Environments API allows you to create, configure, and delete environments. For more information about environments, see "[Environments](/actions/reference/environments)."
159+
{% for operation in currentRestOperations %}
160+
{% if operation.subcategory == 'environments' %}{% include rest_operation %}{% endif %}
161+
{% endfor %}
162+
{% endif %}
163+
155164
## Forks
156165

157166
{% for operation in currentRestOperations %}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Encrypted secrets allow you to store sensitive information, such as access tokens, in your repository or organization.
1+
Encrypted secrets allow you to store sensitive information, such as access tokens, in your repository, repository environments, or organization.

data/reusables/webhooks/check_run_properties.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Key | Type | Description
66
`check_run[conclusion]`|`string` | The result of the completed check run. Can be one of `success`, `failure`, `neutral`, `cancelled`, `timed_out`, {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.19" or currentVersion == "github-ae@latest" %}`action_required` or `stale`{% else %}or `action_required`{% endif %}. This value will be `null` until the check run has `completed`.
77
`check_run[name]`|`string` | The name of the check run.
88
`check_run[check_suite][id]`|`integer` | The id of the check suite that this check run is part of.
9-
`check_run[check_suite][pull_requests]`|`array`| An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty.
9+
`check_run[check_suite][pull_requests]`|`array`| An array of pull requests that match this check suite. A pull request matches a check suite if they have the same `head_sha` and `head_branch`. When the check suite's `head_branch` is in a forked repository it will be `null` and the `pull_requests` array will be empty.{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" %}
10+
`deployment`|`object`| A deployment to a repository environment. This will only be populated if the check run was created by a {% data variables.product.prodname_actions %} workflow job that references an environment.{% endif %}
1011
`requested_action`|`object` | The action requested by the user.
1112
`requested_action[identifier]`|`string` | The integrator reference of the action requested by the user.

lib/webhooks/static/dotcom/check_run.completed.payload.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,20 @@
190190
}
191191
}
192192
}
193-
]
193+
],
194+
"deployment": {
195+
"url": "https://api.github.com/repos/Codertocat/Hello-World/deployments/326191728",
196+
"id": 326191728,
197+
"node_id": "MDEwOkRlcGxveW1lbnQzMjYxOTE3Mjg=",
198+
"task": "deploy",
199+
"original_environment": "lab",
200+
"environment": "lab",
201+
"description": null,
202+
"created_at": "2021-02-18T08:22:48Z",
203+
"updated_at": "2021-02-18T09:47:16Z",
204+
"statuses_url": "https://api.github.com/repos/Codertocat/Hello-World/deployments/326191728/statuses",
205+
"repository_url": "https://api.github.com/repos/Codertocat/Hello-World"
206+
}
194207
},
195208
"repository": {
196209
"id": 186853002,

lib/webhooks/static/dotcom/check_run.created.payload.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,20 @@
190190
}
191191
}
192192
}
193-
]
193+
],
194+
"deployment": {
195+
"url": "https://api.github.com/repos/Codertocat/Hello-World/deployments/326191728",
196+
"id": 326191728,
197+
"node_id": "MDEwOkRlcGxveW1lbnQzMjYxOTE3Mjg=",
198+
"task": "deploy",
199+
"original_environment": "lab",
200+
"environment": "lab",
201+
"description": null,
202+
"created_at": "2021-02-18T08:22:48Z",
203+
"updated_at": "2021-02-18T09:47:16Z",
204+
"statuses_url": "https://api.github.com/repos/Codertocat/Hello-World/deployments/326191728/statuses",
205+
"repository_url": "https://api.github.com/repos/Codertocat/Hello-World"
206+
}
194207
},
195208
"repository": {
196209
"id": 186853002,

lib/webhooks/static/dotcom/check_run.rerequested.payload.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,20 @@
9595
},
9696
"pull_requests": [
9797

98-
]
98+
],
99+
"deployment": {
100+
"url": "https://api.github.com/repos/Codertocat/Hello-World/deployments/326191728",
101+
"id": 326191728,
102+
"node_id": "MDEwOkRlcGxveW1lbnQzMjYxOTE3Mjg=",
103+
"task": "deploy",
104+
"original_environment": "lab",
105+
"environment": "lab",
106+
"description": null,
107+
"created_at": "2021-02-18T08:22:48Z",
108+
"updated_at": "2021-02-18T09:47:16Z",
109+
"statuses_url": "https://api.github.com/repos/Codertocat/Hello-World/deployments/326191728/statuses",
110+
"repository_url": "https://api.github.com/repos/Codertocat/Hello-World"
111+
}
99112
},
100113
"repository": {
101114
"id": 526,

0 commit comments

Comments
 (0)