Skip to content

Commit d0e894f

Browse files
authored
Merge branch 'main' into check-for-outdated-links
2 parents 7fb5ab6 + ecc5d01 commit d0e894f

18 files changed

Lines changed: 76 additions & 50 deletions

File tree

content/actions/hosting-your-own-runners/about-self-hosted-runners.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ You must ensure that the machine has the appropriate network access to communica
120120
github.com
121121
api.github.com
122122
*.actions.githubusercontent.com
123+
github-releases.githubusercontent.com
123124
codeload.github.com
124125
```
125126

content/actions/quickstart.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Committing the workflow file in your repository triggers the `push` event and ru
7878
7979
### Next steps
8080
81-
The super-linter workflow you just added runs any time code is pushed to your repository to help you spot errors and inconsistencies in your code. But, this is only the beginning of what you can do with {% data variables.product.prodname_actions %}. Your repository can contain multiple workflows that trigger different jobs based on different events. {% data variables.product.prodname_actions %} can help you automate nearly every aspect of your application development processes. Ready to get started? Here are some helpful resources for taking your next steps with {% data variables.product.prodname_actions %}:
81+
The super-linter workflow you just added runs each time code is pushed to your repository to help you spot errors and inconsistencies in your code. But this is only the beginning of what you can do with {% data variables.product.prodname_actions %}. Your repository can contain multiple workflows that trigger different jobs based on different events. {% data variables.product.prodname_actions %} can help you automate nearly every aspect of your application development processes. Ready to get started? Here are some helpful resources for taking your next steps with {% data variables.product.prodname_actions %}:
8282
8383
- "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)" for an in-depth tutorial
8484
- "[Guides](/actions/guides)" for specific uses cases and examples
@@ -88,7 +88,7 @@ The super-linter workflow you just added runs any time code is pushed to your re
8888
8989
### Introduction
9090
91-
Printing "Hello, World!" is a great way to explore the basic set up and syntax of a new programming language. In this guide, you'll use GitHub Actions to print "Hello, World!" within your {% data variables.product.prodname_dotcom %} repository's workflow logs. All you need to get started is a {% data variables.product.prodname_dotcom %} repository where you feel comfortable creating and running a sample {% data variables.product.prodname_actions %} workflow. Feel free to create a new repository for this Quickstart, you can use it to test this and future {% data variables.product.prodname_actions %} workflows.
91+
Printing "Hello, World!" is a great way to explore the basic set up and syntax of a new programming language. In this guide, you'll use GitHub Actions to print "Hello, World!" within your {% data variables.product.prodname_dotcom %} repository's workflow logs. All you need to get started is a {% data variables.product.prodname_dotcom %} repository where you feel comfortable creating and running a sample {% data variables.product.prodname_actions %} workflow. Feel free to create a new repository for this Quickstart to test this and future {% data variables.product.prodname_actions %} workflows.
9292
9393
### Creating your first workflow
9494
@@ -143,7 +143,7 @@ Printing "Hello, World!" is a great way to explore the basic set up and syntax o
143143
144144
### Next steps
145145
146-
The hello-world workflow you just added is a simple example of a manually triggered workflow. This is only the beginning of what you can do with {% data variables.product.prodname_actions %}. Your repository can contain multiple workflows that trigger different jobs based on different events. {% data variables.product.prodname_actions %} can help you automate nearly every aspect of your application development processes. Ready to get started? Here are some helpful resources for taking your next steps with {% data variables.product.prodname_actions %}:
146+
The hello-world workflow you just added is a minimal example of a manually triggered workflow. This is only the beginning of what you can do with {% data variables.product.prodname_actions %}. Your repository can contain multiple workflows that trigger different jobs based on different events. {% data variables.product.prodname_actions %} can help you automate nearly every aspect of your application development processes. Ready to get started? Here are some helpful resources for taking your next steps with {% data variables.product.prodname_actions %}:
147147
148148
- "[Learn {% data variables.product.prodname_actions %}](/actions/learn-github-actions)" for an in-depth tutorial
149149
- "[Guides](/actions/guides)" for specific uses cases and examples

content/github/developing-online-with-codespaces/about-codespaces.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ A limited number of people will be invited to join the beta. To join the waitlis
5656

5757
If you encounter problems using {% data variables.product.prodname_codespaces %}, see "[Troubleshooting your codespace](/github/developing-online-with-codespaces/troubleshooting-your-codespace)."
5858

59-
If you still need help or have feedback about {% data variables.product.prodname_codespaces %}, use the [Community Forum](https://github.community/c/codespaces-beta/45).
59+
If you still need help or have feedback about {% data variables.product.prodname_codespaces %}, use the [Codespaces Feedback](https://github.com/github/feedback/discussions/categories/codespaces-feedback) discussion.

content/github/managing-your-work-on-github/file-attachments-on-issues-and-pull-requests.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,17 @@ To attach a file to an issue or pull request conversation, drag and drop it into
2525

2626
{% endtip %}
2727

28-
The maximum size for files is 25MB and the maximum size for images is 10MB.
28+
The maximum size for files is 25MB and the maximum size for images is 10MB.
29+
{% if currentVersion == "free-pro-team@latest" %}
30+
Videos can be up to 100 MB in size if the repository is owned by a user or organization on a paid GitHub plan.
31+
32+
{% note %}
33+
34+
**Note:** Support for video attachments is currently in beta and subject to change.
35+
36+
{% endnote %}
37+
38+
{% endif %}
2939

3040
We support these files:
3141

@@ -36,6 +46,7 @@ We support these files:
3646
* Microsoft Word (*.docx*), Powerpoint (*.pptx*), and Excel (*.xlsx*) documents
3747
* Text files (*.txt*)
3848
* PDFs (*.pdf*)
39-
* ZIP (*.zip*, *.gz*)
49+
* ZIP (*.zip*, *.gz*){% if currentVersion == "free-pro-team@latest" %}
50+
* Video (*.mp4*, *.mov*){% endif %}
4051

4152
![Attachments animated GIF](/assets/images/help/pull_requests/dragging_images.gif)

content/github/managing-your-work-on-github/linking-a-repository-to-a-project-board.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ versions:
88
enterprise-server: '*'
99
github-ae: '*'
1010
---
11-
{% note %}
12-
13-
**Note:** In order to link a repository to your organization or user owned project board the repository needs to have issues enabled. For information on how to see if issues are disabled for a repository, see "[Disabling issues](/github/managing-your-work-on-github/disabling-issues) ."
1411

15-
{% endnote %}
1612

1713
Anyone with write permissions to a project board can link repositories owned by that organization or user account to the project board. For more information, see "[Project board permissions for an organization](/articles/project-board-permissions-for-an-organization/)" or "[Permission levels for user-owned project boards](/articles/permission-levels-for-user-owned-project-boards/)."
1814

@@ -30,6 +26,12 @@ Anyone with write permissions to a project board can link repositories owned by
3026
7. Click **Link**. To unlink, click **Unlink**.
3127
![Link button](/assets/images/help/projects/link-button.png)
3228

29+
{% note %}
30+
31+
**Note:** In order to link a repository to your organization or user owned project board the repository needs to have issues enabled. That is, the repository has an "Issues" tab (in forked repositories issues are disabled by default). For information on how to enable or disable issues for a repository, see "[Disabling issues for a repository](/github/managing-your-work-on-github/disabling-issues)."
32+
33+
{% endnote %}
34+
3335
### Further reading
3436

3537
- "[About projects boards](/articles/about-project-boards)"

content/github/working-with-github-pages/about-github-pages-and-jekyll.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ You can download or create Jekyll plugins to extend the functionality of Jekyll
9191
- [`jekyll-titles-from-headings`](https://github.com/benbalter/jekyll-titles-from-headings)
9292
- [`jekyll-relative-links`](https://github.com/benbalter/jekyll-relative-links)
9393

94-
You can enable additional plugins by adding the plugin's gem to the `plugins` setting in your *_config.yml* file. For more information, see "[Configuration](https://jekyllrb.com/docs/configuration/)" in the Jekyll documentation. For a list of supported plugins, see "[Dependency versions](https://pages.github.com/versions/)" on the {% data variables.product.prodname_pages %} site.
94+
You can enable additional plugins by adding the plugin's gem to the `plugins` setting in your *_config.yml* file. For more information, see "[Configuration](https://jekyllrb.com/docs/configuration/)" in the Jekyll documentation.
9595

96-
For usage information for a specific plugin, see the plugin's documentation.
96+
For a list of supported plugins, see "[Dependency versions](https://pages.github.com/versions/)" on the {% data variables.product.prodname_pages %} site. For usage information for a specific plugin, see the plugin's documentation.
9797

9898
{% tip %}
9999

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
If your site is an independent project, you can create a new repository to store your site's source code. If your site is associated with an existing project, you can add the source code {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" or currentVersion == "github-ae@latest" %}to that project's repository, in a `/docs` folder on the default branch or on a different branch.{% else %}for your site to a `gh-pages` branch or a `docs` folder on the `master` branch in that project's repository.{% endif %} For example, if you're creating a site to publish documentation for a project that's already on {% data variables.product.product_name %}, you may want to store the source code for the site in the same repository as the project.
22

3-
{% if currentVersion == "free-pro-team@latest" %}If the account that owns the repository uses {% data variables.product.prodname_free_user %} or {% data variables.product.prodname_free_team %}, the repository must be public.{% endif %}
3+
{% if currentVersion == "free-pro-team@latest" %}If the account that owns the repository uses {% data variables.product.prodname_free_user %} or {% data variables.product.prodname_free_team %} for organizations, the repository must be public.{% endif %}
44

55
If you want to create a site in an existing repository, skip to the "[Creating your site](#creating-your-site)" section.

lib/enterprise-server-releases.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ const nextDeprecationDate = dates[oldestSupported].deprecationDate
4747
const isOldestReleaseDeprecated = new Date() > new Date(nextDeprecationDate)
4848
const deprecatedOnNewSite = deprecated.filter(version => versionSatisfiesRange(version, '>=2.13'))
4949
const firstVersionDeprecatedOnNewSite = '2.13'
50-
// starting from 2.18, we updated the archival script to create stubbed HTML redirect files
51-
const lastVersionWithoutStubbedRedirectFiles = '2.17'
50+
// starting from 2.18, we updated the archival script to create a redirects.json top-level file in the archived repo
51+
const lastVersionWithoutArchivedRedirectsFile = '2.17'
5252
// last version using paths like /enterprise/<release>/<user>/<product>/<category>/<article>
5353
// instead of /enterprise-server@<release>/<product>/<category>/<article>
5454
const lastReleaseWithLegacyFormat = '2.18'
@@ -68,7 +68,7 @@ module.exports = {
6868
deprecatedOnNewSite,
6969
dates,
7070
firstVersionDeprecatedOnNewSite,
71-
lastVersionWithoutStubbedRedirectFiles,
71+
lastVersionWithoutArchivedRedirectsFile,
7272
lastReleaseWithLegacyFormat,
7373
deprecatedReleasesWithLegacyFormat,
7474
deprecatedReleasesWithNewFormat,

middleware/archived-enterprise-versions.js

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const path = require('path')
22
const slash = require('slash')
3-
const { firstVersionDeprecatedOnNewSite, lastVersionWithoutStubbedRedirectFiles } = require('../lib/enterprise-server-releases')
3+
const { firstVersionDeprecatedOnNewSite, lastVersionWithoutArchivedRedirectsFile } = require('../lib/enterprise-server-releases')
44
const patterns = require('../lib/patterns')
55
const versionSatisfiesRange = require('../lib/version-satisfies-range')
66
const isArchivedVersion = require('../lib/is-archived-version')
@@ -25,21 +25,42 @@ module.exports = async (req, res, next) => {
2525
}
2626

2727
// find redirects for versions between 2.13 and 2.17
28-
// starting with 2.18, we updated the archival script to create stubbed HTML redirect files
28+
// starting with 2.18, we updated the archival script to create a redirects.json file
2929
if (versionSatisfiesRange(requestedVersion, `>=${firstVersionDeprecatedOnNewSite}`) &&
30-
versionSatisfiesRange(requestedVersion, `<=${lastVersionWithoutStubbedRedirectFiles}`)) {
30+
versionSatisfiesRange(requestedVersion, `<=${lastVersionWithoutArchivedRedirectsFile}`)) {
3131
const redirect = archvivedRedirects[req.path]
3232
if (redirect && redirect !== req.path) {
3333
return res.redirect(301, redirect)
3434
}
3535
}
3636

37+
let reqPath = req.path
38+
let isRedirect = false
39+
if (versionSatisfiesRange(requestedVersion, `>${lastVersionWithoutArchivedRedirectsFile}`)) {
40+
try {
41+
const redirectJson = await got(getProxyPath('redirects.json', requestedVersion))
42+
43+
if (redirectJson[req.path]) {
44+
isRedirect = true
45+
}
46+
reqPath = redirectJson[req.path] || req.path
47+
} catch (err) {
48+
// nooop
49+
}
50+
}
51+
3752
try {
38-
const r = await got(getProxyPath(req.path, requestedVersion))
53+
const r = await got(getProxyPath(reqPath, requestedVersion))
3954
res.set('content-type', r.headers['content-type'])
4055
res.set('x-robots-tag', 'noindex')
4156

42-
// make the stubbed redirect files added in >=2.18 return 301 instead of 200
57+
// make redirects found via redirects.json return 301 instead of 200
58+
if (isRedirect) {
59+
res.status(301)
60+
res.set('location', reqPath)
61+
}
62+
63+
// make stubbed redirect files (which exist in versions <2.13) return 301 instead of 200
4364
const staticRedirect = r.body.match(patterns.staticRedirect)
4465
if (staticRedirect) {
4566
res.status(301)
@@ -73,7 +94,7 @@ function getProxyPath (reqPath, requestedVersion) {
7394
// this workaround finds potentially relevant frontmatter redirects in currently supported pages
7495
function getFallbackRedirects (req, requestedVersion) {
7596
if (versionSatisfiesRange(requestedVersion, `<${firstVersionDeprecatedOnNewSite}`)) return
76-
if (versionSatisfiesRange(requestedVersion, `>${lastVersionWithoutStubbedRedirectFiles}`)) return
97+
if (versionSatisfiesRange(requestedVersion, `>${lastVersionWithoutArchivedRedirectsFile}`)) return
7798

7899
return archivedFrontmatterFallbacks.find(arrayOfFallbacks => arrayOfFallbacks.includes(req.path))
79100
}

script/enterprise-server-deprecations/archive-version.js

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const host = `http://localhost:${port}`
99
const scrape = require('website-scraper')
1010
const program = require('commander')
1111
const rimraf = require('rimraf').sync
12-
const mkdirp = require('mkdirp').sync
1312
const version = require('../../lib/enterprise-server-releases').oldestSupported
1413
const archivalRepoName = 'help-docs-archived-enterprise-versions'
1514
const archivalRepoUrl = `https://github.com/github/${archivalRepoName}`
@@ -173,18 +172,20 @@ async function main () {
173172
console.log(`\n\ndone scraping! added files to ${path.relative(process.cwd(), finalDirectory)}\n`)
174173

175174
// create redirect html files to preserve frontmatter redirects
176-
await createRedirectPages(permalinksPerVersion, pageMap, finalDirectory)
175+
await createRedirectsFile(permalinksPerVersion, pageMap, finalDirectory)
177176

178177
console.log(`next step: deprecate ${version} in lib/enterprise-server-releases.js`)
179178

180179
process.exit()
181180
})
182181
}
183182

