Skip to content

Commit 2c50b73

Browse files
authored
Merge branch 'main' into node16
2 parents d83826a + 3942166 commit 2c50b73

File tree

1,432 files changed

+204029
-64479
lines changed

Some content is hidden

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

1,432 files changed

+204029
-64479
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#!/usr/bin/env node
2+
3+
import * as github from '@actions/github'
4+
import core from '@actions/core'
5+
6+
const { GITHUB_TOKEN } = process.env
7+
const context = github.context
8+
9+
if (!GITHUB_TOKEN) {
10+
throw new Error(`GITHUB_TOKEN environment variable not set`)
11+
}
12+
13+
// When this file is invoked directly from action as opposed to being imported
14+
if (import.meta.url.endsWith(process.argv[1])) {
15+
const owner = context.repo.owner
16+
const repo = context.payload.repository.name
17+
const baseSHA = context.payload.pull_request.base.sha
18+
const headSHA = context.payload.pull_request.head.sha
19+
20+
const markdown = await main(owner, repo, baseSHA, headSHA)
21+
core.setOutput('markdown', markdown)
22+
}
23+
24+
async function main(owner, repo, baseSHA, headSHA) {
25+
const octokit = github.getOctokit(GITHUB_TOKEN)
26+
// get the list of file changes from the PR
27+
const response = await octokit.rest.repos.compareCommitsWithBasehead({
28+
owner,
29+
repo,
30+
basehead: `${baseSHA}...${headSHA}`,
31+
})
32+
33+
const { files } = response.data
34+
35+
const oldFilenames = []
36+
for (const file of files) {
37+
const { filename, status } = file
38+
if (!filename.startsWith('assets')) continue
39+
if (status === 'removed') {
40+
// Bad
41+
oldFilenames.push(filename)
42+
} else if (status === 'renamed') {
43+
// Also bad
44+
const previousFilename = file.previous_filename
45+
oldFilenames.push(previousFilename)
46+
}
47+
}
48+
49+
if (!oldFilenames.length) {
50+
return ''
51+
}
52+
53+
let markdown = '⚠️ 🙀 **You deleted some assets** 🙀 ⚠️\n\n'
54+
markdown +=
55+
"Even if you don't reference these assets anymore, as of this branch, you should not delete them.\n"
56+
markdown += 'They might still be referenced in translated content.\n'
57+
markdown += 'The weekly "Delete orphaned assets" workflow will worry about cleaning those up.\n\n'
58+
markdown += '**To *undo* these removals run this command:**\n\n'
59+
markdown += `
60+
\`\`\`sh
61+
git checkout origin/main -- ${oldFilenames.join(' ')}
62+
\`\`\`
63+
`
64+
65+
return markdown
66+
}
67+
68+
export default main

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

