Skip to content

Commit 13adb4e

Browse files
authored
Merge branch 'main' into andrekolodochka-patch-1
2 parents 091c595 + a6cbf4e commit 13adb4e

14,902 files changed

Lines changed: 393411 additions & 175204 deletions

File tree

Some content is hidden

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

.devcontainer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
// For format details, see https://aka.ms/vscode-remote/devcontainer.json
33
{
44
"name": "docs.github.com",
5-
"service": "container-doc",
65
"settings": {
76
"terminal.integrated.shell.linux": "/bin/bash",
87
"cSpell.language": ",en"
98
},
10-
// Install pre-requisites, and start to serve docs.github.com locally
11-
"postCreateCommand": "npm install && npm start",
9+
// Install pre-requisites and run a build to ensure we are ready to start serving docs.github.com locally (via `npm start`)
10+
"postCreateCommand": "npm ci && npm run build",
1211
"forwardPorts": [4000],
1312
// Visual Studio Code extensions which help authoring for docs.github.com.
1413
"extensions": [

.github/CODEOWNERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Order is important. The LAST matching pattern has the MOST precedence.
22
# gitignore style patterns are used, not globs.
3-
# https://help.github.com/articles/about-codeowners
3+
# https://docs.github.com/articles/about-codeowners
44
# https://git-scm.com/docs/gitignore
55

66
# Engineering
77
*.js @github/docs-engineering
88
/.github/ @github/docs-engineering
99
/script/ @github/docs-engineering
10+
/includes/ @github/docs-engineering
11+
/layouts/ @github/docs-engineering
1012
app.json @github/docs-engineering
1113
Dockerfile @github/docs-engineering
1214
package-lock.json @github/docs-engineering
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: A brief status update
3+
description: A brief status update.
4+
body:
5+
- type: dropdown
6+
attributes:
7+
label: Status
8+
options:
9+
- label: 'GREY ⚪️ (Not started, paused, not currently being worked on)'
10+
value: 'Status: GREY'
11+
- label: 'GREEN 🟢 (All good, smooth sailing)'
12+
value: 'Status: GREEN'
13+
- label: "YELLOW \U0001F7E1 (On track, with hurdles to work through)"
14+
value: 'Status: YELLOW'
15+
- label: "RED \U0001F534 (BLOCKED)"
16+
value: 'Status: RED'
17+
- type: textarea
18+
attributes:
19+
label: Update Summary
20+
placeholder:
21+
Brief summary of the status and next steps. Any blockers should be
22+
called out specifically.
23+
- type: input
24+
attributes:
25+
label: 'Attribution'
26+
value: '_created with :heart: by typing_ `/status`'
27+
format: text
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
name: Partner-owned product documentation
3+
about: Initiate a set of tasks to be completed by a GitHub partner wishing to document how their product works with GitHub
4+
title: ''
5+
labels:
6+
- partner
7+
assignees: ''
8+
---
9+
10+
<!--
11+
Thank you for your interest in contributing to the GitHub documentation.
12+
13+
This issue template is only for use by GitHub's Technology Partners who wish to contribute documentation explaining how the partner's product works with GitHub, making it straightforward for our shared customers to adopt the product into their workflow.
14+
15+
As a general guide, we estimate we have bandwidth for prioritizing and reviewing up to 3 partner contributions per quarter.
16+
17+
Please be sure to complete all items in the checklists that follow, and feel free to comment with any questions. A member of the team will be glad to support you.
18+
-->
19+
20+
## Pre-requisites
21+
22+
- [ ] Prior to submitting documentation, please apply to join the GitHub Technology Partner Program: [partner.github.com/apply](https://partner.github.com/apply?partnershipType=Technology+Partner). Please feel free to proceed once your application is approved.
23+
24+
## What information would you like to add to docs.github.com?
25+
<!-- Please explain what your proposed article is about, what customers it benefits, and any other information that would help us to prioritize this request -->
26+
27+
## Tasks
28+
29+
Please be sure to complete each of the following:
30+
31+
**Third-party product documentation:**
32+
33+
- [ ] MUST follow our [general contributing guidelines](CONTRIBUTING.md) for voice and markup format.
34+
- [ ] MUST emphasize how the third-party product works with GitHub.
35+
- [ ] MUST be written in Markdown format, using [one of the templates provided](contributing/github-partners/README.md#templates)
36+
- [ ] MUST include the name and URL of the GitHub technology partner responsible for maintenance of the documentation being contributed. This should be added via the `contributor.name` and `contributor.URL` properties in the template's YAML frontmatter.
37+
- [ ] MUST be proposed via a pull request to this repo following [the GitHub Flow](https://guides.github.com/introduction/flow/).
38+
- [ ] MUST be located in the root of [the `content` folder](content). Your filename MUST match the GitHub technology partner name, and use the `.md` file extension.
39+
40+
**The `Pull Request`:**
41+
42+
- [ ] MUST reference this issue, e.g. via `closes #<this issue number>`
43+
- [ ] MUST pass the automated CI checks
44+
- [ ] MUST include links to supporting material demonstrating the functionality being documented (this can be a link to a public GitHub repo, _or_ a video / screencast walkthrough)
45+
46+
Once all tasks are completed, please mention `@github/docs-content` for next steps.
47+
48+
/cc @github/partner-engineering for :eyes:
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Change production configuration
3+
about: Track changes to the production docs.github.com site
4+
title: ''
5+
labels: engineering
6+
assignees: ''
7+
---
8+
9+
A configuration change would be something outside of our code that we change with our production environment, such as environment variables, virtual machine tier or quantity, or service providers.
10+
11+
- _Primary person_:
12+
- _Second person_:
13+
- _When_:
14+
- _Zoom URL_:
15+
16+
### What is the configuration change?
17+
18+
### Why are we updating this configuration?
19+
20+
### What risks are there with this configuration change?
21+
22+
### If an issue happens, how do we roll back?
23+
24+
Once the change is verified good, please close this issue.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Thanks again!
1515
<!--
1616
- If there's an existing issue for your change, please link to it.
1717
- If there's _not_ an existing issue, please open one first to make it more likely that this update will be accepted: https://github.com/github/docs/issues/new/choose. -->
18+
**Closes [issue link]**
1819

1920
### What's being changed:
2021

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env node
2+
3+
const github = require('@actions/github')
4+
const core = require('@actions/core')
5+
6+
async function run () {
7+
const token = process.env.GITHUB_TOKEN
8+
const octokit = github.getOctokit(token)
9+
const query = encodeURIComponent('is:open repo:github/docs-internal is:issue')
10+
11+
const deprecationIssues = await octokit.request(`GET /search/issues?q=${query}+label:"enterprise%20deprecation"`)
12+
const releaseIssues = await octokit.request(`GET /search/issues?q=${query}+label:"enterprise%20release"`)
13+
const isDeprecationIssue = deprecationIssues.data.items.length === 0 ? 'false' : 'true'
14+
const isReleaseIssue = releaseIssues.data.items.length === 0 ? 'false' : 'true'
15+
core.setOutput('deprecationIssue', isDeprecationIssue)
16+
core.setOutput('releaseIssue', isReleaseIssue)
17+
return `Set outputs deprecationIssue: ${isDeprecationIssue}, releaseIssue: ${isReleaseIssue}`
18+
}
19+
20+
run()
21+
.then(
22+
(response) => { console.log(`Finished running: ${response}`) },
23+
(error) => {
24+
console.log(`#ERROR# ${error}`)
25+
process.exit(1)
26+
}
27+
)
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
#!/usr/bin/env node
2+
3+
const fs = require('fs')
4+
const path = require('path')
5+
const github = require('@actions/github')
6+
const enterpriseDates = require('../../lib/enterprise-dates')
7+
const { latest, oldestSupported } = require('../../lib/enterprise-server-releases')
8+
const acceptedMilestones = ['release', 'deprecation']
9+
const teamsToCC = '/cc @github/docs-content @github/docs-engineering'
10+
11+
// Adjust these values as needed.
12+
const numberOfdaysBeforeReleaseToOpenIssue = 30
13+
const numberOfdaysBeforeDeprecationToOpenIssue = 15
14+
15+
// [start-readme]
16+
//
17+
// This script runs once per day via a scheduled GitHub Action to check whether
18+
// an Enterprise release or deprecation milestone is within the specified
19+
// number of days.
20+
//
21+
// When a milestone is within the specified number of days, a new issue is
22+
// created using the templates in
23+
// .github/actions-scripts/enterprise-server-issue-templates.
24+
//
25+
// Release issues are then added to the docs content squad board for triage.
26+
// Deprecations issues are owned by docs engineering and are added to the
27+
// docs engineering squad board automatically when the engineering label is added.
28+
//
29+
// [end-readme]
30+
31+
run()
32+
33+
async function run () {
34+
35+
36+
const milestone = process.argv[2]
37+
if (!acceptedMilestones.includes(milestone)) {
38+
console.log('Please specify either \'release\' or \'deprecation\'\n')
39+
console.log('Example: script/open-enterprise-issue.js release')
40+
process.exit(1)
41+
}
42+
43+
// Milestone-dependent values.
44+
const numberOfdaysBeforeMilestoneToOpenIssue = milestone === 'release'
45+
? numberOfdaysBeforeReleaseToOpenIssue
46+
: numberOfdaysBeforeDeprecationToOpenIssue
47+
48+
const versionNumber = milestone === 'release'
49+
? getNextVersionNumber()
50+
: oldestSupported
51+
52+
if (!versionNumber) {
53+
console.log(`Could not find the next version number after ${latest} in enterprise-dates.json. Try running script/udpate-enterprise-dates.js, then rerun this script.`)
54+
process.exit(0)
55+
}
56+
57+
const datesForVersion = enterpriseDates[versionNumber]
58+
59+
if (!datesForVersion) {
60+
console.log(`Could not find ${versionNumber} in enterprise-dates.json. Try running script/udpate-enterprise-dates.js, then rerun this script.`)
61+
process.exit(0)
62+
}
63+
64+
const nextMilestoneDate = datesForVersion[`${milestone}Date`]
65+
const daysUntilMilestone = calculateDaysUntilMilestone(nextMilestoneDate)
66+
67+
// If the milestone is more than the specific days away, exit now.
68+
if (daysUntilMilestone > numberOfdaysBeforeMilestoneToOpenIssue) {
69+
console.log(`The ${versionNumber} ${milestone} is not until ${nextMilestoneDate}! An issue will be opened when it is ${numberOfdaysBeforeMilestoneToOpenIssue} days away.`)
70+
process.exit(0)
71+
}
72+
73+
const milestoneSteps = fs.readFileSync(path.join(process.cwd(), `.github/actions-scripts/enterprise-server-issue-templates/${milestone}-issue.md`), 'utf8')
74+
const issueLabels = [`enterprise ${milestone}`, `engineering`]
75+
const issueTitle = `[${nextMilestoneDate}] Enterprise Server ${versionNumber} ${milestone} (technical steps)`
76+
77+
const issueBody = `GHES ${versionNumber} ${milestone} occurs on ${nextMilestoneDate}.
78+
\n${milestoneSteps}
79+
${teamsToCC}`
80+
81+
const token = process.env.GITHUB_TOKEN
82+
83+
// Create the milestone issue
84+
const octokit = github.getOctokit(token)
85+
try {
86+
issue = await octokit.request('POST /repos/{owner}/{repo}/issues', {
87+
owner: 'github',
88+
repo: 'docs-internal',
89+
title: issueTitle,
90+
body: issueBody,
91+
labels: issueLabels
92+
})
93+
if (issue.status === 201) {
94+
// Write the values to disk for use in the workflow.
95+
console.log(`Issue #${issue.data.number} for the ${versionNumber} ${milestone} was opened: ${issue.data.html_url}`)
96+
}
97+
} catch (error) {
98+
console.error(`#ERROR# ${error}`)
99+
console.log(`🛑 There was an error creating the issue.`)
100+
process.exit(1)
101+
}
102+
103+
// Add the release issue to the 'Needs triage' column on the
104+
// docs content squad project board:
105+
// https://github.com/orgs/github/projects/1773#column-12198119
106+
// Deprecation issues are owned by docs engineering only and will
107+
// be triaged by adding the engineering label to the issue.
108+
if (milestone === 'release') {
109+
try {
110+
const addCard = await octokit.request('POST /projects/columns/{column_id}/cards', {
111+
column_id: 12198119,
112+
content_id: issue.data.id,
113+
content_type: 'Issue',
114+
mediaType: {
115+
previews: [
116+
'inertia'
117+
]
118+
}
119+
})
120+
121+
if (addCard.status === 201) {
122+
// Write the values to disk for use in the workflow.
123+
console.log(`The issue #${issue.data.number} was added to https://github.com/orgs/github/projects/1773#column-12198119.`)
124+
}
125+
} catch(error) {
126+
console.error(`#ERROR# ${error}`)
127+
console.log(`🛑 There was an error adding the issue to the project board.`)
128+
process.exit(1)
129+
}
130+
}
131+
}
132+
133+
function getNextVersionNumber () {
134+
const indexOfLatest = Object.keys(enterpriseDates).indexOf(latest)
135+
const indexOfNext = indexOfLatest + 1
136+
return Object.keys(enterpriseDates)[indexOfNext]
137+
}
138+
139+
function calculateDaysUntilMilestone (nextMilestoneDate) {
140+
const today = new Date().toISOString().slice(0, 10)
141+
const differenceInMilliseconds = getTime(nextMilestoneDate) - getTime(today)
142+
// Return the difference in days
143+
return Math.floor((differenceInMilliseconds) / (1000 * 60 * 60 * 24))
144+
}
145+
146+
function getTime (date) {
147+
return new Date(date).getTime()
148+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
## Overview
2+
3+
The day after a GHES version's [deprecation date](https://github.com/github/docs-internal/tree/main/lib/enterprise-dates.json), a banner on the docs will say: `This version was deprecated on <date>.` This is all users need to know. However, we don't want to update those docs anymore or link to them in the nav. Follow the steps in this issue to **archive** the docs.
4+
5+
**Note**: Do each step below in a separate PR. Only move on to the next step when the previous PR has been merged.
6+
7+
## Step 1: Scrape the docs and archive the files
8+
9+
- [ ] In your checkout of the [repo with archived GHES content](https://github.com/github/help-docs-archived-enterprise-versions), create a new branch: `git checkout -b deprecate-<version>`
10+
- [ ] In your `docs-internal` checkout, download the static files for the oldest supported version into your archival checkout:
11+
```
12+
$ script/enterprise-server-deprecations/archive-version.js -p <path-to-archive-repo-checkout>
13+
```
14+
If your checkouts live in the same directory, this command would be:
15+
```
16+
$ script/enterprise-server-deprecations/archive-version.js -p ../help-docs-archived-enterprise-versions
17+
```
18+
**Note:** You can pass the `--dry-run` flag to scrape only the first 10 pages plus their redirects for testing purposes.
19+
20+
## Step 2: Upload the assets directory to Azure storage
21+
22+
- [ ] Log in to the Azure portal from Okta. Navigate to the [githubdocs Azure Storage Blob resoruce](https://portal.azure.com/#@githubazure.onmicrosoft.com/resource/subscriptions/fa6134a7-f27e-4972-8e9f-0cedffa328f1/resourceGroups/docs-production/providers/Microsoft.Storage/storageAccounts/githubdocs/overview).
23+
- [ ] Click the "Open in Explorer" button to the right of search box.If you haven't already, click the download link to download "Microsoft Azure Storage Explorer." To login to the app, click the plug icon in the left sidebar and click the option to "add an azure account." When you login, you'll need a yubikey to authenticate through Okta.
24+
- [ ] From the Microsoft Azure Storage Explorer app, select the `githubdocs` storage account resource and navigate to the `github-images` blob container.
25+
- [ ] Click "Upload" and select "Upload folder." Click the "Selected folder" input to navigate to the `help-docs-archived-enterprise-versions` repository and select the `assets` directory for the version you just generated. In the "Destination folder" input, add the version number. For example, `/enterprise/2.22/`.
26+
- [ ] Check the log to ensure all files were uploaded successfully.
27+
- [ ] Removed the `assets` directory from the `/help-docsc-archived-enterprise-versions` repository.
28+
29+
## Step 3: Commit and push changes to help-docs-archived-enterprise-versions repo
30+
31+
- [ ] In your archival checkout, `git add <version>`, commit, and push.
32+
- [ ] Open a PR and merge it in. Note that the version will _not_ be deprecated on the docs site until you do the next step.
33+
34+
## Step 4: Deprecate the version in docs-internal
35+
36+
In your `docs-internal` checkout:
37+
- [ ] Create a new branch: `git checkout -b deprecate-<version>`.
38+
- [ ] Edit `lib/enterprise-server-releases.js` by moving the number to be deprecated into the `deprecated` array.
39+
- [ ] Run `script/enterprise-server-deprecations/remove-static-files.js` and commit results.
40+
- [ ] Manually remove entries for the deprecated version from `lib/redirects/static/developer-docs-routes-for-supported-versions.json`.
41+
- **Note**: These entries only go up to 2.21. We can remove this step once 2.21 is deprecated.
42+
- [ ] Open a new PR. Make sure to check the following:
43+
- [ ] Tests are passing.
44+
- [ ] The deprecated version renders on staging as expected.
45+
- [ ] The new oldest supported version renders on staging as expected. Also check the banner text.
46+
- [ ] When the PR is approved, merge it in to complete the deprecation.
47+
48+
## Step 5: Remove outdated Liquid markup and frontmatter
49+
50+
The following steps are somewhat optional and can be completed at any time. They do not have user impact; they just clear out old Liquid statements for the deprecated version, which makes things easier for content writers.
51+
52+
In your `docs-internal` checkout:
53+
- [ ] Create a new branch: `git checkout -b remove-<version>-markup`
54+
- [ ] Run the script: `script/remove-deprecated-enterprise-version-markup.js --release <number>`.
55+
- [ ] Spot check a few changes. Content, frontmatter, and data files should all have been updated.
56+
- [ ] Open a PR with the results. The diff may be large and complex, so make sure to get a review from `@github/docs-content`.
57+
- [ ] Debug any test failures or unexpected results.

0 commit comments

Comments
 (0)