You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Copilot prompts to GHES deprecation runbook (#60062)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: src/ghes-releases/lib/deprecation-steps.md
+87-1Lines changed: 87 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,12 @@ Before beginning the deprecation, ensure the date of the deprecation is correctl
34
34
35
35
1. When the PR is approved, merge it in.
36
36
37
+
<details><summary><strong>🤖 Copilot prompt for Step 0</strong></summary>
38
+
39
+
> I'm preparing to deprecate GHES VERSION_NUMBER. Read `src/ghes-releases/lib/enterprise-dates.json` in docs-internal and find the deprecation date for this version. Then draft a Slack message I can send to the PRP owner to confirm the date is correct. Also check `github/enterprise-releases/releases.json` and identify the PRP owner for this version.
40
+
41
+
</details>
42
+
37
43
## Step 1: Create the new archived repository
38
44
39
45
All previously archived content lives in its own repository. For example, GHES 3.11 archived content is located in https://github.com/github/docs-ghes-3.11.
@@ -50,7 +56,13 @@ All previously archived content lives in its own repository. For example, GHES 3
50
56
npm run deprecate-ghes -- create-repo --version 3.11
51
57
```
52
58
53
-
1. From the new repository's home page, click the gear icon next to the "About" section and deselect the "Releases", "Packages", and "Depployments" checkboxes. Click "Save changes".
59
+
1. From the new repository's home page, click the gear icon next to the "About" section and deselect the "Releases", "Packages", and "Deployments" checkboxes. Click "Save changes".
60
+
61
+
<details><summary><strong>🤖 Copilot prompt for Step 1</strong></summary>
62
+
63
+
> Run `npm run deprecate-ghes -- create-repo --version VERSION_NUMBER` and show me the output. If the script fails (API errors, permission issues, path problems), diagnose the error and suggest a fix. The `create-docs-ghes-version-repo.sh` script may have hardcoded paths or assumptions that need updating.
64
+
65
+
</details>
54
66
55
67
## Step 2: Dry run: Scrape the docs and archive the files
56
68
@@ -112,6 +124,20 @@ All previously archived content lives in its own repository. For example, GHES 3
112
124
113
125
1. Check in any change to `src/ghes-releases/lib/enterprise-dates.json`.
114
126
127
+
<details><summary><strong>🤖 Copilot prompt for Step 2</strong></summary>
128
+
129
+
> I'm doing a dry run of the GHES VERSION_NUMBER deprecation archive scrape.
130
+
>
131
+
> First, in `src/search/components/input/SearchBarButton.tsx`, wrap the return statement content in a `<div className="visually-hidden">` wrapper. Do the same in `src/search/components/input/SearchOverlayContainer.tsx` for the SearchOverlay component when `isSearchOpen` is true.
132
+
>
133
+
> Then run `npm run build` and show me the output. If the build succeeds, run `npm run deprecate-ghes-archive -- --dry-run --local-dev` and show me the output. Tell me if any errors occurred.
134
+
>
135
+
> After I've reviewed the dry run output, run the full scrape: `npm run deprecate-ghes-archive`. This will take 20-30 minutes.
136
+
>
137
+
> When the scrape completes, revert the search component changes: `git checkout src/search/components/input/SearchBarButton.tsx src/search/components/input/SearchOverlayContainer.tsx`. Verify the files are reverted.
138
+
139
+
</details>
140
+
115
141
## Step 3: Commit the scraped docs to the new repository
116
142
117
143
1. Copy the scraped files from the `tmpArchivalDir_<VERSION_TO_DEPRECATE>` directory in `docs-internal` over to the new `github/docs-ghes-<RELEASE_NUM>` repository.
@@ -122,6 +148,12 @@ All previously archived content lives in its own repository. For example, GHES 3
122
148
123
149
1. Remove the `tmpArchivalDir_<VERSION_TO_DEPRECATE>` directory from your `github/docs-internal` checkout.
124
150
151
+
<details><summary><strong>🤖 Copilot prompt for Step 3</strong></summary>
152
+
153
+
> Copy the scraped files from `tmpArchivalDir_<VERSION_TO_DEPRECATE>` to the `github/docs-ghes-<RELEASE_NUM>` repository. Commit all the files with the message "Archive GHES <RELEASE_NUM> docs". Verify the commit succeeded and show me the file count. Then remove the `tmpArchivalDir_<VERSION_TO_DEPRECATE>` directory from docs-internal.
154
+
155
+
</details>
156
+
125
157
## Step 4: Deprecate the GHES release in docs-internal
126
158
127
159
1. In your `docs-internal` checkout, create a new branch: `git checkout -b deprecate-<version>`.
@@ -187,10 +219,58 @@ All previously archived content lives in its own repository. For example, GHES 3
187
219
188
220
1. 🚢 Ship the change.
189
221
222
+
<details><summary><strong>🤖 Copilot prompt for Step 4 — initial setup</strong></summary>
223
+
224
+
> I'm deprecating GHES VERSION_NUMBER in docs-internal. In `src/versions/lib/enterprise-server-releases.ts`, remove `'VERSION_NUMBER'` from the `supported` array and add it as the first element of the `deprecatedWithFunctionalRedirects` array. Show me the diff.
225
+
226
+
</details>
227
+
228
+
<details><summary><strong>🤖 Copilot prompt for Step 4 — run deprecation scripts</strong></summary>
229
+
230
+
> Run `npm run deprecate-ghes -- pipelines` and show me the output. If there are errors, diagnose and fix them.
231
+
>
232
+
> Then run `npm run deprecate-ghes -- content` and show me the output. If there are errors, diagnose and fix them.
233
+
234
+
</details>
235
+
236
+
<details><summary><strong>🤖 Copilot prompt for Step 4 — lint and fix Liquid</strong></summary>
237
+
238
+
> Run `npm run lint-content -- --paths content data --rules liquid-ifversion-versions --fix`. Some `data/variables/*.yml` files can't be auto-fixed and will show as errors. For each error, open the file, find the key mentioned in the error, and remove the deprecated Liquid conditional for GHES VERSION_NUMBER while preserving the content for supported versions. Show me each change you make.
239
+
240
+
</details>
241
+
242
+
<details><summary><strong>🤖 Copilot prompt for Step 4 — clean up data and remaining issues</strong></summary>
243
+
244
+
> Run `npm run deprecate-ghes -- data` and show me the output.
245
+
>
246
+
> Then run `npm run lint-content -- --fix` to remove whitespace and check for other errors.
247
+
>
248
+
> Search the codebase for any remaining table pipe artifacts from removed Liquid conditionals. Look for lines matching `^\|\s*\|$` or `^\s?\|\s?$` across all content and data files. Remove any you find.
249
+
>
250
+
> Show me a summary of all changes made.
251
+
252
+
</details>
253
+
254
+
<details><summary><strong>🤖 Copilot prompt for Step 4 — final validation</strong></summary>
255
+
256
+
> Run `npm run lint-content` and show me any remaining errors. For each error, fix it and show me the change.
257
+
>
258
+
> Then run `npm run test -- src/versions` to check version-related tests still pass.
259
+
>
260
+
> Summarize all changes made so far so I can review before committing.
261
+
262
+
</details>
263
+
190
264
## Step 5: Create a tag
191
265
192
266
1. Create a new tag for the most recent commit on the `main` branch so that we can keep track of where in commit history we removed the GHES release. Create a tag called `enterprise-<release number>-deprecation`. On your local, `git checkout main`, `git pull`, `git tag enterprise-<version>-deprecation`, then `git push --tags --no-verify`.
193
267
268
+
<details><summary><strong>🤖 Copilot prompt for Step 5</strong></summary>
269
+
270
+
> Run `git checkout main && git pull` then `git tag enterprise-VERSION_NUMBER-deprecation && git push --tags --no-verify`. Show me the output.
271
+
272
+
</details>
273
+
194
274
## Step 6: Deprecate the OpenAPI description in `github/github`
195
275
196
276
1. In `github/github`, edit the release's config file in `app/api/description/config/releases/`, and change `deprecated: false` to `deprecated: true`.
@@ -199,6 +279,12 @@ All previously archived content lives in its own repository. For example, GHES 3
199
279
200
280
1. When the PR is approved, [deploy the `github/github` PR](https://thehub.github.com/epd/engineering/devops/deployment/deploying-dotcom/). If you haven't deployed a `github/github` PR before, work with someone that has -- the process isn't too involved depending on how you deploy, but there are a lot of details that can potentially be confusing as you can see from the documentation.
201
281
282
+
<details><summary><strong>🤖 Copilot prompt for Step 6</strong></summary>
283
+
284
+
> In the `github/github` repository, find the config file for GHES VERSION_NUMBER in `app/api/description/config/releases/`. Change `deprecated: false` to `deprecated: true`. Show me the diff and open a PR with the title "Deprecate GHES VERSION_NUMBER OpenAPI description".
285
+
286
+
</details>
287
+
202
288
## Configuring the translation repositories
203
289
204
290
You can clone the translation repositories directly inside of your docs-internal checkout, but I'd recommend cloning them in a separate directory. For example, create a `translations` directory at the same level as your `docs-internal` directory. Inside of the `translations` directory, clone the following repoisitories (ensure this list includes all languages that we are supporting):
0 commit comments