Skip to content

Commit 3e998f6

Browse files
rachmarilecoursenmchammer01
authored
use azure blob storage for archived enterprise versions (#31883)
Co-authored-by: Laura Coursen <[email protected]> Co-authored-by: mchammer01 <[email protected]>
1 parent 2cf9768 commit 3e998f6

File tree

546 files changed

+841
-1000122
lines changed

Some content is hidden

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

546 files changed

+841
-1000122
lines changed

.github/actions-scripts/enterprise-server-issue-templates/deprecation-issue.md

+65-29
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ The day after a GHES version's [deprecation date](https://github.com/github/docs
66

77
The following large repositories are used throughout this checklist, it may be useful to clone them before you begin:
88

9-
- `github/help-docs-archived-enterprise-versions`
109
- `github/github`
1110
- `github/docs-internal`
1211

@@ -18,46 +17,85 @@ Additionally, you may want to download:
1817

1918
**Note**: This step can be performed independently of all other steps, and can be done several days before or along with the other steps.
2019

21-
- [ ] In the `docs-content` repo, remove the deprecated GHES version number from the "Specific GHES version(s)" section in the following files (in the `.github/ISSUE_TEMPLATE/` directory): [`release-tier-1-or-2-tracking.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-1-or-2-tracking.yml) and [`release-tier-3-or-tier-4.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-3-or-tier-4.yml).
20+
- [ ] In the `docs-content` repo, remove the deprecated GHES version number from the `options` list in the following files (in the `.github/ISSUE_TEMPLATE/` directory): [`release-tier-1-or-2-tracking.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-1-or-2-tracking.yml) and [`release-tier-3-or-tier-4.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-3-or-tier-4.yml).
2221
- [ ] When the PR is approved, merge it in. This can be merged independently from all other steps.
2322

2423
## Step 1: Scrape the docs and archive the files
2524

26-
- [ ] 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>`
2725
- [ ] In your `docs-internal` checkout, download the static files for the oldest supported version into your archival checkout:
2826
The archive script depends on an optional dependency so install optional dependencies first:
2927
```
30-
$ npm i --include-optional
28+
$ npm i --include=optional
3129
```
3230
Ensure your build is up to date:
3331
```
3432
$ npm run build
3533
```
3634
Then run the archive script:
3735
```
38-
$ script/enterprise-server-deprecations/archive-version.js -p <path-to-archive-repo-checkout>
36+
$ script/enterprise-server-deprecations/archive-version.js
3937
```
40-
If your checkouts live in the same directory, this command would be:
38+
39+
This will generate a directory in `github/docs-internal` called `tmpArchivalDir_<VERSION_TO_DEPRECATE>`. For example 'tmpArchivalDir_3.0'. You can also create a specific output directory using the `--output` flag.
40+
41+
**Note:** You can pass the `--dry-run` flag to scrape only the first 10 pages plus their redirects for testing purposes. **If you use the dry run command, be sure to run the full script without `--dry-run` before you commit the changes.**
42+
43+
## Step 3: Manually remove the search input from the archived docs
44+
45+
- [ ] Search for `site-search-input` in the compressed Javascript files (should find the file in the `_next` directory). When you find it, use something like https://beautifier.io/ or VSCode to reformat it to be readable. To reformat using VSCode, use the "Format document" option or <kbd>Shift</kbd>+<kbd>Option</kbd>+<kbd>F</kbd>. Find `site-search-input` in the file, the result will be enclosed in a function that looks something like... `(0,f.jsx)("input",{"data-testid":"site-search-input",` Delete the entire function. For example, this:
4146
```
42-
$ script/enterprise-server-deprecations/archive-version.js -p ../help-docs-archived-enterprise-versions
47+
(0, f.jsxs)("label", {
48+
className: "text-normal width-full",
49+
children: [(0, f.jsx)("span", {
50+
className: "visually-hidden",
51+
"aria-label": R($ || ($ = (0, k.Z)(["label"]))),
52+
"aria-describedby": R(W || (W = (0, k.Z)(["description"]))),
53+
children: R(U || (U = (0, k.Z)(["placeholder"])))
54+
}), (0, f.jsx)("input", {
55+
"data-testid": "site-search-input",
56+
ref: I,
57+
className: h()(pe().searchInput, 24 === p && pe().searchIconBackground24, 24 === p && "form-control px-6 f4", 16 === p && pe().searchIconBackground16, 16 === p && "form-control px-5 f4", "compact" === i && "py-2", "expanded" === i && "py-3", r && pe().searchInputHeader, !r && "width-full", r && j && pe().searchInputExpanded, r && j && "position-absolute top-0 right-0"),
58+
type: "search",
59+
placeholder: R(G || (G = (0, k.Z)(["placeholder"]))),
60+
autoComplete: _ ? "on" : "off",
61+
autoCorrect: "off",
62+
autoCapitalize: "off",
63+
spellCheck: "false",
64+
maxLength: 512,
65+
onChange: function(e) {
66+
S(e.target.value)
67+
},
68+
value: _,
69+
"aria-label": R(K || (K = (0, k.Z)(["label"]))),
70+
"aria-describedby": R(J || (J = (0, k.Z)(["description"])))
71+
})
4372
```
44-
**Note:** You can pass the `--dry-run` flag to scrape only the first 10 pages plus their redirects for testing purposes. **If you use the dry run command, be sure to run the full script without `--dry-run` before you commit the changes.**
4573

46-
## Step 2: Upload the assets directory to Azure storage
74+
becomes:
75+
76+
```
77+
(0, f.jsxs)('label', {
78+
className: 'text-normal width-full',
79+
children: [
80+
(0, f.jsx)('span', {
81+
className: 'visually-hidden',
82+
'aria-label': y(Q || (Q = (0, k.Z)(['label']))),
83+
'aria-describedby': y(X || (X = (0, k.Z)(['description']))),
84+
children: y(ee || (ee = (0, k.Z)(['placeholder']))),
85+
}),
86+
],
87+
}),
88+
```
89+
- [ ] Save the file. If using beautifier, copy and paste the updated file back into your temp directory with the scraped archive content.
90+
91+
## Step 2: Upload the scraped content directory to Azure storage
4792

4893
- [ ] Log in to the Azure portal from Okta. Navigate to the [githubdocs Azure Storage Blob resource](https://portal.azure.com/#@githubazure.onmicrosoft.com/resource/subscriptions/fa6134a7-f27e-4972-8e9f-0cedffa328f1/resourceGroups/docs-production/providers/Microsoft.Storage/storageAccounts/githubdocs/overview).
4994
- [ ] 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.
50-
- [ ] From the Microsoft Azure Storage Explorer app, select the `githubdocs` storage account resource and navigate to the `github-images` blob container.
51-
- [ ] 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 directory" input, add the version number. For example, `/enterprise/2.22/`.
95+
- [ ] From the Microsoft Azure Storage Explorer app, select the `githubdocs` storage account resource and navigate to the `enterprise` blob container.
96+
- [ ] Click "Upload" and select "Upload folder." Click the "Selected folder" input to navigate to the temp directory you just generated. Inside that temp directory, select the `<VERSION_TO_DEPRECATE>` directory (e.g., `3.2`). Leave the destination directory input blank.
5297
- [ ] Check the log to ensure all files were uploaded successfully.
53-
- [ ] Remove the `assets` directory from your `help-docs-archived-enterprise-versions` repository, we don't want to commit that directory in the next step.
54-
55-
## Step 3: Commit and push changes to help-docs-archived-enterprise-versions repo
56-
57-
- [ ] Search for `site-search-input` in the compressed Javascript files (should find the file in the `_next` directory). When you find it, use something like https://beautifier.io/ or VSCode to reformat it to be readable. To reformat using VSCode, use the "Format document" option or <kbd>Shift</kbd>+<kbd>Option</kbd>+<kbd>F</kbd>. Find `site-search-input` in the file, the result will be enclosed in a function that looks something like... `1125: function () { ... },` Delete the innards of this function, but leave the `function() {}` part.
58-
- [ ] Save the file. If using beautifier, copy and paste the updated file back into your local `help-docs-archived-enterprise-versions` repository.
59-
- [ ] In your archival checkout, `git add <version>`, commit, and push.
60-
- [ ] 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.
98+
- [ ] Remove the temporarily created directory from your `github/docs-internal` checkout.
6199

62100
## Step 4: Deprecate the version in docs-internal
63101

@@ -71,22 +109,13 @@ In your `docs-internal` checkout:
71109
You can test that the static pages were generated correctly on localhost and on staging. Verify that the static pages are accessible by running `npm run dev` in your local `docs-internal` checkout and navigate to:
72110
`http://localhost:3000/enterprise/<version>/`.
73111

74-
Note: the GitHub Pages deployment from the previous step will need to have completed successfully in order for you to test this. You may need to wait up to 10 minutes for this to occur.
75-
76112
Poke around several pages, ensure that the stylesheets are working properly, images are rendering properly, and that the search functionality was disabled.
77113

78-
## Step 5: Continue to deprecate the version in docs-internal
79-
80-
- [ ] Open a new PR. Make sure to check the following:
81-
- [ ] Tests are passing (you may need to include the changes in step 6 to get tests to pass).
82-
- [ ] The deprecated version renders in preview as expected. You should be able to navigate to `docs.github.com/enterprise/<DEPRECATED VERSION>` to access the docs. You should also be able to navigate to a page that is available in the deprecated version and change the version in the URL to the deprecated version, to test redirects.
83-
- [ ] The new oldest supported version renders on staging as expected. You should see a banner on the top of every page for the oldest supported version that notes when the version will be deprecated.
84-
85114
## Step 5: Remove static files for the version
86115

87116
- [ ] In your `docs-internal` checkout, create a new branch `remove-<version>-static-files` branch: `git checkout -b remove-<version>-static-files` (you can branch off of `main` or from your `deprecate-<version>` branch, up to you).
88117
- [ ] Run `script/enterprise-server-deprecations/remove-static-files.js` and commit results.
89-
- [ ] Run `script/enterprise-server-deprecations/remove-redirects.js` and commit results.
118+
- [ ] Re-generate the static files by running `script/rest/update-files.js --decorate-only`.
90119
- [ ] Open a new PR.
91120
- [ ] Get a review from docs-engineering and merge. This step can be merged independently from step 6. The purpose of splitting up steps 5 and 6 is to focus the review on specific files.
92121

@@ -107,3 +136,10 @@ Poke around several pages, ensure that the stylesheets are working properly, ima
107136
- [ ] 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.
108137

109138
**Note**: you can do this step independently of the other steps after a GHES version is deprecated since it should no longer get updates in github/github. You should plan to get this PR merged as soon as possible, otherwise if you wait too long our OpenAPI automation may re-add the static files that you removed in step 5.
139+
140+
## Step 5: Continue to deprecate the version in docs-internal
141+
142+
- [ ] Open a new PR. Make sure to check the following:
143+
- [ ] Tests are passing (you may need to include the changes in step 6 to get tests to pass).
144+
- [ ] The deprecated version renders in preview as expected. You should be able to navigate to `docs.github.com/enterprise/<DEPRECATED VERSION>` to access the docs. You should also be able to navigate to a page that is available in the deprecated version and change the version in the URL to the deprecated version, to test redirects.
145+
- [ ] The new oldest supported version renders on staging as expected. You should see a banner on the top of every page for the oldest supported version that notes when the version will be deprecated.

content/account-and-profile/managing-subscriptions-and-notifications-on-github/viewing-and-triaging-notifications/managing-notifications-from-your-inbox.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ For example, to see notifications from the octo-org organization, use `org:octo-
161161

162162
## {% data variables.product.prodname_dependabot %} custom filters
163163

164-
{% ifversion fpt or ghec or ghes > 3.2 %}
164+
{% ifversion fpt or ghec or ghes %}
165165
If you use {% data variables.product.prodname_dependabot %} to keep your dependencies up-to-date, you can use and save these custom filters:
166166
- `is:repository_vulnerability_alert` to show notifications for {% data variables.product.prodname_dependabot_alerts %}.
167167
- `reason:security_alert` to show notifications for {% data variables.product.prodname_dependabot_alerts %} and security update pull requests.
@@ -170,7 +170,7 @@ If you use {% data variables.product.prodname_dependabot %} to keep your depende
170170
For more information about {% data variables.product.prodname_dependabot %}, see "[About {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies)."
171171
{% endif %}
172172

173-
{% ifversion ghes < 3.3 or ghae %}
173+
{% ifversion ghae %}
174174

175175
If you use {% data variables.product.prodname_dependabot %} to tell you about insecure dependencies, you can use and save these custom filters to show notifications for {% data variables.product.prodname_dependabot_alerts %}:
176176
- `is:repository_vulnerability_alert`

content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/about-your-organizations-profile.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Organizations that use {% data variables.product.prodname_ghe_cloud %} can confi
2424
To confirm your organization's identity and display a "Verified" badge on your organization profile page, you can verify your organization's domains with {% data variables.product.prodname_dotcom %}. For more information, see "[Verifying or approving a domain for your organization](/organizations/managing-organization-settings/verifying-or-approving-a-domain-for-your-organization)."
2525
{% endif %}
2626

27-
{% ifversion fpt or ghes > 3.2 or ghec %}
27+
{% ifversion fpt or ghes or ghec %}
2828
![Sample organization profile page](/assets/images/help/organizations/org_profile_with_overview.png)
2929
{% else %}
3030
![Sample organization profile page](/assets/images/help/profile/org_profile.png)

content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Setting up and managing your personal account on GitHub
3-
intro: You can manage settings for your personal account on {% ifversion fpt or ghec or ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %}, including email preferences, access to personal repositories, and organization memberships. You can also manage the account itself.
3+
intro: 'You can manage settings for your personal account on {% ifversion fpt or ghec or ghes %}{% data variables.location.product_location %}{% elsif ghae %}{% data variables.product.product_name %}{% endif %}, including email preferences, access to personal repositories, and organization memberships. You can also manage the account itself.'
44
shortTitle: Personal accounts
55
redirect_from:
66
- /categories/setting-up-and-managing-your-github-user-account

content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-accessibility-settings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Managing accessibility settings
33
shortTitle: Manage accessibility settings
4-
intro: "{% data variables.product.product_name %}'s user interface can adapt to your vision, hearing, motor, cognitive, or learning needs."
4+
intro: '{% data variables.product.product_name %}''s user interface can adapt to your vision, hearing, motor, cognitive, or learning needs.'
55
versions:
66
feature: keyboard-shortcut-accessibility-setting
77
redirect_from:

content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ intro: 'You can control features that secure and analyze the code in your projec
44
versions:
55
fpt: '*'
66
ghec: '*'
7-
ghes: '>3.2'
7+
ghes: '*'
88
topics:
99
- Accounts
1010
redirect_from:
@@ -32,11 +32,11 @@ For an overview of repository-level security, see "[Securing your repository](/c
3232
{% data reusables.user-settings.access_settings %}
3333
{% data reusables.user-settings.security-analysis %}
3434
3. Under "Code security and analysis", to the right of the feature, click **Disable all** or **Enable all**.
35-
{% ifversion ghes > 3.2 %}!["Enable all" or "Disable all" button for "Configure security and analysis" features](/assets/images/enterprise/3.3/settings/security-and-analysis-disable-or-enable-all.png){% else %}!["Enable all" or "Disable all" button for "Configure security and analysis" features](/assets/images/help/settings/security-and-analysis-disable-or-enable-all.png){% endif %}
35+
{% ifversion ghes %}!["Enable all" or "Disable all" button for "Configure security and analysis" features](/assets/images/enterprise/3.3/settings/security-and-analysis-disable-or-enable-all.png){% else %}!["Enable all" or "Disable all" button for "Configure security and analysis" features](/assets/images/help/settings/security-and-analysis-disable-or-enable-all.png){% endif %}
3636
6. Optionally, enable the feature by default for new repositories that you own.
37-
{% ifversion ghes > 3.2 %}!["Enable by default" option for new repositories](/assets/images/enterprise/3.3/settings/security-and-analysis-enable-by-default-in-modal.png){% else %}!["Enable by default" option for new repositories](/assets/images/help/settings/security-and-analysis-enable-by-default-in-modal.png){% endif %}
37+
{% ifversion ghes %}!["Enable by default" option for new repositories](/assets/images/enterprise/3.3/settings/security-and-analysis-enable-by-default-in-modal.png){% else %}!["Enable by default" option for new repositories](/assets/images/help/settings/security-and-analysis-enable-by-default-in-modal.png){% endif %}
3838
7. Click **Disable FEATURE** or **Enable FEATURE** to disable or enable the feature for all the repositories you own.
39-
{% ifversion ghes > 3.2 %}![Button to disable or enable feature](/assets/images/enterprise/3.3/settings/security-and-analysis-enable-dependency-graph.png){% else %}![Button to disable or enable feature](/assets/images/help/settings/security-and-analysis-enable-dependency-graph.png){% endif %}
39+
{% ifversion ghes %}![Button to disable or enable feature](/assets/images/enterprise/3.3/settings/security-and-analysis-enable-dependency-graph.png){% else %}![Button to disable or enable feature](/assets/images/help/settings/security-and-analysis-enable-dependency-graph.png){% endif %}
4040

4141
{% data reusables.security.displayed-information %}
4242

@@ -45,7 +45,7 @@ For an overview of repository-level security, see "[Securing your repository](/c
4545
{% data reusables.user-settings.access_settings %}
4646
{% data reusables.user-settings.security-analysis %}
4747
3. Under "Code security and analysis", to the right of the feature, enable or disable the feature by default for new repositories that you own.
48-
{% ifversion ghes > 3.2 %}![Checkbox for enabling or disabling a feature for new repositories](/assets/images/enterprise/3.3/settings/security-and-analysis-enable-or-disable-feature-checkbox.png){% else %}![Checkbox for enabling or disabling a feature for new repositories](/assets/images/help/settings/security-and-analysis-enable-or-disable-feature-checkbox.png){% endif %}
48+
{% ifversion ghes %}![Checkbox for enabling or disabling a feature for new repositories](/assets/images/enterprise/3.3/settings/security-and-analysis-enable-or-disable-feature-checkbox.png){% else %}![Checkbox for enabling or disabling a feature for new repositories](/assets/images/help/settings/security-and-analysis-enable-or-disable-feature-checkbox.png){% endif %}
4949

5050
## Further reading
5151

content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-your-cookie-preferences-for-githubs-enterprise-marketing-pages.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Managing your cookie preferences for GitHub's enterprise marketing pages
3-
intro: "You can control how {% data variables.product.company_short %} uses information from non-essential tracking cookies for enterprise marketing pages."
3+
intro: 'You can control how {% data variables.product.company_short %} uses information from non-essential tracking cookies for enterprise marketing pages.'
44
versions:
55
fpt: '*'
66
ghes: '*'

0 commit comments

Comments
 (0)