diff --git a/.github/workflows/move-new-issues-to-correct-docs-repo.yml b/.github/workflows/move-new-issues-to-correct-docs-repo.yml
index f215fe25a1..32480afeab 100644
--- a/.github/workflows/move-new-issues-to-correct-docs-repo.yml
+++ b/.github/workflows/move-new-issues-to-correct-docs-repo.yml
@@ -48,7 +48,7 @@ jobs:
owner: owner,
repo: originalRepo,
issue_number: issueNo,
- body: `👋 Moving forward, we're asking that folks create all new Docs issues in the [${process.env.TEAM_ENGINEERING_REPO}](${process.env.TEAM_ENGINEERING_REPO}) repo and all new content issues in [${process.env.TEAM_CONTENT_REPO}](${process.env.TEAM_CONTENT_REPO}). We transferred it for you!`
+ body: `👋 You opened this issue in `${context.repo.repo}`. Moving forward, we're asking that folks create new issues in the following repositories instead:\n- For issues with the docs site, please submit to the [${process.env.TEAM_ENGINEERING_REPO}](/${owner}/${process.env.TEAM_ENGINEERING_REPO}) repo.\n- For all new content issues, please submit to the [${process.env.TEAM_CONTENT_REPO}](/${owner}/${process.env.TEAM_CONTENT_REPO}) repo.\n\nWe will transfer this issue for you!`
})
// Transfer the issue to the correct repo
diff --git a/components/DefaultLayout.tsx b/components/DefaultLayout.tsx
index 3440cf2470..a88f2bd228 100644
--- a/components/DefaultLayout.tsx
+++ b/components/DefaultLayout.tsx
@@ -11,7 +11,7 @@ import { useTranslation } from './hooks/useTranslation'
type Props = { children?: React.ReactNode }
export const DefaultLayout = (props: Props) => {
- const { builtAssets, page, error, isHomepageVersion } = useMainContext()
+ const { page, error, isHomepageVersion } = useMainContext()
const { t } = useTranslation('errors')
return (
@@ -22,8 +22,6 @@ export const DefaultLayout = (props: Props) => {
{page.fullTitle}
) : null}
-
-
{/* For Google and Bots */}
{page.introPlainText && }
diff --git a/components/PrintAction.tsx b/components/PrintAction.tsx
new file mode 100644
index 0000000000..fd324b0f8c
--- /dev/null
+++ b/components/PrintAction.tsx
@@ -0,0 +1,16 @@
+import React from 'react'
+
+type Props = {
+ children: React.ReactElement
+}
+export function PrintAction({ children }: Props) {
+ const onClick = () => {
+ try {
+ document.execCommand('print', false)
+ } catch (e) {
+ window.print()
+ }
+ }
+
+ return React.cloneElement(React.Children.only(children), { onClick })
+}
diff --git a/components/Search.tsx b/components/Search.tsx
index a06baea9f2..973ed138bb 100644
--- a/components/Search.tsx
+++ b/components/Search.tsx
@@ -23,7 +23,8 @@ type Props = {
// Homepage and 404 should be `isStandalone`, all others not
// `updateSearchParams` should be false on the GraphQL explorer page
export function Search({ isStandalone = false, updateSearchParams = true, children }: Props) {
- const [query, setQuery] = useState('')
+ const router = useRouter()
+ const [query, setQuery] = useState(router.query.query || '')
const [results, setResults] = useState>([])
const [activeHit, setActiveHit] = useState(0)
const inputRef = useRef(null)
@@ -32,18 +33,14 @@ export function Search({ isStandalone = false, updateSearchParams = true, childr
// Figure out language and version for index
const { languages, searchVersions, nonEnterpriseDefaultVersion } = useMainContext()
- const router = useRouter()
// fall back to the non-enterprise default version (FPT currently) on the homepage, 404 page, etc.
const version = searchVersions[currentVersion] || searchVersions[nonEnterpriseDefaultVersion]
const language = (Object.keys(languages).includes(router.locale || '') && router.locale) || 'en'
// If the user shows up with a query in the URL, go ahead and search for it
useEffect(() => {
- const params = new URLSearchParams(location.search)
- if (params.has('query')) {
- const xquery = params.get('query')?.trim() || ''
- setQuery(xquery)
- /* await */ fetchSearchResults(xquery)
+ if (router.query.query) {
+ /* await */ fetchSearchResults((router.query.query as string).trim())
}
}, [])
@@ -183,7 +180,7 @@ export function Search({ isStandalone = false, updateSearchParams = true, childr
diff --git a/content/actions/reference/authentication-in-a-workflow.md b/content/actions/reference/authentication-in-a-workflow.md
index cf6b0ffe7b..a6a4a66b78 100644
--- a/content/actions/reference/authentication-in-a-workflow.md
+++ b/content/actions/reference/authentication-in-a-workflow.md
@@ -79,16 +79,16 @@ jobs:
issues: write {% endif %}
steps:
- name: Create issue using REST API
- run: {% raw %}|
+ run: |
curl --request POST \
- --url https://api.github.com/repos/${{ github.repository }}/issues \
- --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
+ --url {% data variables.product.api_url_code %}/repos/${% raw %}{{ github.repository }}{% endraw %}/issues \
+ --header 'authorization: Bearer ${% raw %}{{ secrets.GITHUB_TOKEN }}{% endraw %}' \
--header 'content-type: application/json' \
--data '{
- "title": "Automated issue for commit: ${{ github.sha }}",
- "body": "This issue was automatically created by the GitHub Action workflow **${{ github.workflow }}**. \n\n The commit hash was: _${{ github.sha }}_."
+ "title": "Automated issue for commit: ${% raw %}{{ github.sha }}{% endraw %}",
+ "body": "This issue was automatically created by the GitHub Action workflow **${% raw %}{{ github.workflow }}{% endraw %}**. \n\n The commit hash was: _${% raw %}{{ github.sha }}{% endraw %}_."
}' \
- --fail{% endraw %}
+ --fail
```
## Permissions for the `GITHUB_TOKEN`
diff --git a/content/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-user-provisioning-for-your-enterprise.md b/content/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-user-provisioning-for-your-enterprise.md
index d9128aa9de..c4e48243ff 100644
--- a/content/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-user-provisioning-for-your-enterprise.md
+++ b/content/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-user-provisioning-for-your-enterprise.md
@@ -84,7 +84,7 @@ You must have administrative access on your IdP to configure the application for
| Value | Other names | Description | Example |
| :- | :- | :- | :- |
- | URL | Tenant URL | URL to the SCIM provisioning API for your enterprise on {% data variables.product.prodname_ghe_managed %} |
https://api.YOUR-GITHUB-AE-HOSTNAME/scim/v2
|
+ | URL | Tenant URL | URL to the SCIM provisioning API for your enterprise on {% data variables.product.prodname_ghe_managed %} | {% data variables.product.api_url_pre %} |
| Shared secret | Personal access token, secret token | Token for application on your IdP to perform provisioning tasks on behalf of an enterprise owner | Personal access token you created in step 1 |
{% endif %}
diff --git a/content/codespaces/managing-your-codespaces/managing-access-and-security-for-your-codespaces.md b/content/codespaces/managing-your-codespaces/managing-access-and-security-for-your-codespaces.md
index bb705b64bb..b94f2dbabb 100644
--- a/content/codespaces/managing-your-codespaces/managing-access-and-security-for-your-codespaces.md
+++ b/content/codespaces/managing-your-codespaces/managing-access-and-security-for-your-codespaces.md
@@ -9,7 +9,7 @@ topics:
{% data reusables.codespaces.release-stage %}
-When you enable access and security for a repository owned by your user account, any codespaces that are created for that repository will have read and write permissions to all other repositories you own. If you want to restrict the repositories a codespace can access, you can limit to it to either the repository the codespace was opened for or specific repositories. You should only enable access and security for repositories you trust.
+When you enable access and security for a repository owned by your user account, any codespaces that are created for that repository will have read permissions to all other repositories you own. If you want to restrict the repositories a codespace can access, you can limit to it to either the repository the codespace was opened for or specific repositories. You should only enable access and security for repositories you trust.
{% data reusables.user_settings.access_settings %}
{% data reusables.user_settings.codespaces-tab %}
diff --git a/content/developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app.md b/content/developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app.md
index 235e026857..c3b3eb9bfa 100644
--- a/content/developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app.md
+++ b/content/developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app.md
@@ -426,7 +426,7 @@ Here are a few common problems and some suggested solutions. If you run into any
* **Q:** I'm getting an `Octokit::NotFound` 404 error in my debug output:
```
- 2018-12-06 15:00:56 - Octokit::NotFound - POST https://api.github.com/app/installations/500991/access_tokens: 404 - Not Found // See: /v3/apps/#create-a-new-installation-token:
+ 2018-12-06 15:00:56 - Octokit::NotFound - POST {% data variables.product.api_url_code %}/app/installations/500991/access_tokens: 404 - Not Found // See: /v3/apps/#create-a-new-installation-token:
```
**A:** Ensure the variables in your `.env` file are correct. Make sure that you have not set identical variables in any other environment variable files like `bash_profile`. You can check the environment variables your app is using by adding `puts` statements to your app code and re-running the code. For example, to ensure you have the correct private key set, you could add `puts PRIVATE_KEY` to your app code:
diff --git a/content/developers/apps/guides/using-content-attachments.md b/content/developers/apps/guides/using-content-attachments.md
index 3b36d827fe..38fe4f1237 100644
--- a/content/developers/apps/guides/using-content-attachments.md
+++ b/content/developers/apps/guides/using-content-attachments.md
@@ -66,16 +66,16 @@ The content attachment flow shows you the relationship between the URL in the is
The `body` parameter can contain markdown:
- ```shell
- curl -X POST \
- https://api.github.com/repos/Codertocat/Hello-World/content_references/17/attachments \
- -H 'Accept: application/vnd.github.corsair-preview+json' \
- -H 'Authorization: Bearer $INSTALLATION_TOKEN' \
- -d '{
- "title": "[A-1234] Error found in core/models.py file",
- "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
- }'
- ```
+```shell
+curl -X POST \
+ {% data variables.product.api_url_code %}/repos/Codertocat/Hello-World/content_references/17/attachments \
+ -H 'Accept: application/vnd.github.corsair-preview+json' \
+ -H 'Authorization: Bearer $INSTALLATION_TOKEN' \
+ -d '{
+ "title": "[A-1234] Error found in core/models.py file",
+ "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
+}'
+```
For more information about creating an installation token, see "[Authenticating as a GitHub App](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)."
@@ -111,7 +111,7 @@ mutation {
Example cURL:
```shell
-curl -X "POST" "https://api.github.com/graphql" \
+curl -X "POST" "{% data variables.product.api_url_code %}/graphql" \
-H 'Authorization: Bearer $INSTALLATION_TOKEN' \
-H 'Accept: application/vnd.github.corsair-preview+json' \
-H 'Content-Type: application/json; charset=utf-8' \
diff --git a/content/get-started/quickstart/be-social.md b/content/get-started/quickstart/be-social.md
index d6e4dda061..3615cb1cee 100644
--- a/content/get-started/quickstart/be-social.md
+++ b/content/get-started/quickstart/be-social.md
@@ -70,11 +70,10 @@ Discover interesting projects using {% data variables.explore.explore_github %},
## Celebrate
You're now connected to the {% data variables.product.product_name %} community. What do you want to do next?
-

-- "[Set up Git](/articles/set-up-git)"
-- "[Create a repository](/articles/create-a-repo)"
-- "[Fork a repository](/articles/fork-a-repo)"
-- **Be social**
+
+- To synchronize your {% data variables.product.product_name %} projects with your computer, you can set up Git. For more information see "[Set up Git](/articles/set-up-git)."
+- You can also create a repository, where you can put all your projects and maintain your workflows. For more information see, "[Create a repository](/articles/create-a-repo)."
+- You can fork a repository to make changes you want to see without affecting the original repository. For more information, see "[Fork a repository](/articles/fork-a-repo)."
- {% data reusables.support.connect-in-the-forum-bootcamp %}
diff --git a/content/get-started/quickstart/create-a-repo.md b/content/get-started/quickstart/create-a-repo.md
index 448db3b1a0..d1013eb700 100644
--- a/content/get-started/quickstart/create-a-repo.md
+++ b/content/get-started/quickstart/create-a-repo.md
@@ -79,11 +79,12 @@ Let's commit a change to the *README* file.
## Celebrate
-Congratulations! You have now created a repository, including a *README* file, and created your first commit on {% data variables.product.product_location %}. What do you want to do next?
+Congratulations! You have now created a repository, including a *README* file, and created your first commit on {% data variables.product.product_location %}.
-- "[Set up Git](/articles/set-up-git)"
-- **Create a repository**
-- "[Clone a repository](/github/creating-cloning-and-archiving-repositories/cloning-a-repository)"
-- "[Fork a repository](/articles/fork-a-repo)"
-- "[Be social](/articles/be-social)"
-- {% data reusables.support.connect-in-the-forum-bootcamp %}
+You can now clone a {% data variables.product.product_name %} repository to create a local copy on your computer. From your local repository you can commit, and create a pull request to update the changes in the upstream repository. For more information, see "[Cloning a repository](/github/creating-cloning-and-archiving-repositories/cloning-a-repository)" and "[Set up Git](/articles/set-up-git)."
+
+You can find interesting projects and repositories on {% data variables.product.product_name %} and make changes to them by creating a fork of the repository. For more information see, "[Fork a repository](/articles/fork-a-repo)."
+
+Each repository in {% data variables.product.product_name %} is owned by a person or an organization. You can interact with the people, repositories, and organizations by connecting and following them on {% data variables.product.product_name %}. For more information see "[Be social](/articles/be-social)."
+
+{% data reusables.support.connect-in-the-forum-bootcamp %}
diff --git a/content/get-started/quickstart/fork-a-repo.md b/content/get-started/quickstart/fork-a-repo.md
index 4d28472b88..c42001c8e2 100644
--- a/content/get-started/quickstart/fork-a-repo.md
+++ b/content/get-started/quickstart/fork-a-repo.md
@@ -148,10 +148,10 @@ Fork a repository to start contributing to a project. {% data reusables.reposito
## Celebrate
-You have now forked a repository, practiced cloning your fork, and configured an upstream repository. What do you want to do next?
+You have now forked a repository, practiced cloning your fork, and configured an upstream repository. For more information about cloning the fork and syncing the changes in a forked repository from your computer see "[Set up Git](/articles/set-up-git)."
-- "[Set up Git](/articles/set-up-git)"
-- "[Create a repository](/articles/create-a-repo)"
-- **Fork a repository**
-- "[Be social](/articles/be-social)"
-- {% data reusables.support.connect-in-the-forum-bootcamp %}
+You can also create a new repository where you can put all your projects and share the code on {% data variables.product.prodname_dotcom %}. For more information see, "[Create a repository](/articles/create-a-repo)."
+
+Each repository in {% data variables.product.product_name %} is owned by a person or an organization. You can interact with the people, repositories, and organizations by connecting and following them on {% data variables.product.product_name %}. For more information see "[Be social](/articles/be-social)."
+
+{% data reusables.support.connect-in-the-forum-bootcamp %}
diff --git a/content/get-started/quickstart/set-up-git.md b/content/get-started/quickstart/set-up-git.md
index 8301402a2d..b9743d391c 100644
--- a/content/get-started/quickstart/set-up-git.md
+++ b/content/get-started/quickstart/set-up-git.md
@@ -56,10 +56,10 @@ If you [clone with SSH](/github/getting-started-with-github/about-remote-reposit
## Celebrate
-Congratulations, you now have Git and {% data variables.product.product_name %} all set up! What do you want to do next?
+Congratulations, you now have Git and {% data variables.product.product_name %} all set up! You may now choose to create a repository where you can put your projects. This is a great way to back up your code and makes it easy to share the code around the world. For more information see "[Create a repository](/articles/create-a-repo)".
-- **Set up Git**
-- "[Create a repository](/articles/create-a-repo)"
-- "[Fork a repository](/articles/fork-a-repo)"
-- "[Be social](/articles/be-social)"
-- {% data reusables.support.connect-in-the-forum-bootcamp %}
+You can create a copy of a repository by forking it and propose the changes that you want to see without affecting the upstream repository. For more information see "[Fork a repository](/articles/fork-a-repo)."
+
+Each repository in {% data variables.product.product_name %} is owned by a person or an organization. You can interact with the people, repositories, and organizations by connecting and following them on {% data variables.product.product_name %}. For more information see "[Be social](/articles/be-social)."
+
+{% data reusables.support.connect-in-the-forum-bootcamp %}
diff --git a/content/github/authenticating-to-github/managing-commit-signature-verification/generating-a-new-gpg-key.md b/content/github/authenticating-to-github/managing-commit-signature-verification/generating-a-new-gpg-key.md
index 5f2d41a209..14163465a3 100644
--- a/content/github/authenticating-to-github/managing-commit-signature-verification/generating-a-new-gpg-key.md
+++ b/content/github/authenticating-to-github/managing-commit-signature-verification/generating-a-new-gpg-key.md
@@ -33,8 +33,8 @@ topics:
```shell
$ gpg --default-new-key-algo rsa4096 --gen-key
```
-4. At the prompt, specify the kind of key you want, or press `Enter` to accept the default `RSA and RSA`.
-5. Enter the desired key size. Your key must be at least `4096` bits.
+4. At the prompt, specify the kind of key you want, or press `Enter` to accept the default.
+5. At the prompt, specify the key size you want, or press `Enter` to accept the default. Your key must be at least `4096` bits.
6. Enter the length of time the key should be valid. Press `Enter` to specify the default selection, indicating that the key doesn't expire.
7. Verify that your selections are correct.
8. Enter your user ID information.
diff --git a/content/github/collaborating-with-pull-requests/working-with-forks/syncing-a-fork.md b/content/github/collaborating-with-pull-requests/working-with-forks/syncing-a-fork.md
index 733e714549..3daf4f5fc1 100644
--- a/content/github/collaborating-with-pull-requests/working-with-forks/syncing-a-fork.md
+++ b/content/github/collaborating-with-pull-requests/working-with-forks/syncing-a-fork.md
@@ -15,7 +15,7 @@ topics:
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1" or currentVersion == "github-ae@next" %}
-### Syncing a fork from the web UI
+## Syncing a fork from the web UI
1. On {% data variables.product.product_name %}, navigate to the main page of the forked repository that you want to sync with the upstream repository.
1. Select the **Fetch upstream** drop-down.
@@ -25,7 +25,7 @@ topics:
If the changes from the upstream repository cause conflicts, {% data variables.product.company_short %} will prompt you to create a pull request to resolve the conflicts.
-### Syncing a fork from the command line
+## Syncing a fork from the command line
{% endif %}
Before you can sync your fork with an upstream repository, you must [configure a remote that points to the upstream repository](/articles/configuring-a-remote-for-a-fork) in Git.
diff --git a/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md b/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md
index 17d5ab0e1b..7d73aaf397 100644
--- a/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md
+++ b/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/comparing-commits.md
@@ -1,5 +1,6 @@
---
title: Comparing commits
+intro: You can compare the state of your repository across branches, tags, commits, forks, and dates.
redirect_from:
- /articles/comparing-commits-across-time
- /github/committing-changes-to-your-project/comparing-commits-across-time
@@ -9,7 +10,7 @@ versions:
enterprise-server: '*'
github-ae: '*'
---
-You can compare the state of your repository across branches, tags, commits, and dates. To compare different versions of your repository, append `/compare` to your repository's path.
+To compare different versions of your repository, append `/compare` to your repository's path.
We'll demonstrate the power of Compare by looking at the compare page for [a fork of the Linguist repo](https://github.com/octocat/linguist), which is at [https://github.com/octocat/linguist/compare/master...octocat:master](https://github.com/octocat/linguist/compare/master...octocat:master).
diff --git a/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/differences-between-commit-views.md b/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/differences-between-commit-views.md
index aa1738cb8c..e081da51d1 100644
--- a/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/differences-between-commit-views.md
+++ b/content/github/committing-changes-to-your-project/viewing-and-comparing-commits/differences-between-commit-views.md
@@ -1,5 +1,6 @@
---
title: Differences between commit views
+intro: You might observe differences in commit history depending on the chosen viewing method.
redirect_from:
- /articles/differences-between-commit-views
- /github/committing-changes-to-your-project/differences-between-commit-views
diff --git a/content/github/site-policy/github-sponsors-additional-terms.md b/content/github/site-policy/github-sponsors-additional-terms.md
index 767fe419d5..9266446ea5 100644
--- a/content/github/site-policy/github-sponsors-additional-terms.md
+++ b/content/github/site-policy/github-sponsors-additional-terms.md
@@ -23,7 +23,7 @@ Your participation in the GitHub Sponsors Program (the "Program") is subject to
"**Sponsorship**" means a payment paid to you through the Program and the Service.
-"**Subscription**" means a recurring monthly Sponsorship in exchange for goods, services, or other offers you provide to Sponsors.
+"**Subscription**" means a recurring or one-time Sponsorship in exchange for goods, services, or other offers you provide to Sponsors.
"**Sponsored Developer Payment**" means the net of one hundred percent (100%) of GitHub's gross monthly payments received from Sponsorships and Subscriptions to Sponsored Developer Accounts, plus any applicable Matching Funds, and other proceeds from monetization options that the Sponsored Developer elects to use, as applicable, less any discounts, taxes, fees, amounts that GitHub did not collect or which were refunded or charged back, amounts owed to any third-party in connection with the Program with respect to a Sponsored Developer Account, and other Exclusions as outlined in Section 4.
diff --git a/content/rest/guides/getting-started-with-the-rest-api.md b/content/rest/guides/getting-started-with-the-rest-api.md
index f5f6dc0fa4..a4bbf05b53 100644
--- a/content/rest/guides/getting-started-with-the-rest-api.md
+++ b/content/rest/guides/getting-started-with-the-rest-api.md
@@ -13,7 +13,9 @@ topics:
---
-Let's walk through core API concepts as we tackle some everyday use cases.
+Let's walk through core API concepts as we tackle some everyday use cases.
+
+{% data reusables.rest-api.dotcom-only-guide-note %}
## Overview
diff --git a/content/rest/guides/traversing-with-pagination.md b/content/rest/guides/traversing-with-pagination.md
index a49b04e1bf..8d32240dfc 100644
--- a/content/rest/guides/traversing-with-pagination.md
+++ b/content/rest/guides/traversing-with-pagination.md
@@ -12,16 +12,16 @@ topics:
- API
---
-
-
The {% data variables.product.product_name %} API provides a vast wealth of information for developers to consume.
Most of the time, you might even find that you're asking for _too much_ information,
and in order to keep our servers happy, the API will automatically [paginate the requested items][pagination].
-In this guide, we'll make some calls to the {% data variables.product.product_name %} Search API, and iterate over
+In this guide, we'll make some calls to the Search API, and iterate over
the results using pagination. You can find the complete source code for this project
in the [platform-samples][platform samples] repository.
+{% data reusables.rest-api.dotcom-only-guide-note %}
+
## Basics of Pagination
To start with, it's important to know a few facts about receiving paginated items:
@@ -40,7 +40,7 @@ of an API call. For example, let's make a curl request to the search API, to fin
out how many times Mozilla projects use the phrase `addClass`:
```shell
-$ curl -I "{% data variables.product.api_url_pre %}/search/code?q=addClass+user:mozilla"
+$ curl -I "https://api.github.com/search/code?q=addClass+user:mozilla"
```
The `-I` parameter indicates that we only care about the headers, not the actual
@@ -66,7 +66,7 @@ parameter. By default, `page` always starts at `1`. Let's jump ahead to page 14
and see what happens:
```shell
-$ curl -I "{% data variables.product.api_url_pre %}/search/code?q=addClass+user:mozilla&page=14"
+$ curl -I "https://api.github.com/search/code?q=addClass+user:mozilla&page=14"
```
Here's the link header once more:
@@ -88,7 +88,7 @@ By passing the `per_page` parameter, you can specify how many items you want
each page to return, up to 100 items. Let's try asking for 50 items about `addClass`:
```shell
-$ curl -I "{% data variables.product.api_url_pre %}/search/code?q=addClass+user:mozilla&per_page=50"
+$ curl -I "https://api.github.com/search/code?q=addClass+user:mozilla&per_page=50"
```
Notice what it does to the header response:
diff --git a/data/reusables/github-insights/enterprise-api-url.md b/data/reusables/github-insights/enterprise-api-url.md
index 837dc323a7..061c6b351b 100644
--- a/data/reusables/github-insights/enterprise-api-url.md
+++ b/data/reusables/github-insights/enterprise-api-url.md
@@ -1,2 +1,2 @@
-1. Under "{% data variables.product.prodname_dotcom %} API URL", type {% if currentVersion == "free-pro-team@latest" %}https://api.github.com {% else %}the URL you use to access {% data variables.product.prodname_enterprise %}{% endif %}.
+1. Under "{% data variables.product.prodname_dotcom %} API URL", type {% if currentVersion == "free-pro-team@latest" %}https://api.github.com{% else %}the URL you use to access {% data variables.product.product_name %}{% endif %}.

diff --git a/data/reusables/rest-api/dotcom-only-guide-note.md b/data/reusables/rest-api/dotcom-only-guide-note.md
new file mode 100644
index 0000000000..337cff1adf
--- /dev/null
+++ b/data/reusables/rest-api/dotcom-only-guide-note.md
@@ -0,0 +1,13 @@
+{% if currentVersion != "free-pro-team@latest" %}
+
+{% note %}
+
+**Note**: The following guide uses the REST API for {% data variables.product.prodname_dotcom_the_website %}.
+
+- Use {% data variables.product.api_url_pre %} to access the API for {% data variables.product.product_name %}.
+
+- The guide specifies usernames and repositories that may not exist on {% data variables.product.product_location %}. You may need to use different names to see similar output.
+
+{% endnote %}
+
+{% endif %}
diff --git a/data/reusables/support/connect-in-the-forum-bootcamp.md b/data/reusables/support/connect-in-the-forum-bootcamp.md
index f67d841003..5c2fbea04f 100644
--- a/data/reusables/support/connect-in-the-forum-bootcamp.md
+++ b/data/reusables/support/connect-in-the-forum-bootcamp.md
@@ -1 +1 @@
-Connect with people around the world in the [{% data variables.product.prodname_gcf %}](https://github.community)
+{% data variables.product.product_name %} has a great support community where you can ask for help and talk to people from around the world. Join the conversation on [Github Support Community](https://github.community/).
diff --git a/data/variables/product.yml b/data/variables/product.yml
index 0279f84228..db6d251788 100644
--- a/data/variables/product.yml
+++ b/data/variables/product.yml
@@ -188,7 +188,7 @@ doc_url_pre: >-
{% if currentVersion == "free-pro-team@latest" %}https://docs.github.com/rest{% elsif enterpriseServerVersions contains currentVersion %}https://docs.github.com/enterprise/{{ currentVersion | version_num }}/rest{% elsif currentVersion == "github-ae@latest" %}https://docs.github.com/github-ae@latest/rest{% endif %}
# Use this inside command-line code blocks
api_url_pre: >-
- {% if currentVersion == "free-pro-team@latest" %}https://api.github.com{% elsif enterpriseServerVersions contains currentVersion %}http(s)://[hostname]/api/v3{% elsif currentVersion == "github-ae@latest" %}https://api.[hostname]{% endif %}
+ {% if currentVersion == "free-pro-team@latest" %}https://api.github.com{% elsif enterpriseServerVersions contains currentVersion %}http(s)://[hostname]/api/v3{% elsif currentVersion == "github-ae@latest" %}https://[hostname]/api/v3{% endif %}
# Use this inside command-line code blocks
# Enterprise OAuth paths that don't include "/graphql" or "/api/v3"
oauth_host_code: >-
@@ -197,7 +197,7 @@ device_authorization_url: >-
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.21" or currentVersion == "github-ae@latest" %}[`https://github.com/login/device`](https://github.com/login/device){% else %}`http(s)://[hostname]/login/device`{% endif %}
# Use this all other code blocks
api_url_code: >-
- {% if currentVersion == "free-pro-team@latest" %}https://api.github.com{% elsif enterpriseServerVersions contains currentVersion %}http(s)://[hostname]/api/v3{% elsif currentVersion == "github-ae@latest" %}https://api.[hostname]{% endif %}
+ {% if currentVersion == "free-pro-team@latest" %}https://api.github.com{% elsif enterpriseServerVersions contains currentVersion %}http(s)://[hostname]/api/v3{% elsif currentVersion == "github-ae@latest" %}https://[hostname]/api/v3{% endif %}
# Use this inside command-line code blocks
graphql_url_pre: >-
{% if currentVersion == "free-pro-team@latest" %}https://api.github.com/graphql{% elsif enterpriseServerVersions contains currentVersion %}http(s)://[hostname]/api/graphql{% elsif currentVersion == "github-ae@latest" %}https://api.[hostname]/graphql{% endif %}
diff --git a/javascripts/copy-code.ts b/javascripts/copy-code.ts
index 709573bb11..8b0f3793c1 100644
--- a/javascripts/copy-code.ts
+++ b/javascripts/copy-code.ts
@@ -1,4 +1,4 @@
-export default () => {
+export default function copyCode() {
const buttons = Array.from(document.querySelectorAll('button.js-btn-copy'))
if (!buttons) return
diff --git a/javascripts/experiment.ts b/javascripts/experiment.ts
index dd0228e76e..664c26e1c8 100644
--- a/javascripts/experiment.ts
+++ b/javascripts/experiment.ts
@@ -1,6 +1,5 @@
import murmur from 'imurmurhash'
import { getUserEventsId, sendEvent, EventType } from './events'
-// import h from './hyperscript'
const TREATMENT = 'TREATMENT'
const CONTROL = 'CONTROL'
diff --git a/lib/rest/static/decorated/api.github.com.json b/lib/rest/static/decorated/api.github.com.json
index e84fa7e1d6..55e1d167f1 100644
--- a/lib/rest/static/decorated/api.github.com.json
+++ b/lib/rest/static/decorated/api.github.com.json
@@ -73494,6 +73494,16 @@
},
"descriptionHTML": "
Set to open or resolved to only list secret scanning alerts in a specific state.
"
},
+ {
+ "name": "secret_types",
+ "in": "query",
+ "description": "Set to a comma separated list of `secret_type` in order to only list secret scanning alerts for those types. Set to `all` to list all the secret scanning alerts. Default is `all`.",
+ "required": false,
+ "schema": {
+ "type": "string"
+ },
+ "descriptionHTML": "
Set to a comma separated list of secret_type in order to only list secret scanning alerts for those types. Set to all to list all the secret scanning alerts. Default is all.
"
+ },
{
"name": "page",
"description": "Page number of the results to fetch.",
diff --git a/lib/rest/static/decorated/ghes-3.1.json b/lib/rest/static/decorated/ghes-3.1.json
index 4f345beb9e..0331f14703 100644
--- a/lib/rest/static/decorated/ghes-3.1.json
+++ b/lib/rest/static/decorated/ghes-3.1.json
@@ -71285,6 +71285,16 @@
},
"descriptionHTML": "
Set to open or resolved to only list secret scanning alerts in a specific state.
"
},
+ {
+ "name": "secret_types",
+ "in": "query",
+ "description": "Set to a comma separated list of `secret_type` in order to only list secret scanning alerts for those types. Set to `all` to list all the secret scanning alerts. Default is `all`.",
+ "required": false,
+ "schema": {
+ "type": "string"
+ },
+ "descriptionHTML": "
Set to a comma separated list of secret_type in order to only list secret scanning alerts for those types. Set to all to list all the secret scanning alerts. Default is all.
"
+ },
{
"name": "page",
"description": "Page number of the results to fetch.",
diff --git a/lib/rest/static/dereferenced/api.github.com.deref.json b/lib/rest/static/dereferenced/api.github.com.deref.json
index d3acd48f4a..abb94a8099 100644
--- a/lib/rest/static/dereferenced/api.github.com.deref.json
+++ b/lib/rest/static/dereferenced/api.github.com.deref.json
@@ -323443,6 +323443,15 @@
]
}
},
+ {
+ "name": "secret_types",
+ "in": "query",
+ "description": "Set to a comma separated list of `secret_type` in order to only list secret scanning alerts for those types. Set to `all` to list all the secret scanning alerts. Default is `all`.",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "page",
"description": "Page number of the results to fetch.",
diff --git a/lib/rest/static/dereferenced/ghes-3.1.deref.json b/lib/rest/static/dereferenced/ghes-3.1.deref.json
index d5076a6118..20264f16b6 100644
--- a/lib/rest/static/dereferenced/ghes-3.1.deref.json
+++ b/lib/rest/static/dereferenced/ghes-3.1.deref.json
@@ -307187,6 +307187,15 @@
]
}
},
+ {
+ "name": "secret_types",
+ "in": "query",
+ "description": "Set to a comma separated list of `secret_type` in order to only list secret scanning alerts for those types. Set to `all` to list all the secret scanning alerts. Default is `all`.",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "page",
"description": "Page number of the results to fetch.",
diff --git a/middleware/contextualizers/generic-toc.js b/middleware/contextualizers/generic-toc.js
index fb796dd0a3..7983328603 100644
--- a/middleware/contextualizers/generic-toc.js
+++ b/middleware/contextualizers/generic-toc.js
@@ -50,7 +50,7 @@ module.exports = async function genericToc (req, res, next) {
async function getTocItems (pagesArray, context, isRecursive, renderIntros) {
return (await Promise.all(pagesArray.map(async (child) => {
// Do not include hidden child items on a TOC page
- if (child.page.hidden) return
+ if (child.page.hidden && !context.currentPath.includes('/early-access/')) return
return {
title: child.renderedFullTitle,
diff --git a/middleware/is-next-request.js b/middleware/is-next-request.js
index 3bcddfebb1..93d8c3c69c 100644
--- a/middleware/is-next-request.js
+++ b/middleware/is-next-request.js
@@ -5,29 +5,6 @@ const versionIds = Object.keys(require('../lib/all-versions'))
const { FEATURE_NEXTJS } = process.env;
-const enabledSubSections = [
- // 'actions',
- // 'admin',
- "billing",
- // "code-security",
- // "codespaces",
- "communities",
- "desktop",
- // "developers",
- "discussions",
- // 'early-access',
- "education",
- // 'github',
- // "graphql",
- // 'insights',
- // "issues",
- "organizations",
- 'packages',
- "pages",
- "rest",
- "sponsors",
-];
-
const homePageExp = pathToRegexp('/:locale/:versionId?')
const productPageExp = pathToRegexp('/:locale/:versionId?/:productId')
const subSectionExp = pathToRegexp('/:locale/:versionId?/:productId/:subSection*')
@@ -53,8 +30,7 @@ module.exports = function isNextRequest(req, res, next) {
} else if (productPageMatch && productIds.includes(productPageMatch[3])) {
req.renderWithNextjs = true
} else if (subSectionMatch) {
- // depending on whether versionId is included the productId is in a different place
- req.renderWithNextjs = enabledSubSections.includes(subSectionMatch[2]) || enabledSubSections.includes(subSectionMatch[3])
+ req.renderWithNextjs = true
}
}
}
diff --git a/pages/[versionId]/[productId]/index.tsx b/pages/[versionId]/[productId]/index.tsx
index 8a1a9e853e..fa9b35a696 100644
--- a/pages/[versionId]/[productId]/index.tsx
+++ b/pages/[versionId]/[productId]/index.tsx
@@ -1,5 +1,14 @@
import { GetServerSideProps } from 'next'
+// "legacy" javascript needed to maintain existing functionality
+// typically operating on elements **within** an article.
+import copyCode from 'javascripts/copy-code'
+import displayPlatformSpecificContent from 'javascripts/display-platform-specific-content'
+import displayToolSpecificContent from 'javascripts/display-tool-specific-content'
+import localization from 'javascripts/localization'
+import toggleImages from 'javascripts/toggle-images'
+import wrapCodeTerms from 'javascripts/wrap-code-terms'
+
import {
MainContextT,
MainContext,
@@ -32,6 +41,7 @@ import {
TocLandingContext,
TocLandingContextT,
} from 'components/context/TocLandingContext'
+import { useEffect } from 'react'
type Props = {
mainContext: MainContextT
@@ -49,6 +59,15 @@ const GlobalPage = ({
}: Props) => {
const { currentLayoutName, relativePath } = mainContext
+ useEffect(() => {
+ copyCode()
+ displayPlatformSpecificContent()
+ displayToolSpecificContent()
+ localization()
+ toggleImages()
+ wrapCodeTerms()
+ }, [])
+
let content
if (currentLayoutName === 'product-landing') {
content = (
diff --git a/pages/[versionId]/graphql/overview/explorer.tsx b/pages/[versionId]/graphql/overview/explorer.tsx
index e25d23d2cc..11fd22b0f2 100644
--- a/pages/[versionId]/graphql/overview/explorer.tsx
+++ b/pages/[versionId]/graphql/overview/explorer.tsx
@@ -7,6 +7,7 @@ import {
} from 'components/context/MainContext'
import { Breadcrumbs } from 'components/Breadcrumbs'
import { DefaultLayout } from 'components/DefaultLayout'
+import { useEffect, useRef } from 'react'
type Props = {
mainContext: MainContextT
@@ -14,6 +15,14 @@ type Props = {
}
export default function GQLExplorer({ mainContext, graphqlExplorerUrl }: Props) {
const { page, airGap } = mainContext
+ const graphiqlRef = useRef(null)
+
+ useEffect(() => {
+ if (typeof window !== 'undefined' && window.location.search) {
+ graphiqlRef.current?.contentWindow?.postMessage(window.location.search, graphqlExplorerUrl)
+ }
+ }, [])
+
return (
@@ -33,12 +42,7 @@ export default function GQLExplorer({ mainContext, graphqlExplorerUrl }: Props)
GraphQL explorer is not available on this environment.