Skip to content

Commit 4a93123

Browse files
authored
Merge branch 'main' into update-webpack-dep
2 parents 1c5cd44 + 77641dc commit 4a93123

File tree

161 files changed

+374491
-161066
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+374491
-161066
lines changed

.github/ISSUE_COMMENT_TEMPLATE/quick-status.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ body:
1414
value: 'Status: YELLOW'
1515
- label: "RED \U0001F534 (BLOCKED)"
1616
value: 'Status: RED'
17+
- label: "BLACK ⚫️ (We shipped it \U0001F389)"
18+
value: 'Status: BLACK'
1719
- type: textarea
1820
attributes:
1921
label: Update Summary

.github/actions-scripts/enterprise-server-issue-templates/release-issue.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,21 @@
3434
```
3535
☝️ This will run a workflow **on every push to the PR** that will sync **only** the English index for the new version to Algolia. This will make the GHES content searchable on staging throughout content creation, and will ensure the search updates go live at the same time the content is published. See [`contributing/search.md`](https://github.com/github/docs-internal/blob/main/contributing/search.md) for details.
3636
37-
- [ ] Create an OpenAPI topic branch
38-
39-
This branch is used to avoid propagating the OpenAPI dev mode check CI test failure in all of the branches. All changes that affect the OpenAPI schema should branch off of this topic branch. The tests should all be passing before the OpenAPI topic branch is merged into the megabranch.
40-
41-
For more information about how OpenAPI changes are published to docs.github.com, see [Publishing REST API changes to docs.github.com](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/publishing-documentation/publishing-REST-api-docs.md#publishing-rest-api-changes-to-docsgithubcom).
42-
4337
- [ ] In `github/github`, to create a new GHES release follow these steps:
4438
- [ ] Copy the previous release's root document to a new root document for this release `cp app/api/description/ghes-<LATEST RELEASE NUMBER>.yaml app/api/description/ghes-<NEXT RELEASE NUMBER>.yaml`.
4539
- [ ] Update the `externalDocs.url` property in that file to use the new GHES release number.
4640
- [ ] Copy the previous release's configuration file to a new configuration file for this release `cp app/api/description/config/releases/ghes-<LATEST RELEASE NUMBER>.yaml app/api/description/config/releases/ghes-<NEXT RELEASE NUMBER>.yaml`.
4741
- [ ] Update the `variables.externalDocsUrl`, `variables.ghesVersion`, and `patch.[].value.url` in that file to use the new GHES release number.
4842
- [ ] Update `published` in that file to `false`. **Note:** This is important to ensure that 3.1 OpenAPI changes are not made public until 3.1 is released.
4943
44+
#### Troubleshooting
45+
46+
If the `OpenAPI dev mode check / check-schema-versions` check fails on the release branch, in your local checkout of the mega branch:
47+
48+
- run `git checkout origin/main lib/rest/static/*`
49+
- run `script/rest/update-files.js --decorate-only`
50+
- push the resulting changes
51+
5052
### Before shipping the release branch
5153
5254
- [ ] Add the GHES release notes to `data/release-notes/` and update the versioning frontmatter in `content/admin/release-notes.md` to `enterprise-server: '<=<RELEASE>'`

.github/allowed-actions.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
// can be added it this list.
55

66
module.exports = [
7-
"actions/cache@0781355a23dac32fd3bac414512f4b903437991a", //actions/cache@v2.1.3
8-
"actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f", //actions/checkout@v2.3.4
9-
"actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9", //actions/script@v3.0.0
10-
"actions/labeler@5f867a63be70efff62b767459b009290364495eb", //actions/labeler@v2.2.0
11-
"actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e", //actions/setup-node@v2.1.4
12-
"ruby/setup-ruby@fdcfbcf14ec9672f6f615cb9589a1bc5dd69d262", //ruby/setup-ruby@vv1.64.1
13-
"actions/stale@9d6f46564a515a9ea11e7762ab3957ee58ca50da", //actions/stale@v3.0.16
7+
"actions/cache@0781355a23dac32fd3bac414512f4b903437991a", // v2.1.3
8+
"actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f", // v2.3.4
9+
"actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9", // v3.0.0
10+
"actions/labeler@5f867a63be70efff62b767459b009290364495eb", // v2.2.0
11+
"actions/setup-node@c46424eee26de4078d34105d3de3cc4992202b1e", // v2.1.4
12+
"ruby/setup-ruby@fdcfbcf14ec9672f6f615cb9589a1bc5dd69d262", // v1.64.1
13+
"actions/stale@9d6f46564a515a9ea11e7762ab3957ee58ca50da", // v3.0.16
1414
"alex-page/github-project-automation-plus@fdb7991b72040d611e1123d2b75ff10eda9372c9",
1515
"andymckay/labeler@22d5392de2b725cea4b284df5824125054049d84",
1616
"archive/github-actions-slack@d368c5a4ad757515a9344918f84c490b05777d94",
@@ -23,11 +23,11 @@ module.exports = [
2323
"github/codeql-action/analyze@v1",
2424
"github/codeql-action/init@v1",
2525
"juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8",
26-
"juliangruber/find-pull-request-action@2fc55e82a6d5d36fe1e7f1848f7e64fd02d99de9",
26+
"juliangruber/find-pull-request-action@db875662766249c049b2dcd85293892d61cb0b51", // v1.5.0
2727
"juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512",
2828
"lee-dohm/close-matching-issues@22002609b2555fe18f52b8e2e7c07cbf5529e8a8",
2929
"lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb",
30-
"pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07", //pascalgn/automerge@0.12.0
30+
"pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07", // v0.12.0
3131
"peter-evans/create-issue-from-file@a04ce672e3acedb1f8e416b46716ddfd09905326",
3232
"peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd",
3333
"peter-evans/create-pull-request@8c603dbb04b917a9fc2dd991dc54fef54b640b43",

.github/workflows/open-enterprise-issue.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Open Enterprise release or deprecation issue
22

3+
# **What it does**: Checks if there is an Enterprise release or deprecation upcoming, and if so, opens an issue with the tasks to be completed.
4+
# **Why we have it**: GHES releases and deprecations run on a predictable schedule, so we can automate some of the project management aspects.
5+
# **Who does it impact**: Docs engineering, docs content.
6+
37
on:
48
schedule:
59
- cron: '49 14 * * *' # At 14:49 UTC daily

.github/workflows/repo-sync.yml

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,19 @@ jobs:
2727
steps:
2828
- name: Find pull request
2929
if: ${{ github.repository == 'github/docs' }}
30-
uses: juliangruber/find-pull-request-action@2fc55e82a6d5d36fe1e7f1848f7e64fd02d99de9
30+
uses: juliangruber/find-pull-request-action@db875662766249c049b2dcd85293892d61cb0b51
3131
id: find-pull-request
3232
with:
33-
github-token: ${{ secrets.GITHUB_TOKEN }}
33+
github-token: ${{ secrets.DOCS_BOT_SPAM_VISION }}
3434
branch: repo-sync
3535
base: main
36+
state: open
3637

3738
- name: Close pull request if unwanted
3839
if: ${{ github.repository == 'github/docs' && steps.find-pull-request.outputs.number }}
3940
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
4041
with:
41-
github-token: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }}
42+
github-token: ${{ secrets.DOCS_BOT_SPAM_VISION }}
4243
script: |
4344
const { owner, repo } = context.repo
4445
@@ -115,17 +116,18 @@ jobs:
115116
destination_branch: main
116117
pr_title: 'repo sync'
117118
pr_body: "This is an automated pull request to sync changes between the public and private repos.\n\n:robot: This pull request should be merged (not squashed) to preserve continuity across repos, so please let a bot do the merging!"
118-
pr_label: automerge,autoupdate,automated-reposync-pr
119+
pr_label: autoupdate,automated-reposync-pr
119120
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
120121

121122
- name: Find pull request
122-
uses: juliangruber/find-pull-request-action@2fc55e82a6d5d36fe1e7f1848f7e64fd02d99de9
123+
uses: juliangruber/find-pull-request-action@db875662766249c049b2dcd85293892d61cb0b51
123124
id: find-pull-request
124125
with:
125126
github-token: ${{ secrets.GITHUB_TOKEN }}
126127
branch: repo-sync
127128
base: main
128129
author: Octomerger
130+
state: open
129131

130132
- name: Approve pull request
131133
if: ${{ steps.find-pull-request.outputs.number }}
@@ -139,7 +141,7 @@ jobs:
139141
if: ${{ steps.find-pull-request.outputs.number }}
140142
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
141143
with:
142-
github-token: ${{ secrets.GITHUB_TOKEN }}
144+
github-token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
143145
script: |
144146
const mainHeadSha = await github.git.getRef({
145147
...context.repo,
@@ -163,6 +165,41 @@ jobs:
163165
console.log(`Branch is already up-to-date`)
164166
}
165167
168+
- name: Enable GitHub auto-merge
169+
if: ${{ steps.find-pull-request.outputs.number }}
170+
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
171+
with:
172+
github-token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
173+
script: |
174+
const pull = await github.pulls.get({
175+
...context.repo,
176+
pull_number: parseInt(${{ steps.find-pull-request.outputs.number }})
177+
})
178+
179+
const pullNodeId = pull.data.node_id
180+
console.log(`Pull request GraphQL Node ID: ${pullNodeId}`)
181+
182+
const mutation = `mutation ($id: ID!) {
183+
enablePullRequestAutoMerge(input: {
184+
pullRequestId: $id,
185+
mergeMethod: MERGE
186+
}) {
187+
clientMutationId
188+
}
189+
}`
190+
const variables = {
191+
id: pullNodeId
192+
}
193+
194+
const graph = await github.graphql(mutation, variables)
195+
console.log('GraphQL mutation result:\n' + JSON.stringify(graph))
196+
197+
if (graph.errors && graph.errors.length > 0) {
198+
console.error('ERROR! Failed to enable auto-merge:\n - ' + graph.errors.map(error => error.message).join('\n - '))
199+
} else {
200+
console.log('Auto-merge enabled!')
201+
}
202+
166203
- name: Send Slack notification if workflow fails
167204
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd
168205
if: failure()
Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Send Crowdin PRs to boards
22

3+
# **What it does**: Sends PRs opened on the crowdin branch to the ready for work column in this board: https://github.com/orgs/github/projects/1269#column-13447153
4+
# **Why we have it**: To make sure the first responder sees crowdin translations that need to be merged as they review the Task board.
5+
# **Who does it impact**: Docs localization and Docs Engineering
6+
37
on:
48
pull_request:
59
types:
@@ -14,7 +18,7 @@ jobs:
1418
with:
1519
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
1620
script: |
17-
var squadBoardColumnId = 13447153; // Add to the team backlog/squad board
21+
var squadBoardColumnId = 13447153; // Add to the team task board
1822
1923
try {
2024
await github.projects.createCard({
@@ -25,14 +29,3 @@ jobs:
2529
} catch (error) {
2630
console.log(error);
2731
}
28-
29-
var prBoardColumnId = 10095775; // Add to the pull requests board
30-
try {
31-
await github.projects.createCard({
32-
column_id: prBoardColumnId,
33-
content_id: context.payload.pull_request.id,
34-
content_type: "PullRequest"
35-
});
36-
} catch (error) {
37-
console.log(error);
38-
}

.github/workflows/send-issues-to-how-how-we-work-boards.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
continue-on-error: true
1818
steps:
19-
- if: contains(github.event.issue.labels.*.name, 'engineering') && !contains(github.event.issue.labels.*.name, 'feature') && !contains(github.event.issue.labels.*.name, 'epic')
19+
- if: (github.repository == 'github/docs-internal') && contains(github.event.issue.labels.*.name, 'engineering') && !contains(github.event.issue.labels.*.name, 'feature') && !contains(github.event.issue.labels.*.name, 'epic')
2020
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
2121
with:
2222
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
@@ -31,7 +31,7 @@ jobs:
3131
} catch (error) {
3232
console.log(error);
3333
}
34-
- if: contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'feature')
34+
- if: (github.repository == 'github/docs-internal') && contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'feature')
3535
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
3636
with:
3737
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
@@ -46,7 +46,7 @@ jobs:
4646
} catch (error) {
4747
console.log(error);
4848
}
49-
- if: contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'epic')
49+
- if: (github.repository == 'github/docs-internal') && contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'epic')
5050
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
5151
with:
5252
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}

.github/workflows/send-prs-to-how-how-we-work-boards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
continue-on-error: true
1818
steps:
19-
- if: (github.repository == 'github/docs-internal' || github.repository == 'github/docs') && contains(github.event.pull_request.labels.*.name, 'feature')
19+
- if: (github.repository == 'github/docs-internal') && contains(github.event.pull_request.labels.*.name, 'feature')
2020
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
2121
with:
2222
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}

.github/workflows/translations.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ jobs:
2121
echo 'The repo is currently frozen! Exiting this workflow.'
2222
exit 1 # prevents further steps from running
2323
- name: Find original Pull Request
24-
uses: juliangruber/find-pull-request-action@2fc55e82a6d5d36fe1e7f1848f7e64fd02d99de9
24+
uses: juliangruber/find-pull-request-action@db875662766249c049b2dcd85293892d61cb0b51
2525
id: pr
2626
with:
2727
github-token: ${{ secrets.GITHUB_TOKEN }}
2828
branch: translations
2929
base: main
3030
author: octoglot
31+
state: open
3132
- if: ${{ steps.pr.outputs.number }}
3233
name: Check if already labeled
3334
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
web: NODE_ENV=production node server.js
22

3-
release: NODE_ENV=production node script/purge-redis-pages.js
3+
release: NODE_ENV=production script/release-heroku

0 commit comments

Comments
 (0)