Skip to content

Commit 6714329

Browse files
authored
Merge branch 'main' into patch-3
2 parents ab33381 + a4784f5 commit 6714329

File tree

1,638 files changed

+38883
-37553
lines changed

Some content is hidden

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

1,638 files changed

+38883
-37553
lines changed

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

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ The day after a GHES version's [deprecation date](https://github.com/github/docs
1515

1616
- [ ] 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>`
1717
- [ ] In your `docs-internal` checkout, download the static files for the oldest supported version into your archival checkout:
18+
The archive script depends on an optional dependency so install optional dependencies first:
19+
```
20+
$ npm ci --include-optional
21+
```
22+
Then run the archive script:
1823
```
1924
$ script/enterprise-server-deprecations/archive-version.js -p <path-to-archive-repo-checkout>
2025
```
@@ -26,52 +31,50 @@ The day after a GHES version's [deprecation date](https://github.com/github/docs
2631
2732
## Step 2: Upload the assets directory to Azure storage
2833
29-
- [ ] 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).
34+
- [ ] 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).
3035
- [ ] 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.
3136
- [ ] From the Microsoft Azure Storage Explorer app, select the `githubdocs` storage account resource and navigate to the `github-images` blob container.
3237
- [ ] 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/`.
3338
- [ ] Check the log to ensure all files were uploaded successfully.
34-
- [ ] Removed the `assets` directory from the `/help-docsc-archived-enterprise-versions` repository.
39+
- [ ] Remove the `assets` directory from your `help-docsc-archived-enterprise-versions` repository, we don't want to commit that directory in the next step.
3540
3641
## Step 3: Commit and push changes to help-docs-archived-enterprise-versions repo
3742
38-
- [ ] Search for `site-search-input` in the compressed Javascript files. When you find it, use something like https://beautifier.io/ to reformat it to be readable. Find `site-search-input` in the file, there will be something like... `1125: function () { return [SearchReactComponent] },` Delete the innards of this function, but leave the `function() {}` part.
43+
- [ ] 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/ to reformat it to be readable. 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.
44+
- [ ] Copy, paste, and save the updated file back into your local `help-docs-archived-enterprise-versions` repository.
3945
- [ ] In your archival checkout, `git add <version>`, commit, and push.
4046
- [ ] 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.
4147
4248
## Step 4: Deprecate the version in docs-internal
4349
4450
In your `docs-internal` checkout:
4551
- [ ] Create a new branch: `git checkout -b deprecate-<version>`.
46-
- [ ] Edit `lib/enterprise-server-releases.js` by moving the number to be deprecated into the `deprecated` array.
52+
- [ ] Edit `lib/enterprise-server-releases.js` by removing the version number to be deprecated from the `supported` array and move it to the `deprecated` array.
4753
- [ ] Open a new PR. Make sure to check the following:
48-
- [ ] Tests are passing.
49-
- [ ] The deprecated version renders on staging 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.
54+
- [ ] Tests are passing (you may need to include the changes in step 6 to get tests to pass).
55+
- [ ] 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.
5056
- [ ] 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.
5157
52-
You may need to include the changes in step 6 to get tests to pass.
53-
5458
## Step 5: Remove static files for the version
5559
56-
- [ ] In your `docs-internal` checkout, from your `remove-<version>-static-files` branch: `git checkout -b remove-<version>-static-files`
60+
- [ ] 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).
5761
- [ ] Run `script/enterprise-server-deprecations/remove-static-files.js` and commit results.
5862
- [ ] Run `script/enterprise-server-deprecations/remove-redirects.js` and commit results.
59-
- [ ] `lib/rest/static` directory has deferenced and decorated directory underneath, remove the numbered version and all below from the list
6063
- [ ] Open a new PR.
6164
- [ ] 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.
6265
6366
## Step 6: Remove the liquid conditionals and content for the version
6467
65-
- [ ] In your `docs-internal` checkout, from your `remove-<version>-markup` branch: `git checkout -b remove-<version>-markup`
68+
- [ ] In your `docs-internal` checkout, create a new branch `remove-<version>-markup` branch: `git checkout -b remove-<version>-markup` (you can branch off of `main` or from your `deprecate-<version>` branch, up to you).
6669
- [ ] Remove the outdated Liquid markup and frontmatter.
6770
- [ ] Run the script: `script/enterprise-server-deprecations/remove-version-markup.js --release <number>`.
6871
- [ ] Spot check a few changes. Content, frontmatter, and data files should all have been updated.
6972
- [ ] Open a PR with the results. The diff may be large and complex, so make sure to get a review from `@github/docs-content`.
70-
- [ ] Debug any test failures or unexpected results.
73+
- [ ] Debug any test failures or unexpected results -- it's very likely manual updates will be necessary, the script does a lot of work but doesn't automate everything and can't 100% replace human intent.
7174
- [ ] When the PR is approved, merge it in to complete the deprecation. This can be merged independently from step 5.
7275
7376
## Step 7: Deprecate the OpenAPI description in `github/github`
7477
7578
- [ ] In `github/github`, edit the release's config file in `app/api/description/config/releases/`, and change `deprecated: false` to `deprecated: true`.
7679
- [ ] Open a new PR, and get the required code owner approvals. A docs-content team member can approve it for the docs team.
77-
- [ ] When the PR is approved, merge the `github/github` PR.
80+
- [ ] When the PR is approved, [deploy the `github/github` PR](https://thehub.github.com/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.

components/article/ClientSideHighlightJS.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import { useEffect } from 'react'
2+
import { useRouter } from 'next/router'
23
import hljs from 'highlight.js/lib/core'
34
import json from 'highlight.js/lib/languages/json'
5+
import javascript from 'highlight.js/lib/languages/javascript'
6+
import hljsCurl from 'highlightjs-curl'
47

58
// Add as needed. It's pretty cheap to add but please don't use
69
// highlight.js import that loads all and everything.
710
hljs.registerLanguage('json', json)
8-
const SUPPORTED_LANGUAGES = ['json']
11+
hljs.registerLanguage('javascript', javascript)
12+
hljs.registerLanguage('curl', hljsCurl)
13+
const SUPPORTED_LANGUAGES = ['json', 'javascript', 'curl']
914

1015
// This is the selector we use for the first document.querySelectorAll()
1116
// to find the containers for `<code>` tags. Because it's s dataset
@@ -24,6 +29,8 @@ const CODE_ELEMENTS_PARENT_SELECTOR = '[data-highlight]'
2429
const CODE_SELECTOR = 'pre code'
2530

2631
export default function ClientSideHighlightJS() {
32+
const { asPath } = useRouter()
33+
2734
useEffect(() => {
2835
// Hi Internet Explorer!
2936
// https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API#browser_compatibility
@@ -59,7 +66,7 @@ export default function ClientSideHighlightJS() {
5966
intersectionObserver.observe(element)
6067
}
6168
}
62-
}, [])
69+
}, [asPath])
6370

