1
0
mirror of synced 2025-12-30 03:01:36 -05:00

Merge pull request #23118 from github/repo-sync

repo sync
This commit is contained in:
Octomerger Bot
2023-01-10 10:03:06 -08:00
committed by GitHub
23 changed files with 164 additions and 99 deletions

View File

@@ -28,50 +28,58 @@ const MAX_COMMENT_SIZE = 125000
const PROD_URL = 'https://docs.github.com'
run()
// When this file is invoked directly from action as opposed to being imported
if (import.meta.url.endsWith(process.argv[1])) {
const owner = context.repo.owner
const repo = context.payload.repository.name
const baseSHA = context.payload.pull_request.base.sha
const headSHA = context.payload.pull_request.head.sha
async function run() {
const isHealthy = await waitUntilUrlIsHealthy(new URL('/healthz', APP_URL).toString())
if (!isHealthy) {
return core.setFailed(`Timeout waiting for preview environment: ${APP_URL}`)
core.setFailed(`Timeout waiting for preview environment: ${APP_URL}`)
} else {
const markdownTable = await main(core, owner, repo, baseSHA, headSHA)
core.setOutput('changesTable', markdownTable)
}
}
async function main(owner, repo, baseSHA, headSHA) {
const octokit = github.getOctokit(GITHUB_TOKEN)
// get the list of file changes from the PR
const response = await octokit.rest.repos.compareCommitsWithBasehead({
owner: context.repo.owner,
repo: context.payload.repository.name,
basehead: `${context.payload.pull_request.base.sha}...${context.payload.pull_request.head.sha}`,
owner,
repo,
basehead: `${baseSHA}...${headSHA}`,
})
const { files } = response.data
let markdownTable =
'| **Source** | **Preview** | **Production** | **What Changed** |\n|:----------- |:----------- |:----------- |:----------- |\n'
const markdownTableHead = [
'| **Source** | **Preview** | **Production** | **What Changed** |',
'|:----------- |:----------- |:----------- |:----------- |',
]
let markdownTable = ''
const pathPrefix = 'content/'
const articleFiles = files.filter(
({ filename }) => filename.startsWith(pathPrefix) && !filename.endsWith('/index.md')
)
const articleFiles = files.filter(({ filename }) => filename.startsWith(pathPrefix))
const lines = await Promise.all(
articleFiles.map(async (file) => {
const sourceUrl = file.blob_url
const fileName = file.filename.slice(pathPrefix.length)
const fileUrl = fileName.slice(0, fileName.lastIndexOf('.'))
const fileUrl = fileName.replace('/index.md', '').replace(/\.md$/, '')
// get the file contents and decode them
// this script is called from the main branch, so we need the API call to get the contents from the branch, instead
const fileContents = await getContents(
context.repo.owner,
context.payload.repository.name,
owner,
repo,
// Can't get its content if it no longer exists.
// Meaning, you'd get a 404 on the `getContents()` utility function.
// So, to be able to get necessary meta data about what it *was*,
// if it was removed, fall back to the 'base'.
file.status === 'removed'
? context.payload.pull_request.base.sha
: context.payload.pull_request.head.sha,
file.status === 'removed' ? baseSHA : headSHA,
file.filename
)
@@ -164,7 +172,13 @@ async function run() {
return previous
}, markdownTable.length)
if (cappedLines.length) {
cappedLines.unshift(...markdownTableHead)
}
markdownTable += cappedLines.join('\n')
core.setOutput('changesTable', markdownTable)
return markdownTable
}
export default main

View File

@@ -83,6 +83,7 @@ jobs:
body-includes: '<!-- MODIFIED_CONTENT_LINKING_COMMENT -->'
- name: Update comment
if: ${{ steps.changes.outputs.changesTable != '' }}
uses: peter-evans/create-or-update-comment@c9fcb64660bc90ec1cc535646af190c992007c32
with:
comment-id: ${{ steps.findComment.outputs.comment-id }}

View File

@@ -27,8 +27,36 @@ env:
ENABLE_SEARCH_RESULTS_PAGE: true
jobs:
test:
figureOutMatrix:
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.result }}
steps:
- uses: actions/github-script@d556feaca394842dc55e4734bf3bb9f685482fa0
id: set-matrix
with:
script: |
// We only want to run the 'translations' suite when we know
// we're on the private docs-internal repo because only that
// one has ability to clone the remote (private) translations
// repos.
const all = [
'content',
'graphql',
'meta',
'rendering',
'routing',
'unit',
'linting',
];
if (context.payload.repository.full_name === 'github/docs-internal') {
all.push('translations');
}
return all;
test:
needs: figureOutMatrix
# Run on ubuntu-20.04-xl if the private repo or ubuntu-latest if the public repo
# See pull # 17442 in the private repo for context
runs-on: ${{ fromJSON('["ubuntu-latest", "ubuntu-20.04-xl"]')[github.repository == 'github/docs-internal'] }}
@@ -36,17 +64,7 @@ jobs:
strategy:
fail-fast: false
matrix:
test-group:
[
content,
graphql,
meta,
rendering,
routing,
unit,
linting,
translations,
]
test-group: ${{ fromJSON(needs.figureOutMatrix.outputs.matrix) }}
steps:
- name: Install a local Elasticsearch for testing
# For the sake of saving time, only run this step if the test-group

View File

@@ -6,21 +6,21 @@ introLinks:
quickstart: /get-started/onboarding/getting-started-with-your-github-account
featuredLinks:
guides:
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/changing-your-github-username
- '{% ifversion ghae %}/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/about-your-personal-dashboard{% endif %}'
- /account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/changing-your-github-username
- '{% ifversion ghae %}/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/about-your-personal-dashboard{% endif %}'
- /account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme
- '{% ifversion ghae %}/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile{% endif %}'
- /account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications
popular:
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-theme-settings
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository
- /account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-your-theme-settings
- /account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address
- /account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository
- /account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications
guideCards:
- /account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile
- /account-and-profile/managing-subscriptions-and-notifications-on-github/viewing-and-triaging-notifications/managing-notifications-from-your-inbox
- /account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/blocking-command-line-pushes-that-expose-your-personal-email-address
- '{% ifversion ghes or ghae %}/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-the-default-branch-name-for-your-repositories{% endif %}'
- /account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/blocking-command-line-pushes-that-expose-your-personal-email-address
- '{% ifversion ghes or ghae %}/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-the-default-branch-name-for-your-repositories{% endif %}'
changelog:
label: 'profiles, github-themes, notifications'
versions:
@@ -41,4 +41,3 @@ children:
- /setting-up-and-managing-your-github-profile
- /managing-subscriptions-and-notifications-on-github
---

View File

@@ -70,12 +70,12 @@ changelog:
label: enterprise
featuredLinks:
guides:
- '{% ifversion ghae %}/admin/user-management/auditing-users-across-your-enterprise{% endif %}'
- '{% ifversion ghae %}/admin/user-management/managing-users-in-your-enterprise/auditing-users-across-your-enterprise{% endif %}'
- /admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise
- /admin/policies/enforcing-policies-for-your-enterprise/about-enterprise-policies
- '{% ifversion ghae %}/admin/configuration/restricting-network-traffic-to-your-enterprise-with-an-ip-allow-list{% endif %}'
- '{% ifversion ghes %}/admin/configuration/configuring-backups-on-your-appliance{% endif %}'
- '{% ifversion ghes %}/admin/enterprise-management/creating-a-high-availability-replica{% endif %}'
- '{% ifversion ghes %}/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance{% endif %}'
- '{% ifversion ghes %}/admin/enterprise-management/configuring-high-availability/creating-a-high-availability-replica{% endif %}'
- '{% ifversion ghes %}/admin/overview/about-upgrades-to-new-releases{% endif %}'
- '{% ifversion ghec %}/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise{% endif %}'
- '{% ifversion ghec %}/admin/user-management/managing-organizations-in-your-enterprise/adding-organizations-to-your-enterprise{% endif %}'
@@ -83,16 +83,16 @@ featuredLinks:
- '{% ifversion ghes %}/admin/github-actions/getting-started-with-github-actions-for-github-enterprise-server{% endif %}'
- '{% ifversion ghes %}/admin/packages/getting-started-with-github-packages-for-your-enterprise{% endif %}'
- '{% ifversion ghes %}/admin/configuration/configuring-advanced-security-features{% endif %}'
- '{% ifversion ghae %}/admin/configuration/initializing-github-ae{% endif %}'
- '{% ifversion ghae %}/admin/user-management/customizing-user-messages-for-your-enterprise{% endif %}'
- '{% ifversion ghae %}/admin/github-actions/getting-started-with-github-actions-for-github-ae{% endif %}'
- '{% ifversion ghec %}/admin/policies/enforcing-policies-for-your-enterprise/enforcing-github-actions-policies-for-your-enterprise{% endif %}'
- '{% ifversion ghec %}/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-advanced-security-in-your-enterprise{% endif %}'
- '{% ifversion ghae %}/admin/configuration/configuring-your-enterprise/initializing-github-ae{% endif %}'
- '{% ifversion ghae %}/admin/user-management/managing-users-in-your-enterprise/customizing-user-messages-for-your-enterprise{% endif %}'
- '{% ifversion ghae %}/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-ae{% endif %}'
- '{% ifversion ghec %}/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise{% endif %}'
- '{% ifversion ghec %}/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-code-security-and-analysis-for-your-enterprise{% endif %}'
- '{% ifversion ghec %}/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise{% endif %}'
popular:
- /admin/overview/about-github-enterprise-server
- '{% ifversion ghae %}/admin/release-notes{% endif %}'
- '{% ifversion ghes %}/github/getting-started-with-github/setting-up-a-trial-of-github-enterprise-server{% endif %}'
- '{% ifversion ghes %}/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-server{% endif %}'
- '{% ifversion ghes %}/admin/installation{% endif %}'
- '{% ifversion ghae %}/admin/identity-and-access-management/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad{% endif %}'
- '{% ifversion ghae %}/billing/managing-billing-for-your-github-account/about-billing-for-your-enterprise{% endif %}'
@@ -104,7 +104,7 @@ featuredLinks:
- '{% ifversion ghec %}/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise{% endif %}'
- '{% ifversion ghec %}/admin/monitoring-activity-in-your-enterprise/exploring-user-activity/managing-global-webhooks{% endif %}'
- /billing/managing-your-license-for-github-enterprise/using-visual-studio-subscription-with-github-enterprise/setting-up-visual-studio-subscription-with-github-enterprise
- /admin/enterprise-support/about-github-enterprise-support
- /support/learning-about-github-support/about-github-support
layout: product-landing
versions:
ghec: '*'

View File

@@ -54,4 +54,3 @@ children:
- /the-githubdev-web-based-editor
- /guides
---

View File

@@ -10,7 +10,7 @@ featuredLinks:
- /education/explore-the-benefits-of-teaching-and-learning-with-github-education/github-global-campus-for-teachers/apply-to-github-global-campus-as-a-teacher
- /education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution
guideCards:
- /github/getting-started-with-github/signing-up-for-a-new-github-account
- /get-started/signing-up-for-github/signing-up-for-a-new-github-account
- /github/getting-started-with-github/git-and-github-learning-resources
- /education/manage-coursework-with-github-classroom/basics-of-setting-up-github-classroom
popular:
@@ -31,4 +31,3 @@ children:
- /manage-coursework-with-github-classroom
- /guides
---

View File

@@ -26,7 +26,7 @@ introLinks:
quickstart: /get-started/quickstart
featuredLinks:
guides:
- /github/getting-started-with-github/githubs-products
- /get-started/learning-about-github/githubs-products
- /get-started/onboarding/getting-started-with-your-github-account
- /get-started/onboarding/getting-started-with-github-team
- /get-started/onboarding/getting-started-with-github-enterprise-cloud
@@ -34,16 +34,16 @@ featuredLinks:
- /get-started/onboarding/getting-started-with-github-ae
- /get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/quickstart-for-writing-on-github
popular:
- /github/getting-started-with-github/signing-up-for-a-new-github-account
- /get-started/signing-up-for-github/signing-up-for-a-new-github-account
- /get-started/quickstart/hello-world
- /github/getting-started-with-github/set-up-git
- /get-started/quickstart/set-up-git
- /get-started/learning-about-github/about-versions-of-github-docs
- /github/getting-started-with-github/github-glossary
- /github/getting-started-with-github/keyboard-shortcuts
- /get-started/quickstart/github-glossary
- /get-started/using-github/keyboard-shortcuts
guideCards:
- /github/getting-started-with-github/types-of-github-accounts
- /github/getting-started-with-github/finding-ways-to-contribute-to-open-source-on-github
- /github/getting-started-with-github/troubleshooting-connectivity-problems
- /get-started/learning-about-github/types-of-github-accounts
- /get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github
- /get-started/using-github/troubleshooting-connectivity-problems
topics:
- Pull requests
- Issues

View File

@@ -3,9 +3,9 @@ title: '{% data variables.product.product_name %}{% ifversion fpt or ghec%}.com{
featuredLinks:
gettingStarted:
- /get-started/quickstart/set-up-git
- /github/authenticating-to-github/connecting-to-github-with-ssh
- /authentication/connecting-to-github-with-ssh
- /repositories/creating-and-managing-repositories
- /github/writing-on-github/basic-writing-and-formatting-syntax
- /get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax
popular:
- /pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
- /authentication
@@ -150,4 +150,3 @@ externalProducts:
href: 'https://docs.npmjs.com/'
external: true
---

View File

@@ -1,6 +1,6 @@
---
title: SCIM
intro: You can control and manage your GitHub organization members access using SCIM API.
intro: Use the REST API to control and manage your GitHub organization members access with SCIM.
versions:
ghec: '*'
topics:
@@ -10,23 +10,23 @@ redirect_from:
- /rest/reference/scim
---
## About the SCIM API
## About SCIM
### SCIM Provisioning for Organizations
The SCIM API is used by SCIM-enabled Identity Providers (IdPs) to automate provisioning of {% data variables.product.product_name %} organization membership. The {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API is based on version 2.0 of the [SCIM standard](http://www.simplecloud.info/). The {% data variables.product.product_name %} SCIM endpoint that an IdP should use is: `{% data variables.product.api_url_code %}/scim/v2/organizations/{org}/`.
These endpoints are used by SCIM-enabled Identity Providers (IdPs) to automate provisioning of {% data variables.product.product_name %} organization membership and are based on version 2.0 of the [SCIM standard](http://www.simplecloud.info/). IdPs should use the base URL `{% data variables.product.api_url_code %}/scim/v2/organizations/{org}/` for {% data variables.product.product_name %} SCIM endpoints.
{% note %}
**Notes:**
- The SCIM API is available only for individual organizations that use [{% data variables.product.prodname_ghe_cloud %}](/billing/managing-billing-for-your-github-account/about-billing-for-github-accounts) with [SAML SSO](/rest/overview/other-authentication-methods#authenticating-for-saml-sso) enabled. For more information about SCIM, see "[About SCIM for organizations](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/about-scim-for-organizations)."
- The SCIM API cannot be used with an enterprise account or with an {% data variables.enterprise.prodname_emu_org %}.
- These endpoints are only available for individual organizations that use [{% data variables.product.prodname_ghe_cloud %}](/billing/managing-billing-for-your-github-account/about-billing-for-github-accounts) with [SAML SSO](/rest/overview/other-authentication-methods#authenticating-for-saml-sso) enabled. For more information about SCIM, see "[About SCIM for organizations](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/about-scim-for-organizations)."
- These endpoints cannot be used with an enterprise account or with an {% data variables.enterprise.prodname_emu_org %}.
{% endnote %}
### Authenticating calls to the SCIM API
### Authentication
You must authenticate as an owner of a {% data variables.product.product_name %} organization to use its SCIM API. The API expects an [OAuth 2.0 Bearer](/developers/apps/authenticating-with-github-apps) token to be included in the `Authorization` header. If you use a {% data variables.product.pat_v1 %} for authentication, it must have the `admin:org` scope and you must also [authorize it for use with your SAML SSO organization](/github/authenticating-to-github/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on).
You must authenticate as an owner of a {% data variables.product.product_name %} organization to use these endpoints. The REST API expects an [OAuth 2.0 Bearer](/developers/apps/authenticating-with-github-apps) token to be included in the `Authorization` header. If you use a {% data variables.product.pat_v1 %} for authentication, it must have the `admin:org` scope and you must also [authorize it for use with your SAML SSO organization](/github/authenticating-to-github/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on).
### Mapping of SAML and SCIM data
@@ -46,7 +46,7 @@ Name | Type | Description
{% note %}
**Note:** Endpoint URLs for the SCIM API are case sensitive. For example, the first letter in the `Users` endpoint must be capitalized:
**Note:** These endpoints are case sensitive. For example, the first letter in the `Users` endpoint must be capitalized:
```shell
GET /scim/v2/organizations/{org}/Users/{scim_user_id}

View File

@@ -1,6 +1,6 @@
---
title: Blocking users
intro: ''
intro: Use the REST API to manage blocked users.
versions:
fpt: '*'
ghec: '*'
@@ -9,6 +9,7 @@ topics:
miniTocMaxHeadingLevel: 3
allowTitleToDifferFromFilename: true
---
## About the Blocking users API
## About blocking users
{% data reusables.user-settings.user-api %}

View File

@@ -1,6 +1,6 @@
---
title: Emails
intro: ''
intro: Use the REST API to manage email addresses of authenticated users.
versions:
fpt: '*'
ghes: '*'
@@ -10,8 +10,6 @@ topics:
miniTocMaxHeadingLevel: 3
---
## About the Emails API
Management of email addresses via the API requires that you authenticate through basic auth, or through OAuth with a correct scope for the endpoint.
## About email administration
{% data reusables.user-settings.user-api %}

View File

@@ -1,6 +1,6 @@
---
title: Followers
intro: ''
intro: Use the REST API to get information about followers of authenticated users.
versions:
fpt: '*'
ghes: '*'
@@ -11,6 +11,6 @@ topics:
miniTocMaxHeadingLevel: 3
---
## About the Followers API
## About follower administration
{% data reusables.user-settings.user-api %}

View File

@@ -1,6 +1,6 @@
---
title: GPG Keys
intro: ''
intro: Use the REST API to manage GPG keys of authenticated users.
versions:
fpt: '*'
ghes: '*'
@@ -11,8 +11,8 @@ topics:
miniTocMaxHeadingLevel: 3
---
## About the User GPG keys API
## About user GPG key administration
The data returned in the `public_key` response field is not a GPG formatted key. When a user uploads a GPG key, it is parsed and the cryptographic public key is extracted and stored. This cryptographic key is what is returned by the APIs on this page. This key is not suitable to be used directly by programs like GPG.
The data returned in the `public_key` response field is not a GPG formatted key. When a user uploads a GPG key, it is parsed and the cryptographic public key is extracted and stored. This cryptographic key is what the endpoints in this category will return. This key is not suitable for direct use in programs such as GPG.
{% data reusables.user-settings.user-api %}

View File

@@ -1,6 +1,6 @@
---
title: Users
intro: The Users API allows to get public and private information about the authenticated user.
intro: Use the REST API to get public and private information about authenticated users.
redirect_from:
- /v3/users
- /rest/reference/users

View File

@@ -1,6 +1,6 @@
---
title: Git SSH Keys
intro: ''
intro: Use the REST API to manage Git SSH keys of authenticated users.
versions:
fpt: '*'
ghes: '*'
@@ -12,6 +12,6 @@ miniTocMaxHeadingLevel: 3
allowTitleToDifferFromFilename: true
---
## About the User Git SSH keys API
## About Git SSH key administration
{% data reusables.user-settings.user-api %}

View File

@@ -1,6 +1,6 @@
---
title: SSH signing keys
intro: ''
intro: Use the REST API to manage SSH signing keys of authenticated users.
versions:
fpt: '*'
ghes: '>=3.7'
@@ -11,6 +11,6 @@ miniTocMaxHeadingLevel: 3
allowTitleToDifferFromFilename: true
---
## About the User SSH signing keys API
## About SSH signing key administration
{% data reusables.user-settings.user-api %}

View File

@@ -1,6 +1,6 @@
---
title: Users
intro: The Users API allows to get public and private information about the authenticated user.
intro: Use the REST API to get public and private information about authenticated users.
versions:
fpt: '*'
ghes: '*'
@@ -9,8 +9,4 @@ versions:
topics:
- API
miniTocMaxHeadingLevel: 3
---
## About the Users API
{% data reusables.user-settings.user-api %}
---

View File

@@ -1 +1 @@
Many of the resources on this API provide a shortcut for getting information about the currently authenticated user. If a request URL does not include a `{username}` parameter then the response will be for the logged in user (and you must pass [authentication information](/rest/overview/resources-in-the-rest-api#authentication) with your request).{% ifversion fpt or ghes or ghec %} Additional private information, such as whether a user has two-factor authentication enabled, is included when authenticated through basic auth or OAuth with the `user` scope.{% endif %}
If a request URL does not include a `{username}` parameter then the response will be for the signed-in user (and you must pass [authentication information](/rest/overview/resources-in-the-rest-api#authentication) with your request).{% ifversion fpt or ghes or ghec %} Additional private information, such as whether a user has two-factor authentication enabled, is included when authenticated through Basic Authentication or OAuth with the `user` scope.{% endif %}

11
package-lock.json generated
View File

@@ -8,7 +8,7 @@
"license": "(MIT AND CC-BY-4.0)",
"dependencies": {
"@elastic/elasticsearch": "7.11.0",
"@github/failbot": "0.8.0",
"@github/failbot": "0.8.2",
"@primer/behaviors": "^1.3.1",
"@primer/css": "^20.2.4",
"@primer/octicons": "17.10.1",
@@ -2127,8 +2127,9 @@
}
},
"node_modules/@github/failbot": {
"version": "0.8.0",
"license": "MIT",
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/@github/failbot/-/failbot-0.8.2.tgz",
"integrity": "sha512-F3aU2OV5gZROzl1oF8G2GqYVG7OFekFZlzb4xAvq6mm47/rlYQsmj1vVRuxwO/9fhOb6669ys/gSasJRtrwmKQ==",
"engines": {
"node": ">= 14.x",
"npm": ">= 7.x"
@@ -21882,7 +21883,9 @@
}
},
"@github/failbot": {
"version": "0.8.0"
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/@github/failbot/-/failbot-0.8.2.tgz",
"integrity": "sha512-F3aU2OV5gZROzl1oF8G2GqYVG7OFekFZlzb4xAvq6mm47/rlYQsmj1vVRuxwO/9fhOb6669ys/gSasJRtrwmKQ=="
},
"@graphql-inspector/core": {
"version": "3.1.2",

View File

@@ -10,7 +10,7 @@
],
"dependencies": {
"@elastic/elasticsearch": "7.11.0",
"@github/failbot": "0.8.0",
"@github/failbot": "0.8.2",
"@primer/behaviors": "^1.3.1",
"@primer/css": "^20.2.4",
"@primer/octicons": "17.10.1",

View File

@@ -0,0 +1,38 @@
#!/usr/bin/env node
// [start-readme]
//
// For testing the GitHub Action that executes
// .github/actions-scripts/content-changes-table-comment.js but doing it
// locally.
// This is more convenient and faster than relying on seeing that the
// Action produces in a PR. Especially since
// .github/workflows/content-changes-table-comment.yml only runs
// on `pull_request_target`.
//
// To try it you need to generate a local `GITHUB_TOKEN` that has read-access
// "content" and "pull requests" on the repo.
// You also need to set an APP_URL which can be the domain of the
// preview environment or just the production domain. Example:
//
//
// export GITHUB_TOKEN=github_pat_11AAAG.....
// export APP_URL=https://docs.github.com
// ./script/content-changes-table-comment.js github docs-internal main 4a0b0f2
//
// [end-readme]
import { program } from 'commander'
import main from '../.github/actions-scripts/content-changes-table-comment.js'
program
.description('Produce a nice table based on the branch diff')
.option('-v, --verbose', 'Verbose outputs')
.option('--debug', "Loud about everything it's doing")
.arguments('owner repo bash_sha head_sha', 'bla bla')
.parse(process.argv)
const opts = program.opts()
const args = program.args
console.log(await main(...args, { ...opts }))

View File

@@ -34,7 +34,7 @@ describe('featuredLinks', () => {
const $featuredLinks = $('[data-testid=article-list] a')
expect($featuredLinks.length > 0).toBeTruthy()
expect($featuredLinks.eq(0).attr('href')).toBe(
`/en/enterprise-server@${enterpriseServerReleases.latest}/github/getting-started-with-github/githubs-products`
`/en/enterprise-server@${enterpriseServerReleases.latest}/get-started/learning-about-github/githubs-products`
)
expect($featuredLinks.eq(0).children('h3').text().startsWith('GitHubs products')).toBe(true)
expect(