Lines changed: 202 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,213 @@ If you aren't comfortable going through the steps alone, sync up with a docs eng
3232
```
3333
- [ ] Create a placeholder release notes file called `data/release-notes/<PRODUCT>/<RELEASE NUMBER>/PLACEHOLDER.yml`. For example `data/release-notes/enterprise-server/3-1/PLACEHOLDER.yml`. Add the following placeholder content to the file:
3434
35-
```
36-
date: '2021-05-04'
35+
**Note:** All of the content in this file will be updated when the release notes are created in the megabranch including the filename `PLACEHOLDER.yml`. You can update the date or leave it as-is and wait to update it when the release notes are finalized.
36+
37+
<details><summary>Click to view placeholder...</summary>
38+
39+
```yaml
40+
date: '2099-12-31'
3741
release_candidate: true
3842
deprecated: false
39-
intro: PLACEHOLDER
43+
intro: |
44+
{% note %}
45+
46+
**Note:** If {% data variables.location.product_location %} is running a release candidate build, you can’t upgrade with a hotpatch. We recommend that you only run release candidates in a test environment.
47+
48+
{% endnote %}
49+
50+
For upgrade instructions, see "[Upgrading {% data variables.product.prodname_ghe_server %}](/admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server)."
4051
sections:
41-
bugs:
42-
- PLACEHOLDER
43-
known_issues:
44-
- PLACEHOLDER
45-
```
52+
# Remove section heading if the section contains no notes.
4653
47-
**Note:** All of the content in this file will be updated when the release notes are created in the megabranch including the filename `PLACEHOLDER.yml`. You can update the date or leave it as-is and wait to update it when the release notes are finalized.
54+
features:
55+
# Remove a sub-section heading if the heading contains no notes. If sections
56+
# that regularly recur are missing, add placeholders to this template.
57+
58+
- heading: Instance administration
59+
notes:
60+
# LINK TO RELEASE ISSUE
61+
- |
62+
...
63+
64+
- heading: Instance services
65+
notes:
66+
# LINK TO RELEASE ISSUE
67+
- |
68+
...
69+
70+
- heading: Identity and access management
71+
notes:
72+
# LINK TO RELEASE ISSUE
73+
- |
74+
...
75+
76+
- heading: Authentication
77+
notes:
78+
# LINK TO RELEASE ISSUE
79+
- |
80+
...
81+
82+
- heading: Migrations
83+
notes:
84+
# LINK TO RELEASE ISSUE
85+
- |
86+
...
87+
88+
- heading: Policies
89+
notes:
90+
# LINK TO RELEASE ISSUE
91+
- |
92+
...
93+
94+
- heading: Audit logs
95+
notes:
96+
# LINK TO RELEASE ISSUE
97+
- |
98+
...
99+
100+
- heading: GitHub Connect
101+
notes:
102+
# LINK TO RELEASE ISSUE
103+
- |
104+
...
105+
106+
- heading: GitHub Advanced Security
107+
notes:
108+
# LINK TO RELEASE ISSUE
109+
- |
110+
...
111+
112+
- heading: Dependabot
113+
notes:
114+
# LINK TO RELEASE ISSUE
115+
- |
116+
...
117+
118+
- heading: Code security
119+
notes:
120+
# LINK TO RELEASE ISSUE
121+
- |
122+
...
48123
124+
- heading: GitHub Actions
125+
notes:
126+
# LINK TO RELEASE ISSUE
127+
- |
128+
...
129+
130+
- heading: GitHub Packages
131+
notes:
132+
# LINK TO RELEASE ISSUE
133+
- |
134+
...
135+
136+
- heading: GitHub Pages
137+
notes:
138+
# LINK TO RELEASE ISSUE
139+
- |
140+
...
141+
142+
- heading: Community experience
143+
notes:
144+
# LINK TO RELEASE ISSUE
145+
- |
146+
...
147+
148+
- heading: Organizations
149+
notes:
150+
# LINK TO RELEASE ISSUE
151+
- |
152+
...
153+
154+
- heading: Repositories
155+
notes:
156+
# LINK TO RELEASE ISSUE
157+
- |
158+
...
159+
160+
- heading: Issues
161+
notes:
162+
# LINK TO RELEASE ISSUE
163+
- |
164+
...
165+
166+
- heading: Projects
167+
notes:
168+
# LINK TO RELEASE ISSUE
169+
- |
170+
...
171+
172+
- heading: GitHub Discussions
173+
notes:
174+
# LINK TO RELEASE ISSUE
175+
- |
176+
...
177+
178+
- heading: Commits
179+
notes:
180+
# LINK TO RELEASE ISSUE
181+
- |
182+
...
183+
184+
- heading: Pull requests
185+
notes:
186+
# LINK TO RELEASE ISSUE
187+
- |
188+
...
189+
190+
- heading: Releases
191+
notes:
192+
# LINK TO RELEASE ISSUE
193+
- |
194+
...
195+
196+
- heading: Gist
197+
notes:
198+
# LINK TO RELEASES ISSUE
199+
- |
200+
...
201+
202+
- heading: Markdown
203+
notes:
204+
# LINK TO RELEASE ISSUE
205+
- |
206+
...
207+
208+
- heading: Accessibility
209+
notes:
210+
# LINK TO RELEASE ISSUE
211+
- |
212+
...
213+
214+
- heading: GitHub Mobile
215+
notes:
216+
# LINK TO RELEASE ISSUE
217+
- |
218+
...
219+
220+
- heading: Integrations and extensions
221+
notes:
222+
# LINK TO RELEASE ISSUE
223+
- |
224+
...
225+
226+
changes:
227+
# LINK TO RELEASE ISSUE
228+
- |
229+
...
230+
231+
known_issues:
232+
# INCLUDE NOTES FOR RELEASE FROM "GHES Release Note Tracking" PROJECT'S "Known Issues" TAB
233+
- |
234+
...
235+
236+
deprecations:
237+
# LINK TO RELEASE ISSUE
238+
- |
239+
...
240+
```
241+
</details>
49242
- [ ] If this is a release candidate release, add a Release Candidate banner:
50243

51244
```