6471
return null
6572
}

components/declarations.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ declare module '*.scss' {
22
const content: Record<string, string>
33
export default content
44
}
5+
6+
declare module 'highlightjs-curl'

components/rest/CodeBlock.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,12 @@ import styles from './CodeBlock.module.scss'
55
type Props = {
66
verb?: string
77
codeBlock: string
8-
setHTML?: boolean
8+
highlight?: string
99
}
1010

11-
export function CodeBlock({ verb, codeBlock, setHTML = false }: Props) {
12-
return setHTML ? (
13-
<div
14-
className={cx(styles.codeBlock, 'rounded')}
15-
dangerouslySetInnerHTML={{ __html: codeBlock }}
16-
/>
17-
) : (
18-
<pre className={cx(styles.methodCodeBlock, 'rounded-1 border')}>
11+
export function CodeBlock({ verb, codeBlock, highlight }: Props) {
12+
return (
13+
<pre className={cx(styles.methodCodeBlock, 'rounded-1 border')} data-highlight={highlight}>
1914
<code>
2015
{verb && (
2116
<span className="color-bg-accent-emphasis color-fg-on-emphasis rounded-1 text-uppercase">

components/rest/RestCodeSamples.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { xCodeSample } from './types'
1+
import type { xCodeSample } from './types'
22
import { useTranslation } from 'components/hooks/useTranslation'
33
import { CodeBlock } from './CodeBlock'
44

@@ -34,8 +34,8 @@ export function RestCodeSamples({ slug, xCodeSamples }: Props) {
3434
sampleElements.push(
3535
<CodeBlock
3636
key={sample.lang + index}
37-
codeBlock={sample.sourceHTML}
38-
setHTML={true}
37+
codeBlock={sample.source}
38+
highlight={sample.lang === 'JavaScript' ? 'javascript' : 'curl'}
3939
></CodeBlock>
4040
)
4141
}

components/rest/RestResponse.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function RestResponse({ responses }: Props) {
1515
<CodeBlock
1616
codeBlock={`Status: ${response.httpStatusCode} ${response.httpStatusMessage}`}
1717
/>
18-
<CodeBlock codeBlock={response.payload} setHTML={true} />
18+
{response.payload ? <CodeBlock codeBlock={response.payload} highlight="json" /> : null}
1919
</div>
2020
)
2121
})}

components/rest/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export interface CodeResponse {
3939

4040
export interface xCodeSample {
4141
lang: string
42-
sourceHTML: string
42+
source: string
4343
}
4444

4545
export interface Preview {

content/actions/creating-actions/sharing-actions-and-workflows-with-your-enterprise.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ topics:
1010
shortTitle: Share with your enterprise
1111
---
1212

13-
{% note %}
14-
15-
**Note:** Allowing workflows to access actions in internal repositories is currently in beta and subject to change.
16-
17-
{% endnote %}
18-
1913
## About {% data variables.product.prodname_actions %} access to internal repositories
2014

2115
If your organization is owned by an enterprise account, you can share actions and workflows within your enterprise, without publishing the action or workflow publicly, by allowing {% data variables.product.prodname_actions %} workflows to access an internal repository that contains the action or workflow.

content/admin/configuration/configuring-github-connect/enabling-automatic-user-license-sync-for-your-enterprise.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Enabling automatic user license sync for your enterprise
3-
intro: 'You can manage license usage across your {% data variables.product.prodname_enterprise %} deployments by automatically syncing user licenses from {% data variables.product.product_location %} to {% data variables.product.prodname_ghe_cloud %}.'
3+
intro: 'You can manage license usage across your {% data variables.product.prodname_enterprise %} environments by automatically syncing user licenses from {% data variables.product.product_location %} to {% data variables.product.prodname_ghe_cloud %}.'
44
redirect_from:
55
- /enterprise/admin/installation/enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud
66
- /enterprise/admin/configuration/enabling-automatic-user-license-sync-between-github-enterprise-server-and-github-enterprise-cloud
@@ -19,10 +19,18 @@ shortTitle: Automatic user license sync
1919
---
2020
## About license synchronization
2121

22-
After you enable license synchronization, you'll be able to view license usage for your entire enterprise across {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}. {% data variables.product.prodname_github_connect %} syncs license between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %} weekly. For more information, see "[Managing your license for {% data variables.product.prodname_enterprise %}](/billing/managing-your-license-for-github-enterprise)."
22+
{% data reusables.enterprise-licensing.about-license-sync %} For more information, see "[About {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect#data-transmission-for-github-connect)."
23+
24+
If you enable automatic user license sync for your enterprise, {% data variables.product.prodname_github_connect %} will automatically synchronize license usage between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %} weekly.
25+
26+
If you use multiple {% data variables.product.prodname_ghe_server %} instances, you can enable automatic license sync between each of your instances and the same organization or enterprise account on {% data variables.product.prodname_ghe_cloud %}.
27+
28+
{% data reusables.enterprise-licensing.view-consumed-licenses %}
2329

2430
You can also manually upload {% data variables.product.prodname_ghe_server %} user license information to {% data variables.product.prodname_ghe_cloud %}. For more information, see "[Syncing license usage between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}](/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud)."
2531

32+
{% data reusables.enterprise-licensing.verified-domains-license-sync %}
33+
2634
## Enabling license synchronization
2735

2836
Before enabling license synchronization on {% data variables.product.product_location %}, you must enable {% data variables.product.prodname_github_connect %}. For more information, see "[Managing {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/managing-github-connect)."

content/billing/managing-your-license-for-github-enterprise/syncing-license-usage-between-github-enterprise-server-and-github-enterprise-cloud.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ shortTitle: Sync license usage
1616

1717
{% data reusables.enterprise-licensing.about-license-sync %}
1818

19-
If you allow {% data variables.product.product_location_enterprise %} to connect to your enterprise account on {% data variables.product.prodname_dotcom_the_website %}, you can sync license usage between the environments automatically. Automatic synchronization ensures that you see up-to-date license details on {% data variables.product.prodname_dotcom_the_website %}. If you don't want to allow {% data variables.product.product_location %} to connect to {% data variables.product.prodname_dotcom_the_website %}, you can manually sync license usage by uploading a file from {% data variables.product.product_location %} to {% data variables.product.prodname_dotcom_the_website %}.
19+
To ensure that you see up-to-date license details on {% data variables.product.prodname_dotcom_the_website %}, you can sync license usage between the environments automatically, using {% data variables.product.prodname_github_connect %}. For more information about {% data variables.product.prodname_github_connect %}, see "[About {% data variables.product.prodname_github_connect %}]({% ifversion ghec %}/enterprise-server@latest{% endif %}/admin/configuration/configuring-github-connect/about-github-connect){% ifversion ghec %}" in the {% data variables.product.prodname_ghe_server %} documentation.{% elsif ghes %}."{% endif %}
2020

21-
For more information about licenses and usage for {% data variables.product.prodname_ghe_server %}, see "[About licenses for {% data variables.product.prodname_enterprise %}](/billing/managing-your-license-for-github-enterprise/about-licenses-for-github-enterprise)."
21+
If you don't want to enable {% data variables.product.prodname_github_connect %}, you can manually sync license usage by uploading a file from {% data variables.product.prodname_ghe_server %} to {% data variables.product.prodname_dotcom_the_website %}.
22+
23+
{% data reusables.enterprise-licensing.view-consumed-licenses %}
24+
25+
{% data reusables.enterprise-licensing.verified-domains-license-sync %}
2226

2327
## Automatically syncing license usage
2428

25-
You can use {% data variables.product.prodname_github_connect %} to automatically sync user license count and usage between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}. For more information, see "[Enabling automatic user license sync for your enterprise]({% ifversion ghec %}/enterprise-server@latest{% endif %}/admin/configuration/configuring-github-connect/enabling-automatic-user-license-sync-for-your-enterprise){% ifversion ghec %}" in the {% data variables.product.prodname_ghe_server %} documentation.{% elsif ghes %}."{% endif %}
29+
You can use {% data variables.product.prodname_github_connect %} to automatically synchronize user license count and usage between {% data variables.product.prodname_ghe_server %} and {% data variables.product.prodname_ghe_cloud %}. For more information, see "[Enabling automatic user license sync for your enterprise]({% ifversion ghec %}/enterprise-server@latest{% endif %}/admin/configuration/configuring-github-connect/enabling-automatic-user-license-sync-for-your-enterprise){% ifversion ghec %}" in the {% data variables.product.prodname_ghe_server %} documentation.{% elsif ghes %}."{% endif %}
2630

2731
## Manually syncing license usage
2832

0 commit comments

Comments
 (0)