Skip to content

Commit c7828b1

Browse files
heiskrCopilotCopilot
authored
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>
1 parent fd2533f commit c7828b1

File tree

1 file changed

+87
-1
lines changed

1 file changed

+87
-1
lines changed

src/ghes-releases/lib/deprecation-steps.md

Lines changed: 87 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ Before beginning the deprecation, ensure the date of the deprecation is correctl
3434

3535
1. When the PR is approved, merge it in.
3636

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+
3743
## Step 1: Create the new archived repository
3844

3945
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
5056
npm run deprecate-ghes -- create-repo --version 3.11
5157
```
5258

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>
5466

5567
## Step 2: Dry run: Scrape the docs and archive the files
5668

@@ -112,6 +124,20 @@ All previously archived content lives in its own repository. For example, GHES 3
112124

113125
1. Check in any change to `src/ghes-releases/lib/enterprise-dates.json`.
114126

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+
115141
## Step 3: Commit the scraped docs to the new repository
116142

117143
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
122148

123149
1. Remove the `tmpArchivalDir_<VERSION_TO_DEPRECATE>` directory from your `github/docs-internal` checkout.
124150

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+
125157
## Step 4: Deprecate the GHES release in docs-internal
126158

127159
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
187219

188220
1. 🚢 Ship the change.
189221

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+
190264
## Step 5: Create a tag
191265

192266
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`.
193267

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+
194274
## Step 6: Deprecate the OpenAPI description in `github/github`
195275

196276
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
199279

200280
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.
201281

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+
202288
## Configuring the translation repositories
203289

204290
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

Comments
 (0)