.github/actions-scripts/rendered-content-link-checker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,9 +1186,11 @@ async function renderInnerHTML(page, permalink) {
11861186

11871187
req.context.relativePath = page.relativePath
11881188

1189+
const guts = [page.rawIntro, page.rawPermissions, page.markdown].filter(Boolean).join('\n').trim()
1190+
11891191
// These lines do what the ubiquitous `renderContent` function does,
11901192
// but at an absolute minimum to get a string of HTML.
1191-
const markdown = await liquid.parseAndRender(page.markdown, req.context)
1193+
const markdown = await liquid.parseAndRender(guts, req.context)
11921194
const processor = createMinimalProcessor(req.context)
11931195
const vFile = await processor.process(markdown)
11941196
return vFile.toString()

.github/workflows/add-review-template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
23+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin @3.1.0
2424

2525
# Jump through some hoops to work with a multi-line file
2626
- name: Store review template in variable

.github/workflows/azure-preview-env-deploy.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ jobs:
4747
# See https://bit.ly/3qB9nZW > If a job in a workflow is skipped due to a conditional, it will report its status as "Success".
4848
if: |
4949
(
50-
(github.event.pull_request.head.sha || github.event.inputs.COMMIT_REF)
50+
(github.event.pull_request.head.sha || github.event.inputs.COMMIT_REF)
5151
&& (github.event.number || github.event.inputs.PR_NUMBER || github.run_id)
52-
)
52+
)
5353
&& (github.repository == 'github/docs-internal' || github.repository == 'github/docs')
5454
&& github.actor != 'dependabot[bot]'
5555
timeout-minutes: 15
@@ -94,7 +94,7 @@ jobs:
9494

9595
- if: ${{ env.IS_INTERNAL_BUILD == 'true' }}
9696
name: Check out PR code
97-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
97+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin @3.1.0
9898
with:
9999
ref: ${{ env.COMMIT_REF }}
100100
# To prevent issues with cloning early access content later
@@ -213,7 +213,7 @@ jobs:
213213
dockerRegistryUsername="${{ env.NONPROD_REGISTRY_USERNAME }}"
214214
dockerRegistryPassword="${{ secrets.NONPROD_REGISTRY_PASSWORD }}"
215215

216-
- name: Check that it can reached
216+
- name: Check that it can be reached
217217
# This introduces a necessary delay. Because the preview evironment
218218
# URL is announced to the pull request as soon as all the steps
219219
# finish, what sometimes happens is that a viewer of the PR clicks
@@ -223,4 +223,8 @@ jobs:
223223
# process requests.
224224
# By introducing a slight "delay" here we avoid announcing a
225225
# preview environment URL that isn't actually working just yet.
226-
run: curl --retry-connrefused --retry 5 -I ${{ env.APP_URL }}
226+
# Note the use of `--fail`. It which means that if it actually
227+
# did connect but the error code was >=400, the command will fail.
228+
# The `--fail --retry N` combination means that a 4xx response
229+
# code will exit immediately but a 5xx will exhaust the retries.
230+
run: curl --fail --retry-connrefused --retry 5 -I ${{ env.APP_URL }}

0 commit comments

Comments
 (0)