184-
async function createRedirectPages (permalinks, pageMap, finalDirectory) {
183+
async function createRedirectsFile (permalinks, pageMap, finalDirectory) {
185184
const pagesPerVersion = permalinks.map(permalink => pageMap[permalink])
186185
const redirects = await loadRedirects(pagesPerVersion, pageMap)
187186

187+
const redirectsPerVersion = {}
188+
188189
Object.entries(redirects).forEach(([oldPath, newPath]) => {
189190
// remove any liquid variables that sneak in
190191
oldPath = oldPath
@@ -193,31 +194,8 @@ async function createRedirectPages (permalinks, pageMap, finalDirectory) {
193194
// ignore any old paths that are not in this version
194195
if (!(oldPath.includes(`/enterprise-server@${version}`) || oldPath.includes(`/enterprise/${version}`))) return
195196

196-
const fullPath = path.join(finalDirectory, oldPath)
197-
const filename = `${fullPath}/index.html`
198-
const html = getRedirectHtml(newPath)
199-
200-
mkdirp(fullPath)
201-
fs.writeFileSync(filename, html)
197+
redirectsPerVersion[oldPath] = newPath
202198
})
203199

204-
console.log('done creating redirect files!\n')
205-
}
206-
207-
// redirect html files already exist in <=2.12 because these versions were deprecated on the old static site
208-
function getRedirectHtml (newPath) {
209-
return `<!DOCTYPE html>
210-
<html>
211-
<head>
212-
<meta charset="utf-8">
213-
<title>Redirecting...</title>
214-
<link rel="canonical" href="${newPath}">
215-
<meta http-equiv="refresh" content="0; url=${newPath}">
216-
</head>
217-
<body>
218-
<h1>Redirecting...</h1>
219-
<a href="${newPath}">Click here if you are not redirected.</a>
220-
<script>location='${newPath}'</script>
221-
</body>
222-
</html>`
200+
fs.writeFileSync(path.posix.join(finalDirectory, 'redirects.json'), JSON.stringify(redirectsPerVersion, null, 2))
223201
}

0 commit comments

Comments
 (0)