Skip to content

Commit 972814d

Browse files
author
Ramya Parimi
authored
Merge branch 'main' into patch-2
2 parents b276996 + c99a75f commit 972814d

File tree

283 files changed

+10571
-2542
lines changed

Some content is hidden

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

283 files changed

+10571
-2542
lines changed

.github/actions-scripts/check-for-enterprise-issues-by-label.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ import { setOutput } from '@actions/core'
66
async function run() {
77
const token = process.env.GITHUB_TOKEN
88
const octokit = getOctokit(token)
9-
const query = encodeURIComponent('is:open repo:github/docs-internal is:issue')
9+
const queryDeprecation = encodeURIComponent('is:open repo:github/docs-engineering is:issue')
10+
const queryRelease = encodeURIComponent('is:open repo:github/docs-content is:issue')
1011

1112
const deprecationIssues = await octokit.request(
12-
`GET /search/issues?q=${query}+label:"enterprise%20deprecation"`
13+
`GET /search/issues?q=${queryDeprecation}+label:"enterprise%20deprecation"`
1314
)
1415
const releaseIssues = await octokit.request(
15-
`GET /search/issues?q=${query}+label:"enterprise%20release"`
16+
`GET /search/issues?q=${queryRelease}+label:"enterprise%20release"`
1617
)
1718
const isDeprecationIssue = deprecationIssues.data.items.length === 0 ? 'false' : 'true'
1819
const isReleaseIssue = releaseIssues.data.items.length === 0 ? 'false' : 'true'

.github/actions-scripts/create-enterprise-issue.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
import fs from 'fs/promises'
44
import path from 'path'
55
import { getOctokit } from '@actions/github'
6-
import enterpriseDates from '../../lib/enterprise-dates.js'
76
import { latest, oldestSupported } from '../../lib/enterprise-server-releases.js'
7+
const enterpriseDates = JSON.parse(
8+
await fs.readFile(path.join(process.cwd(), 'lib/enterprise-dates.json'))
9+
)
810

911
const acceptedMilestones = ['release', 'deprecation']
1012
const teamsToCC = '/cc @github/docs-content @github/docs-engineering'
@@ -39,6 +41,8 @@ async function run() {
3941
process.exit(1)
4042
}
4143

44+
const repoToOpenIssue = milestone === 'release' ? 'docs-content' : 'docs-engineering'
45+
4246
// Milestone-dependent values.
4347
const numberOfdaysBeforeMilestoneToOpenIssue =
4448
milestone === 'release'
@@ -49,7 +53,7 @@ async function run() {
4953

5054
if (!versionNumber) {
5155
console.log(
52-
`Could not find the next version number after ${latest} in enterprise-dates.json. Try running script/udpate-enterprise-dates.js, then rerun this script.`
56+
`Could not find the next version number after ${latest} in enterprise-dates.json. Try running script/update-enterprise-dates.js, then rerun this script.`
5357
)
5458
process.exit(0)
5559
}
@@ -58,7 +62,7 @@ async function run() {
5862

5963
if (!datesForVersion) {
6064
console.log(
61-
`Could not find ${versionNumber} in enterprise-dates.json. Try running script/udpate-enterprise-dates.js, then rerun this script.`
65+
`Could not find ${versionNumber} in enterprise-dates.json. Try running script/update-enterprise-dates.js, then rerun this script.`
6266
)
6367
process.exit(0)
6468
}
@@ -81,7 +85,9 @@ async function run() {
8185
),
8286
'utf8'
8387
)
84-
const issueLabels = [`enterprise ${milestone}`, `engineering`]
88+
const issueLabels = milestone === 'release'
89+
? ['enterprise release']
90+
: ['enteprise deprecation', 'priority-3']
8591
const issueTitle = `[${nextMilestoneDate}] Enterprise Server ${versionNumber} ${milestone} (technical steps)`
8692

8793
const issueBody = `GHES ${versionNumber} ${milestone} occurs on ${nextMilestoneDate}.
@@ -92,10 +98,11 @@ async function run() {
9298

9399
// Create the milestone issue
94100
const octokit = getOctokit(token)
101+
let issue
95102
try {
96103
issue = await octokit.request('POST /repos/{owner}/{repo}/issues', {
97104
owner: 'github',
98-
repo: 'docs-internal',
105+
repo: repoToOpenIssue,
99106
title: issueTitle,
100107
body: issueBody,
101108
labels: issueLabels,
Lines changed: 60 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,89 @@
1+
**Maintaining this template:** If you notice that any of these steps become out-of-date, open a pull request to update this [issue template](https://github.com/github/docs-internal/blob/main/.github/actions-scripts/enterprise-server-issue-templates/release-issue.md).
2+
13
## To enable the new version
24

35
**Do these steps in a local checkout to create a GHES release branch with passing tests:**
46

7+
If you aren't comfortable going through the steps alone, sync up with a docs engineer to pair with.
8+
9+
- [ ] Create a new branch from `main` with the name `ghes-<RELEASE>-megabranch`. e.g. `ghes-3.2-megabranch`.
510
- [ ] In [lib/enterprise-server-releases.js](https://github.com/github/docs-internal/blob/main/lib/enterprise-server-releases.js):
6-
- [ ] Prepend the new release number to the `supported` array.
7-
- [ ] Increment the `next` variable above the `supported` array (e.g., new release number + `.1`)
8-
- [ ] Update the GHES dates file (requires a PAT in a local `.env` file):
11+
- [ ] Prepend the new release number to the `supported` array.
12+
- [ ] Increment the `next` variable above the `supported` array (e.g., new release number + `.1`)
13+
- [ ] Update the GHES dates file:
14+
- [ ] Make sure you have a `.env` file at the root directory of your local checkout, and that it contains a PAT in the format of `GITHUB_TOKEN=<token>`.
15+
- [ ] Run the script to update the dates file:
16+
917
```
1018
script/update-enterprise-dates.js
1119
```
1220
- [ ] Create REST files based on previous version:
13-
```
14-
script/enterprise-server-releases/create-rest-files.js --oldVersion <PLAN@RELEASE> --newVersion <PLAN@RELEASE>
15-
```
21+
22+
```
23+
script/enterprise-server-releases/create-rest-files.js --oldVersion <PLAN@RELEASE> --newVersion <PLAN@RELEASE>
24+
```
1625
- [ ] Create GraphQL files based on previous version:
17-
```
18-
script/enterprise-server-releases/create-graphql-files.js --oldVersion <PLAN@RELEASE> --newVersion <PLAN@RELEASE>
19-
```
26+
27+
```
28+
script/enterprise-server-releases/create-graphql-files.js --oldVersion <PLAN@RELEASE> --newVersion <PLAN@RELEASE>
29+
```
2030
- [ ] Create webhook files based on previous version:
21-
```
22-
script/enterprise-server-release/create-webhook-files.js --oldVersion <PLAN@RELEASE> --newVersion <PLAN@RELEASE>
23-
```
24-
- [ ] Create a placeholder release notes file called `data/release-notes/<RELEASE NUMBER>/PLACEHOLDER.yml`. For example `data/release-notes/3-1/PLACEHOLDER.yml`. Add the following placeholder content to the file:
25-
```
26-
date: '2021-05-04'
27-
release_candidate: true
28-
deprecated: false
29-
intro: PLACEHOLDER
30-
sections:
31+
32+
```
33+
script/enterprise-server-releases/create-webhook-files.js --oldVersion <PLAN@RELEASE> --newVersion <PLAN@RELEASE>
34+
```
35+
- [ ] Create a placeholder release notes file called `data/release-notes/<PRODUCT>/<RELEASE NUMBER>/PLACEHOLDER.yml`. For example `data/release-notes/3-1/PLACEHOLDER.yml`. Add the following placeholder content to the file:
36+
37+
```
38+
date: '2021-05-04'
39+
release_candidate: true
40+
deprecated: false
41+
intro: PLACEHOLDER
42+
sections:
3143
bugs:
32-
- PLACEHOLDER
44+
- PLACEHOLDER
3345
known_issues:
34-
- PLACEHOLDER
35-
```
36-
**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.
46+
- PLACEHOLDER
47+
```
48+
49+
**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.
3750
- [ ] Create the search indices for the new release:
38-
```
39-
npm run sync-search-ghes-release
40-
```
4151
42-
Check in the updated `lib/search/cached-index-names.json`.
52+
```
53+
npm run sync-search-ghes-release
54+
```
55+
56+
Check in the updated `lib/search/cached-index-names.json`.
4357
- [ ] (Optional) Add a Release Candidate banner:
44-
```
45-
script/enterprise-server-releases/release-banner.js --action create --version <PLAN@RELEASE>
46-
```
58+
59+
```
60+
script/enterprise-server-releases/release-banner.js --action create --version <PLAN@RELEASE>
61+
```
4762
4863
### When the `docs-internal` release branch is open
4964
5065
- [ ] Add a label to the PR in this format:
51-
```
52-
sync-english-index-for-<PLAN@RELEASE>
53-
```
54-
☝️ This will run a workflow **on every push to the PR** that will sync **only** the English index for the new version. 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.
5566
56-
- [ ] In `github/github`, to create a new GHES release follow these steps:
67+
```
68+
sync-english-index-for-<PLAN@RELEASE>
69+
```
70+
71+
☝️ This will run a workflow **on every push to the PR** that will sync **only** the English index for the new version. 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.
72+
73+
- [ ] In `github/github`, to create a new GHES release follow these steps (some of these steps may have already been done):
5774
- [ ] 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`.
5875
- [ ] Update the `externalDocs.url` property in that file to use the new GHES release number.
5976
- [ ] 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`.
6077
- [ ] Update the `variables.externalDocsUrl`, `variables.ghesVersion`, and `patch.[].value.url` in that file to use the new GHES release number.
6178
- [ ] Update `published` in that file to `false`. **Note:** This is important to ensure that changes for the next version of the OpenAPI schema changes are not made public until the new version is released.
6279
- [ ] Create a second PR based on the PR created ☝️ that toggles `published` to `true` in the `app/api/description/config/releases/ghes-<NEXT RELEASE NUMBER>.yaml` file. When this PR merges it will publish the new release to the `github/rest-api-description` repo and will trigger a pull request in the `github/docs-internal` repo with the schemas for the next GHES release. There is a step in this list to merge that PR in the "Before shipping the release branch" section.
6380
64-
### Maintaining this template
65-
66-
- [ ] If you notice that any of these steps become out-of-date, open a pull request to update this [issue template](https://github.com/github/docs-internal/blob/main/.github/actions-scripts/enterprise-server-issue-templates/release-issue.md).
67-
6881
### Troubleshooting
6982
7083
#### `OpenAPI dev mode check / check-schema-versions` failures
7184
7285
If the `OpenAPI dev mode check / check-schema-versions` check fails with the following message:
86+
7387
> :construction::warning: Your decorated and dereferenced schema files don't match. Ensure you're using decorated and dereferenced schemas from the automatically created pull requests by the 'github-openapi-bot' user. For more information, see 'script/rest/README.md'
7488
7589
- run `git checkout origin/main lib/rest/static/*`
@@ -78,7 +92,8 @@ If the `OpenAPI dev mode check / check-schema-versions` check fails with the fol
7892
7993
#### `Node.js tests / test content` failures
8094
81-
If the `Node.js tests / test content` check fails with the following message, the `lib/enterprise-dates.json` file is not up-to-date:
95+
If the `Node.js tests / test content` check fails with the following message, the `lib/enterprise-dates.json` file is not up-to-date:
96+
8297
> FAIL tests/content/search.js ● search › has remote indexNames in every language for every supported GHE version
8398
8499
This file should be automatically updated, but you can also run `script/update-enterprise-dates.js` to update it. **Note:** If the test is still failing after running this script, look at the dates for this release. If the date is still inaccurate, it may be an issue with the source at https://github.com/github/enterprise-releases/blob/master/docs/supported-versions.md#release-lifecycle-dates. If that is the case, manually update the dates in the `lib/enterprise-dates.json` file.
@@ -87,11 +102,14 @@ This file should be automatically updated, but you can also run `script/update-e
87102
88103
- [ ] Add the GHES release notes to `data/release-notes/` and update the versioning frontmatter in `content/admin/release-notes.md` to `enterprise-server: '<=<RELEASE>'`
89104
- [ ] Alert the Neon Squad (formally docs-ecosystem team) 1-2 days before the release to deploy to `github/github`. A PR should already be open in `github/github`, to change `published` to `true` in `app/api/description/config/releases/ghes-<NEXT RELEASE NUMBER>.yaml`. They will need to:
90-
- [ ] Get the required approval from `@github/ecosystem-api-reviewers` then deploy the PR to dotcom. This process generally takes 30-90 minutes.
105+
- [ ] Get the required approval from `@github/ecosystem-api-reviewers` then deploy the PR to dotcom. This process generally takes 30-90 minutes.
91106
- [ ] Once the PR merges, make sure that the auto-generated PR titled "Update OpenAPI Descriptions" in doc-internal contains both the derefrenced and decorated JSON files for the new GHES release. If everything looks good, merge the "Update OpenAPI Description" PR into the GHES release megabranch.
92107
- [ ] Add a blocking review to the auto-generated "Update OpenAPI Descriptions" PR in the public REST API description. (Remove this blocking review once the GHES release ships.)
108+
- [ ] [Freeze the repos](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/freezing.md) at least 1-2 days before the release, and post an announcement in Slack so everybody knows.
93109
94110
### 🚢 🛳️ 🚢 Shipping the release branch
95111
112+
- [ ] Remove `[DO NOT MERGE]` and other meta information from the PR title 😜.
96113
- [ ] The `github/docs-internal` repo is frozen, and the `Repo Freeze Check / Prevent merging during deployment freezes (pull_request_target)` test is expected to fail. Use admin permissions to ship the release branch with this failure.
97-
- [ ] Once smoke tests have passed, you can unfreeze the repos by deleting the `FREEZE` secret in both the `github/docs-internal` and `github/docs` repos. To delete the secrets, click the repo **Settings** tab and then click **Secrets** in the left sidebar. Click **Remove** next to the `FREEZE` secret.
114+
- [ ] Do any required smoke tests.
115+
- [ ] Once smoke tests have passed, you can [unfreeze the repos](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/freezing.md) and post an announcement in Slack.

0 commit comments

Comments
 (0)