Skip to content

Commit 2003c34

Browse files
authored
Branch was updated using the 'autoupdate branch' Actions workflow.
2 parents 87699fd + 8110a05 commit 2003c34

10 files changed

Lines changed: 61 additions & 24 deletions

File tree

.github/allowed-actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module.exports = [
3333
"rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9",
3434
"rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e",
3535
"repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88",
36-
"repo-sync/pull-request@65194d8015be7624d231796ddee1cd52a5023cb3", // repo-sync/pull-request@v2.6
36+
"repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d",
3737
"someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd",
3838
"tjenkinson/gh-action-auto-merge-dependency-updates@4d7756c04d9d999c5968697a621b81c47f533d61",
3939
"EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575",

.github/workflows/repo-sync.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- name: Create pull request
3434
id: create-pull
35-
uses: repo-sync/pull-request@65194d8015be7624d231796ddee1cd52a5023cb3
35+
uses: repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d
3636
env:
3737
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
3838
with:
@@ -52,22 +52,6 @@ jobs:
5252
base: main
5353
author: Octomerger
5454

55-
# Sometimes the `repo-sync` branch gets created but GitHub thinks a pull
56-
# request is already attached to the branch. This may happen when an
57-
# external contributor creates a pull request for the `repo-sync` branch
58-
# in a fork, then deletes their repository. If there were changes added
59-
# to the `repo-sync` branch but no pull request can be found, we should
60-
# fail. The failure will then be sent to Slack in the last step.
61-
- name: Check for pull request creation errors
62-
if: ${{ !steps.find-pull-request.outputs.number }}
63-
id: check-pr-creation
64-
run: |
65-
LINES_CHANGED=$(git diff --name-only "main" "repo-sync" -- | wc -l | awk '{print $1}')
66-
if [[ "$LINES_CHANGED" != "0" ]]; then
67-
echo 'Unable to create a new PR for the existing branch `repo-sync`. Delete that branch and re-run this workflow to generate a new PR.'
68-
exit 1 # prevents further steps from running
69-
fi
70-
7155
- name: Approve pull request
7256
if: ${{ steps.find-pull-request.outputs.number }}
7357
uses: juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8

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{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.0" %}, repository environments,{% endif %} 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)