1
0
mirror of synced 2025-12-22 03:16:52 -05:00

Branch was updated using the 'autoupdate branch' Actions workflow.

This commit is contained in:
Octomerger Bot
2021-11-18 14:54:50 -05:00
committed by GitHub
67 changed files with 1208 additions and 214 deletions

View File

@@ -0,0 +1,39 @@
import { getOctokit } from '@actions/github'
const token = process.env.GITHUB_TOKEN
const prNumber = process.env.AUTOMERGE_PR_NUMBER
const github = getOctokit(token)
main()
async function main() {
const pull = await github.pulls.get({
...context.repo,
pull_number: parseInt(prNumber),
})
const pullNodeId = pull.data.node_id
console.log(`Pull request GraphQL Node ID: ${pullNodeId}`)
const mutation = `mutation ($id: ID!) {
enablePullRequestAutoMerge(input: {
pullRequestId: $id,
mergeMethod: MERGE
}) {
clientMutationId
}
}`
const variables = {
id: pullNodeId,
}
const graph = await github.graphql(mutation, variables)
console.log('GraphQL mutation result:\n' + JSON.stringify(graph))
if (graph.errors && graph.errors.length > 0) {
console.error(
'ERROR! Failed to enable auto-merge:\n - ' +
graph.errors.map((error) => error.message).join('\n - ')
)
} else {
console.log('Auto-merge enabled!')
}
}

View File

@@ -4,6 +4,7 @@
// can be added it this list. // can be added it this list.
export default [ export default [
'actions/cache@c64c572235d810460d0d6876e9c705ad5002b353', // v2.1.6
'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97', // v2.3.5 'actions/checkout@1e204e9a9253d643386038d443f96446fa156a97', // v2.3.5
'actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d', // v4.0.2 'actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d', // v4.0.2
'actions/labeler@5f867a63be70efff62b767459b009290364495eb', // v2.2.0 'actions/labeler@5f867a63be70efff62b767459b009290364495eb', // v2.2.0
@@ -25,7 +26,6 @@ export default [
'juliangruber/find-pull-request-action@db875662766249c049b2dcd85293892d61cb0b51', // v1.5.0 'juliangruber/find-pull-request-action@db875662766249c049b2dcd85293892d61cb0b51', // v1.5.0
'juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512', 'juliangruber/read-file-action@e0a316da496006ffd19142f0fd594a1783f3b512',
'lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb', 'lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb',
'pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07', // v0.12.0
'peter-evans/create-issue-from-file@b4f9ee0a9d4abbfc6986601d9b1a4f8f8e74c77e', 'peter-evans/create-issue-from-file@b4f9ee0a9d4abbfc6986601d9b1a4f8f8e74c77e',
'peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd', 'peter-evans/create-or-update-comment@5221bf4aa615e5c6e95bb142f9673a9c791be2cd',
'peter-evans/create-pull-request@7380612b49221684fefa025244f2ef4008ae50ad', // v3.10.1 'peter-evans/create-pull-request@7380612b49221684fefa025244f2ef4008ae50ad', // v3.10.1

View File

@@ -1,42 +0,0 @@
name: Automerge
# **What it does**: Pull requests with label "automerge" or "autosquash" will automatically merge.
# **Why we have it**: While now this is a feature built into GitHub, we still use it as part of other automation.
# **Who does it impact**: Any workflows that depend on automerge or autosquash labels.
on:
pull_request:
types:
- labeled
- unlabeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked
pull_request_review:
types:
- submitted
check_suite:
types:
- completed
status: {}
jobs:
automerge:
runs-on: ubuntu-latest
if: (contains(github.event.pull_request.labels.*.name, 'automerge') || contains(github.event.pull_request.labels.*.name, 'autosquash')) && (github.repository == 'github/docs-internal' || github.repository == 'github/docs')
steps:
- name: automerge
uses: 'pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07'
env:
GITHUB_TOKEN: '${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}'
MERGE_METHOD_LABELS: 'automerge=merge,autosquash=squash'
MERGE_COMMIT_MESSAGE: 'pull-request-title'
MERGE_METHOD: 'merge'
MERGE_FORKS: 'true'
MERGE_RETRIES: '50'
MERGE_RETRY_SLEEP: '10000' # ten seconds
UPDATE_LABELS: 'automerge,autosquash'
UPDATE_METHOD: 'merge'
HUSKY: '0' # Disable pre-commit hooks

View File

@@ -1,12 +1,12 @@
name: Autoupdate branch name: Autoupdate branch
# **What it does**: Any pull requests with "autoupdate" label will get main branch updates. # **What it does**: Any pull requests with automerge will get main branch updates.
# **Why we have it**: Our repo-sync automation relies on it. # **Why we have it**: So we don't have to watch pull requests and click update branch 100x.
# **Who does it impact**: Our ability to support the open-source repository. # **Who does it impact**: Our health.
# #
# This workflow checks all open PRs targeting `main` as their base branch and # This workflow checks all open PRs targeting `main` as their base branch and
# will attempt to update them if they have the `autoupdate` label applied. # will attempt to update them if they have automerge.
# It is triggered when a `push` event occurs ON the `main` branch (e.g. a PR # It is triggered when a `push` event occurs ON the `main` branch (e.g. a PR
# was merged or a force-push was done). # was merged or a force-push was done).
# #
@@ -31,6 +31,5 @@ jobs:
- uses: docker://chinthakagodawita/autoupdate-action:v1 - uses: docker://chinthakagodawita/autoupdate-action:v1
env: env:
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }} GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
PR_FILTER: labelled PR_FILTER: auto_merge
PR_LABELS: autoupdate
MERGE_MSG: "Branch was updated using the 'autoupdate branch' Actions workflow." MERGE_MSG: "Branch was updated using the 'autoupdate branch' Actions workflow."

View File

@@ -64,10 +64,16 @@ jobs:
"Hello! The GitHub Enterprise Server release dates have changed.\n\n "Hello! The GitHub Enterprise Server release dates have changed.\n\n
If CI passes, this PR will be auto-merged. :green_heart:\n\n If CI passes, this PR will be auto-merged. :green_heart:\n\n
If CI does not pass or other problems arise, contact #docs-engineering on slack.\n\nThis PR was 🤖-crafted by `.github/workflows/enterprise-dates.yml`. 🧶" If CI does not pass or other problems arise, contact #docs-engineering on slack.\n\nThis PR was 🤖-crafted by `.github/workflows/enterprise-dates.yml`. 🧶"
labels: automerge,autoupdate
branch: enterprise-server-dates-update branch: enterprise-server-dates-update
delete-branch: true delete-branch: true
- name: Enable GitHub auto-merge
if: ${{ steps.create-pull-request.outputs.pull-request-number }}
env:
GITHUB_TOKEN: ${{ secrets.DOCUBOT_REPO_PAT }}
AUTOMERGE_PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }}
run: node .github/actions-scripts/enable-automerge.js
- if: ${{ failure() && env.FREEZE != 'true' }} - if: ${{ failure() && env.FREEZE != 'true' }}
name: Delete remote branch (if previous steps failed) name: Delete remote branch (if previous steps failed)
uses: dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911 uses: dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911

View File

@@ -126,7 +126,7 @@ jobs:
destination_branch: main destination_branch: main
pr_title: 'repo sync' pr_title: 'repo sync'
pr_body: "This is an automated pull request to sync changes between the public and private repos.\n\n:robot: This pull request should be merged (not squashed) to preserve continuity across repos, so please let a bot do the merging!" pr_body: "This is an automated pull request to sync changes between the public and private repos.\n\n:robot: This pull request should be merged (not squashed) to preserve continuity across repos, so please let a bot do the merging!"
pr_label: autoupdate,automated-reposync-pr pr_label: automated-reposync-pr
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }} github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
- name: Find pull request - name: Find pull request
@@ -216,38 +216,10 @@ jobs:
- name: Enable GitHub auto-merge - name: Enable GitHub auto-merge
if: ${{ steps.find-pull-request.outputs.number }} if: ${{ steps.find-pull-request.outputs.number }}
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d env:
with: GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
github-token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }} AUTOMERGE_PR_NUMBER: ${{ steps.find-pull-request.outputs.number }}
script: | run: node .github/actions-scripts/enable-automerge.js
const pull = await github.pulls.get({
...context.repo,
pull_number: parseInt(${{ steps.find-pull-request.outputs.number }})
})
const pullNodeId = pull.data.node_id
console.log(`Pull request GraphQL Node ID: ${pullNodeId}`)
const mutation = `mutation ($id: ID!) {
enablePullRequestAutoMerge(input: {
pullRequestId: $id,
mergeMethod: MERGE
}) {
clientMutationId
}
}`
const variables = {
id: pullNodeId
}
const graph = await github.graphql(mutation, variables)
console.log('GraphQL mutation result:\n' + JSON.stringify(graph))
if (graph.errors && graph.errors.length > 0) {
console.error('ERROR! Failed to enable auto-merge:\n - ' + graph.errors.map(error => error.message).join('\n - '))
} else {
console.log('Auto-merge enabled!')
}
- name: Send Slack notification if workflow fails - name: Send Slack notification if workflow fails
uses: someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340 uses: someimportantcompany/github-actions-slack-message@f8d28715e7b8a4717047d23f48c39827cacad340

View File

@@ -11,6 +11,16 @@ on:
- reopened - reopened
- synchronize - synchronize
# This is necessary so that the cached things can be reused between
# pull requests.
# If we don't let the workflow run on `main` the caching will only
# help between multiple runs of the same workflow. By letting
# it build on pushes to main too, the cache will be reusable
# in other people's PRs too.
push:
branches:
- main
permissions: permissions:
contents: read contents: read
@@ -87,6 +97,12 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Cache nextjs build
uses: actions/cache@c64c572235d810460d0d6876e9c705ad5002b353
with:
path: .next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}-${{ hashFiles('.github/workflows/staging-build-pr.yml') }}
- name: Build - name: Build
run: npm run build run: npm run build
@@ -101,14 +117,13 @@ jobs:
- name: Delete heavy things we won't need deployed - name: Delete heavy things we won't need deployed
run: | run: |
# Not needed to run after having been built.
rm -fr .next/cache
# The dereferenced file is not used in runtime once the # The dereferenced file is not used in runtime once the
# decorated file has been created from it. # decorated file has been created from it.
rm -fr lib/rest/static/dereferenced rm -fr lib/rest/static/dereferenced
- name: Create an archive - name: Create an archive
# Only bother if this is actually a pull request
if: ${{ github.event.pull_request.number }}
run: | run: |
tar -c --file=app.tar \ tar -c --file=app.tar \
node_modules/ \ node_modules/ \
@@ -128,10 +143,18 @@ jobs:
app.json \ app.json \
Procfile Procfile
# We can't delete the .next/cache directory from the workflow
# because it's needed for caching, but we can at least delete it
# from within the tarball. Then it can be cached but not
# weigh down the tarball we intend to deploy.
tar --delete --file=app.tar .next/cache
# Upload only the files needed to run this application. # Upload only the files needed to run this application.
# We are not willing to trust the rest (e.g. script/) for the remainder # We are not willing to trust the rest (e.g. script/) for the remainder
# of the deployment process. # of the deployment process.
- name: Upload build artifact - name: Upload build artifact
# Only bother if this is actually a pull request
if: ${{ github.event.pull_request.number }}
uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074 uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074
with: with:
name: pr_build name: pr_build

View File

@@ -43,6 +43,13 @@ jobs:
run: echo "$GITHUB_CONTEXT" run: echo "$GITHUB_CONTEXT"
pr-metadata: pr-metadata:
# This is needed because the workflow we depend on
# (see on.workflow_run.workflows) might be running from pushes on
# main. That's because it needs to do that to popular the cache.
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
number: ${{ steps.pr.outputs.number }} number: ${{ steps.pr.outputs.number }}

View File

@@ -1,60 +0,0 @@
name: Translations
# **What it does**:
# **Why we have it**:
# **Who does it impact**: Docs localization
on:
schedule:
- cron: '20 19 * * *' # once a day at 19:20 UTC / 11:20 PST
permissions:
pull-requests: write
env:
FREEZE: ${{ secrets.FREEZE }}
jobs:
prepare:
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- if: ${{ env.FREEZE == 'true' }}
run: |
echo 'The repo is currently frozen! Exiting this workflow.'
exit 1 # prevents further steps from running
- name: Find original Pull Request
uses: juliangruber/find-pull-request-action@db875662766249c049b2dcd85293892d61cb0b51
id: pr
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
branch: translations
base: main
author: octoglot
state: open
- if: ${{ steps.pr.outputs.number }}
name: Check if already labeled
uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d
id: has-label
with:
script: |
const { data: labels } = await github.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ steps.pr.outputs.number }}
})
if (labels.find(label => label.name === 'automerge')) {
return 'ok'
}
- if: ${{ !steps.has-label.outputs.result }}
name: Approve Pull Request
uses: juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.pr.outputs.number }}
- if: ${{ !steps.has-label.outputs.result }}
name: Add automerge label
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
with:
issue-number: ${{ steps.pr.outputs.number }}
add-labels: 'automerge'

View File

@@ -58,9 +58,15 @@ jobs:
syncs up the GraphQL data in this repo.\n\n syncs up the GraphQL data in this repo.\n\n
If CI passes, this PR will be auto-merged. :green_heart:\n\n If CI passes, this PR will be auto-merged. :green_heart:\n\n
If CI does not pass or other problems arise, contact #docs-engineering on slack." If CI does not pass or other problems arise, contact #docs-engineering on slack."
labels: automerge,autoupdate
branch: graphql-schema-update branch: graphql-schema-update
- name: Enable GitHub auto-merge
if: ${{ steps.create-pull-request.outputs.pull-request-number }}
env:
GITHUB_TOKEN: ${{ secrets.DOCUBOT_REPO_PAT }}
AUTOMERGE_PR_NUMBER: ${{ steps.create-pull-request.outputs.pull-request-number }}
run: node .github/actions-scripts/enable-automerge.js
- if: ${{ failure() && env.FREEZE != 'true'}} - if: ${{ failure() && env.FREEZE != 'true'}}
name: Delete remote branch (if previous steps failed) name: Delete remote branch (if previous steps failed)
uses: dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911 uses: dawidd6/action-delete-branch@47743101a121ad657031e6704086271ca81b1911

View File

@@ -20,7 +20,7 @@ export function GenericError() {
<div className="container-xl p-responsive py-9 width-full flex-1"> <div className="container-xl p-responsive py-9 width-full flex-1">
<article className="col-md-10 col-lg-7 mx-auto"> <article className="col-md-10 col-lg-7 mx-auto">
<h1 className="mb-3 pb-3 border-bottom">Ooops!</h1> <h1>Ooops!</h1>
<Lead>It looks like something went wrong.</Lead> <Lead>It looks like something went wrong.</Lead>
<p className="f3"> <p className="f3">
We track these errors automatically, but if the problem persists please feel free to We track these errors automatically, but if the problem persists please feel free to

View File

@@ -123,9 +123,9 @@ export const ArticlePage = () => {
<ActionList <ActionList
key={title} key={title}
items={miniTocItems.map((items) => { items={miniTocItems.map((items, i) => {
return { return {
key: title, key: title + i,
text: title, text: title,
renderItem: () => <ul>{renderTocItem(items)}</ul>, renderItem: () => <ul>{renderTocItem(items)}</ul>,
} }

View File

@@ -22,8 +22,8 @@ export const LandingHero = () => {
return ( return (
<header className="d-lg-flex gutter-lg mb-6"> <header className="d-lg-flex gutter-lg mb-6">
<div className={cx(product_video && 'col-12 col-lg-6 mb-3 mb-lg-0')}> <div className={cx('col-12 mb-3 mb-lg-0', product_video && 'col-lg-6')}>
<h1 className="mb-3"> <h1>
{shortTitle}{' '} {shortTitle}{' '}
{beta_product && <span className="Label Label--success v-align-middle">Beta</span>} {beta_product && <span className="Label Label--success v-align-middle">Beta</span>}
</h1> </h1>

View File

@@ -43,9 +43,9 @@ export const SubLandingHero = () => {
return ( return (
<div> <div>
<header className="d-flex gutter mb-6"> <header className="d-flex gutter mb-6 my-4">
<div className="col-12"> <div className="col-12">
<h1 className="my-3">{title} guides</h1> <h1>{title} guides</h1>
{intro && <Lead data-search="lead">{intro}</Lead>} {intro && <Lead data-search="lead">{intro}</Lead>}
</div> </div>
</header> </header>

View File

@@ -4,23 +4,11 @@
h3, h3,
h4, h4,
h5 { h5 {
padding-top: 16px; padding-top: 1rem;
}
h2 {
font-size: 1.25em;
} }
// all h2 headers that are links should be blue-500 // all h2 headers that are links should be blue-500
h2 a { h2 a {
color: var(--color-accent-fg); color: var(--color-accent-fg);
} }
h3 {
font-size: 1em;
}
h4 {
font-size: 0.875em;
}
h5 {
font-size: 0.85em;
}
} }

View File

@@ -13,19 +13,19 @@
margin-bottom: 5px; margin-bottom: 5px;
&:before { &:before {
top: 2px; width: 22px;
font-size: 16px; height: 22px;
width: 24px; font-size: 14px;
margin: 1px 0 0 8px;
content: counter(li); content: counter(li);
counter-increment: li; counter-increment: li;
position: absolute; position: absolute;
left: 0; left: 0;
height: 100%; color: var(--color-canvas-default);
padding: 0 10px 0 0; font-weight: 500;
color: var(--color-fg-subtle); text-align: center;
font-weight: bold; border-radius: 50%;
line-height: 35px; background-color: var(--color-fg-default);
text-align: right;
} }
&:after { &:after {

View File

@@ -187,7 +187,7 @@ For more information, see "[About comparing branches in pull requests](/pull-req
{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %} {% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %}
## `on.workflow_call.inputs` ## `on.workflow_call.inputs`
When using the `workflow_call` keyword, you can optionally specify inputs that are passed to the called workflow from the caller workflow. Inputs for reusable workflows are specified with the same format as action inputs. For more information about inputs, see "[Metadata syntax for GitHub Actions](/actions/creating-actions/metadata-syntax-for-github-actions#inputs)." For more information about the `workflow_call` keyword, see "[Events that trigger workflows](/actions/learn-github-actions/events-that-trigger-workflows#workflow-reuse-events)." When using the `workflow_call` keyword, you can optionally specify inputs that are passed to the called workflow from the caller workflow. For more information about the `workflow_call` keyword, see "[Events that trigger workflows](/actions/learn-github-actions/events-that-trigger-workflows#workflow-reuse-events)."
In addition to the standard input parameters that are available, `on.workflow_call.inputs` requires a `type` parameter. For more information, see [`on.workflow_call.inputs.<input_id>.type`](#onworkflow_callinputsinput_idtype). In addition to the standard input parameters that are available, `on.workflow_call.inputs` requires a `type` parameter. For more information, see [`on.workflow_call.inputs.<input_id>.type`](#onworkflow_callinputsinput_idtype).
@@ -268,7 +268,7 @@ A boolean specifying whether the secret must be supplied.
## `on.workflow_dispatch.inputs` ## `on.workflow_dispatch.inputs`
When using the `workflow_dispatch` event, you can optionally specify inputs that are passed to the workflow. Workflow dispatch inputs are specified with the same format as action inputs. For more information about the format see "[Metadata syntax for GitHub Actions](/actions/creating-actions/metadata-syntax-for-github-actions#inputs)." When using the `workflow_dispatch` event, you can optionally specify inputs that are passed to the workflow.
```yaml ```yaml
on: on:
@@ -277,10 +277,20 @@ on:
logLevel: logLevel:
description: 'Log level' description: 'Log level'
required: true required: true
default: 'warning' default: 'warning' {% ifversion ghec or ghes > 3.3 or ghae-issue-5511 %}
type: choice
options:
- info
- warning
- debug {% endif %}
tags: tags:
description: 'Test scenario tags' description: 'Test scenario tags'
required: false required: false {% ifversion ghec or ghes > 3.3 or ghae-issue-5511 %}
type: boolean
environment:
description: 'Environment to run tests against'
type: environment
required: true {% endif %}
``` ```
The triggered workflow receives the inputs in the `github.event.inputs` context. For more information, see "[Contexts](/actions/learn-github-actions/contexts#github-context)." The triggered workflow receives the inputs in the `github.event.inputs` context. For more information, see "[Contexts](/actions/learn-github-actions/contexts#github-context)."

View File

@@ -57,6 +57,7 @@ The complete list of available query parameters, permissions, and events is list
`setup_url` | `string` | The full URL to redirect to after someone installs the {% data variables.product.prodname_github_app %} if the app requires additional setup after installation. `setup_url` | `string` | The full URL to redirect to after someone installs the {% data variables.product.prodname_github_app %} if the app requires additional setup after installation.
`setup_on_update` | `boolean` | Set to `true` to redirect people to the setup URL when installations have been updated, for example, after repositories are added or removed. `setup_on_update` | `boolean` | Set to `true` to redirect people to the setup URL when installations have been updated, for example, after repositories are added or removed.
`public` | `boolean` | Set to `true` when your {% data variables.product.prodname_github_app %} is available to the public or `false` when it is only accessible to the owner of the app. `public` | `boolean` | Set to `true` when your {% data variables.product.prodname_github_app %} is available to the public or `false` when it is only accessible to the owner of the app.
`webhook_active` | `boolean` | Set to `false` to disable webhook. Webhook is enabled by default.
`webhook_url` | `string` | The full URL that you would like to send webhook event payloads to. `webhook_url` | `string` | The full URL that you would like to send webhook event payloads to.
{% ifversion ghes < 3.2 or ghae %}`webhook_secret` | `string` | You can specify a secret to secure your webhooks. See "[Securing your webhooks](/webhooks/securing/)" for more details. {% ifversion ghes < 3.2 or ghae %}`webhook_secret` | `string` | You can specify a secret to secure your webhooks. See "[Securing your webhooks](/webhooks/securing/)" for more details.
{% endif %}`events` | `array of strings` | Webhook events. Some webhook events require `read` or `write` permissions for a resource before you can select the event when registering a new {% data variables.product.prodname_github_app %}. See the "[{% data variables.product.prodname_github_app %} webhook events](#github-app-webhook-events)" section for available events and their required permissions. You can select multiple events in a query string. For example, `events[]=public&events[]=label`. {% endif %}`events` | `array of strings` | Webhook events. Some webhook events require `read` or `write` permissions for a resource before you can select the event when registering a new {% data variables.product.prodname_github_app %}. See the "[{% data variables.product.prodname_github_app %} webhook events](#github-app-webhook-events)" section for available events and their required permissions. You can select multiple events in a query string. For example, `events[]=public&events[]=label`.

View File

@@ -134,6 +134,18 @@ Here are some examples for using relative links to display an image.
For more information, see "[Relative Links](#relative-links)." For more information, see "[Relative Links](#relative-links)."
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5559 %}
### Specifying the theme an image is shown to
You can specify the theme an image is displayed to by appending `#gh-dark-mode-only` or `#gh-light-mode-only` to the end of an image URL, in Markdown.
We distinguish between light and dark color modes, so there are two options available. You can use these options to display images optimized for dark or light backgrounds. This is particularly helpful for transparent PNG images.
| Context | URL |
|--------|--------|
| Dark Theme | `![GitHub Light](https://github.com/github-light.png#gh-dark-mode-only)` |
| Light Theme | `![GitHub Dark](https://github.com/github-dark.png#gh-light-mode-only)` |
{% endif %}
## Lists ## Lists

View File

@@ -1627,6 +1627,11 @@ type BranchProtectionRule implements Node {
""" """
requiredStatusCheckContexts: [String] requiredStatusCheckContexts: [String]
"""
List of required status checks that must pass for commits to be accepted to matching branches.
"""
requiredStatusChecks: [RequiredStatusCheckDescription!]
""" """
Are approving reviews required to update matching branches. Are approving reviews required to update matching branches.
""" """
@@ -5167,6 +5172,11 @@ input CreateBranchProtectionRuleInput {
""" """
requiredStatusCheckContexts: [String!] requiredStatusCheckContexts: [String!]
"""
The list of required status checks
"""
requiredStatusChecks: [RequiredStatusCheckInput!]
""" """
Are approving reviews required to update matching branches. Are approving reviews required to update matching branches.
""" """
@@ -33376,6 +33386,36 @@ interface RequirableByPullRequest {
): Boolean! ): Boolean!
} }
"""
Represents a required status check for a protected branch, but not any specific run of that check.
"""
type RequiredStatusCheckDescription {
"""
The App that must provide this status in order for it to be accepted.
"""
app: App
"""
The name of this status.
"""
context: String!
}
"""
Specifies the attributes for a new or updated required status check.
"""
input RequiredStatusCheckInput {
"""
The ID of the App that must set the status in order for it to be accepted.
"""
appId: ID
"""
Status check context that must pass for commits to be accepted to the matching branch.
"""
context: String!
}
""" """
Autogenerated input type of RerequestCheckSuite Autogenerated input type of RerequestCheckSuite
""" """
@@ -37979,6 +38019,11 @@ input UpdateBranchProtectionRuleInput {
""" """
requiredStatusCheckContexts: [String!] requiredStatusCheckContexts: [String!]
"""
The list of required status checks
"""
requiredStatusChecks: [RequiredStatusCheckInput!]
""" """
Are approving reviews required to update matching branches. Are approving reviews required to update matching branches.
""" """

View File

@@ -1782,6 +1782,11 @@ type BranchProtectionRule implements Node {
""" """
requiredStatusCheckContexts: [String] requiredStatusCheckContexts: [String]
"""
List of required status checks that must pass for commits to be accepted to matching branches.
"""
requiredStatusChecks: [RequiredStatusCheckDescription!]
""" """
Are approving reviews required to update matching branches. Are approving reviews required to update matching branches.
""" """
@@ -5404,6 +5409,11 @@ input CreateBranchProtectionRuleInput {
""" """
requiredStatusCheckContexts: [String!] requiredStatusCheckContexts: [String!]
"""
The list of required status checks
"""
requiredStatusChecks: [RequiredStatusCheckInput!]
""" """
Are approving reviews required to update matching branches. Are approving reviews required to update matching branches.
""" """
@@ -36962,6 +36972,36 @@ interface RequirableByPullRequest {
): Boolean! ): Boolean!
} }
"""
Represents a required status check for a protected branch, but not any specific run of that check.
"""
type RequiredStatusCheckDescription {
"""
The App that must provide this status in order for it to be accepted.
"""
app: App
"""
The name of this status.
"""
context: String!
}
"""
Specifies the attributes for a new or updated required status check.
"""
input RequiredStatusCheckInput {
"""
The ID of the App that must set the status in order for it to be accepted.
"""
appId: ID
"""
Status check context that must pass for commits to be accepted to the matching branch.
"""
context: String!
}
""" """
Autogenerated input type of RerequestCheckSuite Autogenerated input type of RerequestCheckSuite
""" """
@@ -42994,6 +43034,11 @@ input UpdateBranchProtectionRuleInput {
""" """
requiredStatusCheckContexts: [String!] requiredStatusCheckContexts: [String!]
"""
The list of required status checks
"""
requiredStatusChecks: [RequiredStatusCheckInput!]
""" """
Are approving reviews required to update matching branches. Are approving reviews required to update matching branches.
""" """

View File

@@ -1782,6 +1782,11 @@ type BranchProtectionRule implements Node {
""" """
requiredStatusCheckContexts: [String] requiredStatusCheckContexts: [String]
"""
List of required status checks that must pass for commits to be accepted to matching branches.
"""
requiredStatusChecks: [RequiredStatusCheckDescription!]
""" """
Are approving reviews required to update matching branches. Are approving reviews required to update matching branches.
""" """
@@ -5404,6 +5409,11 @@ input CreateBranchProtectionRuleInput {
""" """
requiredStatusCheckContexts: [String!] requiredStatusCheckContexts: [String!]
"""
The list of required status checks
"""
requiredStatusChecks: [RequiredStatusCheckInput!]
""" """
Are approving reviews required to update matching branches. Are approving reviews required to update matching branches.
""" """
@@ -36962,6 +36972,36 @@ interface RequirableByPullRequest {
): Boolean! ): Boolean!
} }
"""
Represents a required status check for a protected branch, but not any specific run of that check.
"""
type RequiredStatusCheckDescription {
"""
The App that must provide this status in order for it to be accepted.
"""
app: App
"""
The name of this status.
"""
context: String!
}
"""
Specifies the attributes for a new or updated required status check.
"""
input RequiredStatusCheckInput {
"""
The ID of the App that must set the status in order for it to be accepted.
"""
appId: ID
"""
Status check context that must pass for commits to be accepted to the matching branch.
"""
context: String!
}
""" """
Autogenerated input type of RerequestCheckSuite Autogenerated input type of RerequestCheckSuite
""" """
@@ -42994,6 +43034,11 @@ input UpdateBranchProtectionRuleInput {
""" """
requiredStatusCheckContexts: [String!] requiredStatusCheckContexts: [String!]
"""
The list of required status checks
"""
requiredStatusChecks: [RequiredStatusCheckInput!]
""" """
Are approving reviews required to update matching branches. Are approving reviews required to update matching branches.
""" """

View File

@@ -13,20 +13,12 @@ export default function getDocumentType(relativePath) {
// Early Access has an extra tree segment, so it has a different number of segments. // Early Access has an extra tree segment, so it has a different number of segments.
const isEarlyAccess = relativePath.startsWith('early-access') const isEarlyAccess = relativePath.startsWith('early-access')
const publicDocs = { const publicDocs = ['homepage', 'product', 'category', 'mapTopic']
1: 'homepage',
2: 'product',
3: 'category',
4: 'mapTopic',
}
const earlyAccessDocs = { const earlyAccessDocs = ['homepage', 'early-access', 'product', 'category', 'mapTopic']
1: 'homepage',
2: 'early-access',
3: 'product',
4: 'category',
5: 'mapTopic',
}
return isEarlyAccess ? earlyAccessDocs[segmentLength] : publicDocs[segmentLength] // Anything beyond the largest depth is assumed to be a mapTopic
return isEarlyAccess
? earlyAccessDocs[Math.min(segmentLength, earlyAccessDocs.length) - 1]
: publicDocs[Math.min(segmentLength, publicDocs.length) - 1]
} }

View File

@@ -1,4 +1,21 @@
[ [
{
"schemaChanges": [
{
"title": "The GraphQL schema includes these changes:",
"changes": [
"Type `RequiredStatusCheckDescription` was added",
"Type `RequiredStatusCheckInput` was added",
"Field `requiredStatusChecks` was added to object type `BranchProtectionRule`",
"Input field `requiredStatusChecks` was added to input object type `CreateBranchProtectionRuleInput`",
"Input field `requiredStatusChecks` was added to input object type `UpdateBranchProtectionRuleInput`"
]
}
],
"previewChanges": [],
"upcomingChanges": [],
"date": "2021-11-18"
},
{ {
"schemaChanges": [ "schemaChanges": [
{ {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -8547,6 +8547,14 @@
"kind": "scalars", "kind": "scalars",
"href": "/graphql/reference/scalars#string" "href": "/graphql/reference/scalars#string"
}, },
{
"name": "requiredStatusChecks",
"description": "<p>List of required status checks that must pass for commits to be accepted to matching branches.</p>",
"type": "[RequiredStatusCheckDescription!]",
"id": "requiredstatuscheckdescription",
"kind": "objects",
"href": "/graphql/reference/objects#requiredstatuscheckdescription"
},
{ {
"name": "requiresApprovingReviews", "name": "requiresApprovingReviews",
"description": "<p>Are approving reviews required to update matching branches.</p>", "description": "<p>Are approving reviews required to update matching branches.</p>",
@@ -52093,6 +52101,31 @@
} }
] ]
}, },
{
"name": "RequiredStatusCheckDescription",
"kind": "objects",
"id": "requiredstatuscheckdescription",
"href": "/graphql/reference/objects#requiredstatuscheckdescription",
"description": "<p>Represents a required status check for a protected branch, but not any specific run of that check.</p>",
"fields": [
{
"name": "app",
"description": "<p>The App that must provide this status in order for it to be accepted.</p>",
"type": "App",
"id": "app",
"kind": "objects",
"href": "/graphql/reference/objects#app"
},
{
"name": "context",
"description": "<p>The name of this status.</p>",
"type": "String!",
"id": "string",
"kind": "scalars",
"href": "/graphql/reference/scalars#string"
}
]
},
{ {
"name": "RestrictedContribution", "name": "RestrictedContribution",
"kind": "objects", "kind": "objects",
@@ -73224,6 +73257,14 @@
"kind": "scalars", "kind": "scalars",
"href": "/graphql/reference/scalars#string" "href": "/graphql/reference/scalars#string"
}, },
{
"name": "requiredStatusChecks",
"description": "<p>The list of required status checks.</p>",
"type": "[RequiredStatusCheckInput!]",
"id": "requiredstatuscheckinput",
"kind": "input-objects",
"href": "/graphql/reference/input-objects#requiredstatuscheckinput"
},
{ {
"name": "requiresApprovingReviews", "name": "requiresApprovingReviews",
"description": "<p>Are approving reviews required to update matching branches.</p>", "description": "<p>Are approving reviews required to update matching branches.</p>",
@@ -77316,6 +77357,31 @@
} }
] ]
}, },
{
"name": "RequiredStatusCheckInput",
"kind": "inputObjects",
"id": "requiredstatuscheckinput",
"href": "/graphql/reference/input-objects#requiredstatuscheckinput",
"description": "<p>Specifies the attributes for a new or updated required status check.</p>",
"inputFields": [
{
"name": "appId",
"description": "<p>The ID of the App that must set the status in order for it to be accepted.</p>",
"type": "ID",
"id": "id",
"kind": "scalars",
"href": "/graphql/reference/scalars#id"
},
{
"name": "context",
"description": "<p>Status check context that must pass for commits to be accepted to the matching branch.</p>",
"type": "String!",
"id": "string",
"kind": "scalars",
"href": "/graphql/reference/scalars#string"
}
]
},
{ {
"name": "RerequestCheckSuiteInput", "name": "RerequestCheckSuiteInput",
"kind": "inputObjects", "kind": "inputObjects",
@@ -78429,6 +78495,14 @@
"kind": "scalars", "kind": "scalars",
"href": "/graphql/reference/scalars#string" "href": "/graphql/reference/scalars#string"
}, },
{
"name": "requiredStatusChecks",
"description": "<p>The list of required status checks.</p>",
"type": "[RequiredStatusCheckInput!]",
"id": "requiredstatuscheckinput",
"kind": "input-objects",
"href": "/graphql/reference/input-objects#requiredstatuscheckinput"
},
{ {
"name": "requiresApprovingReviews", "name": "requiresApprovingReviews",
"description": "<p>Are approving reviews required to update matching branches.</p>", "description": "<p>Are approving reviews required to update matching branches.</p>",

View File

@@ -7346,6 +7346,14 @@
"kind": "scalars", "kind": "scalars",
"href": "/graphql/reference/scalars#string" "href": "/graphql/reference/scalars#string"
}, },
{
"name": "requiredStatusChecks",
"description": "<p>List of required status checks that must pass for commits to be accepted to matching branches.</p>",
"type": "[RequiredStatusCheckDescription!]",
"id": "requiredstatuscheckdescription",
"kind": "objects",
"href": "/graphql/reference/objects#requiredstatuscheckdescription"
},
{ {
"name": "requiresApprovingReviews", "name": "requiresApprovingReviews",
"description": "<p>Are approving reviews required to update matching branches.</p>", "description": "<p>Are approving reviews required to update matching branches.</p>",
@@ -47033,6 +47041,31 @@
} }
] ]
}, },
{
"name": "RequiredStatusCheckDescription",
"kind": "objects",
"id": "requiredstatuscheckdescription",
"href": "/graphql/reference/objects#requiredstatuscheckdescription",
"description": "<p>Represents a required status check for a protected branch, but not any specific run of that check.</p>",
"fields": [
{
"name": "app",
"description": "<p>The App that must provide this status in order for it to be accepted.</p>",
"type": "App",
"id": "app",
"kind": "objects",
"href": "/graphql/reference/objects#app"
},
{
"name": "context",
"description": "<p>The name of this status.</p>",
"type": "String!",
"id": "string",
"kind": "scalars",
"href": "/graphql/reference/scalars#string"
}
]
},
{ {
"name": "RestrictedContribution", "name": "RestrictedContribution",
"kind": "objects", "kind": "objects",
@@ -64751,6 +64784,14 @@
"kind": "scalars", "kind": "scalars",
"href": "/graphql/reference/scalars#string" "href": "/graphql/reference/scalars#string"
}, },
{
"name": "requiredStatusChecks",
"description": "<p>The list of required status checks.</p>",
"type": "[RequiredStatusCheckInput!]",
"id": "requiredstatuscheckinput",
"kind": "input-objects",
"href": "/graphql/reference/input-objects#requiredstatuscheckinput"
},
{ {
"name": "requiresApprovingReviews", "name": "requiresApprovingReviews",
"description": "<p>Are approving reviews required to update matching branches.</p>", "description": "<p>Are approving reviews required to update matching branches.</p>",
@@ -68317,6 +68358,31 @@
} }
] ]
}, },
{
"name": "RequiredStatusCheckInput",
"kind": "inputObjects",
"id": "requiredstatuscheckinput",
"href": "/graphql/reference/input-objects#requiredstatuscheckinput",
"description": "<p>Specifies the attributes for a new or updated required status check.</p>",
"inputFields": [
{
"name": "appId",
"description": "<p>The ID of the App that must set the status in order for it to be accepted.</p>",
"type": "ID",
"id": "id",
"kind": "scalars",
"href": "/graphql/reference/scalars#id"
},
{
"name": "context",
"description": "<p>Status check context that must pass for commits to be accepted to the matching branch.</p>",
"type": "String!",
"id": "string",
"kind": "scalars",
"href": "/graphql/reference/scalars#string"
}
]
},
{ {
"name": "RerequestCheckSuiteInput", "name": "RerequestCheckSuiteInput",
"kind": "inputObjects", "kind": "inputObjects",
@@ -69013,6 +69079,14 @@
"kind": "scalars", "kind": "scalars",
"href": "/graphql/reference/scalars#string" "href": "/graphql/reference/scalars#string"
}, },
{
"name": "requiredStatusChecks",
"description": "<p>The list of required status checks.</p>",
"type": "[RequiredStatusCheckInput!]",
"id": "requiredstatuscheckinput",
"kind": "input-objects",
"href": "/graphql/reference/input-objects#requiredstatuscheckinput"
},
{ {
"name": "requiresApprovingReviews", "name": "requiresApprovingReviews",
"description": "<p>Are approving reviews required to update matching branches.</p>", "description": "<p>Are approving reviews required to update matching branches.</p>",

View File

@@ -8547,6 +8547,14 @@
"kind": "scalars", "kind": "scalars",
"href": "/graphql/reference/scalars#string" "href": "/graphql/reference/scalars#string"
}, },
{
"name": "requiredStatusChecks",
"description": "<p>List of required status checks that must pass for commits to be accepted to matching branches.</p>",
"type": "[RequiredStatusCheckDescription!]",
"id": "requiredstatuscheckdescription",
"kind": "objects",
"href": "/graphql/reference/objects#requiredstatuscheckdescription"
},
{ {
"name": "requiresApprovingReviews", "name": "requiresApprovingReviews",
"description": "<p>Are approving reviews required to update matching branches.</p>", "description": "<p>Are approving reviews required to update matching branches.</p>",
@@ -52093,6 +52101,31 @@
} }
] ]
}, },
{
"name": "RequiredStatusCheckDescription",
"kind": "objects",
"id": "requiredstatuscheckdescription",
"href": "/graphql/reference/objects#requiredstatuscheckdescription",
"description": "<p>Represents a required status check for a protected branch, but not any specific run of that check.</p>",
"fields": [
{
"name": "app",
"description": "<p>The App that must provide this status in order for it to be accepted.</p>",
"type": "App",
"id": "app",
"kind": "objects",
"href": "/graphql/reference/objects#app"
},
{
"name": "context",
"description": "<p>The name of this status.</p>",
"type": "String!",
"id": "string",
"kind": "scalars",
"href": "/graphql/reference/scalars#string"
}
]
},
{ {
"name": "RestrictedContribution", "name": "RestrictedContribution",
"kind": "objects", "kind": "objects",
@@ -73224,6 +73257,14 @@
"kind": "scalars", "kind": "scalars",
"href": "/graphql/reference/scalars#string" "href": "/graphql/reference/scalars#string"
}, },
{
"name": "requiredStatusChecks",
"description": "<p>The list of required status checks.</p>",
"type": "[RequiredStatusCheckInput!]",
"id": "requiredstatuscheckinput",
"kind": "input-objects",
"href": "/graphql/reference/input-objects#requiredstatuscheckinput"
},
{ {
"name": "requiresApprovingReviews", "name": "requiresApprovingReviews",
"description": "<p>Are approving reviews required to update matching branches.</p>", "description": "<p>Are approving reviews required to update matching branches.</p>",
@@ -77316,6 +77357,31 @@
} }
] ]
}, },
{
"name": "RequiredStatusCheckInput",
"kind": "inputObjects",
"id": "requiredstatuscheckinput",
"href": "/graphql/reference/input-objects#requiredstatuscheckinput",
"description": "<p>Specifies the attributes for a new or updated required status check.</p>",
"inputFields": [
{
"name": "appId",
"description": "<p>The ID of the App that must set the status in order for it to be accepted.</p>",
"type": "ID",
"id": "id",
"kind": "scalars",
"href": "/graphql/reference/scalars#id"
},
{
"name": "context",
"description": "<p>Status check context that must pass for commits to be accepted to the matching branch.</p>",
"type": "String!",
"id": "string",
"kind": "scalars",
"href": "/graphql/reference/scalars#string"
}
]
},
{ {
"name": "RerequestCheckSuiteInput", "name": "RerequestCheckSuiteInput",
"kind": "inputObjects", "kind": "inputObjects",
@@ -78429,6 +78495,14 @@
"kind": "scalars", "kind": "scalars",
"href": "/graphql/reference/scalars#string" "href": "/graphql/reference/scalars#string"
}, },
{
"name": "requiredStatusChecks",
"description": "<p>The list of required status checks.</p>",
"type": "[RequiredStatusCheckInput!]",
"id": "requiredstatuscheckinput",
"kind": "input-objects",
"href": "/graphql/reference/input-objects#requiredstatuscheckinput"
},
{ {
"name": "requiresApprovingReviews", "name": "requiresApprovingReviews",
"description": "<p>Are approving reviews required to update matching branches.</p>", "description": "<p>Are approving reviews required to update matching branches.</p>",

View File

@@ -17,7 +17,7 @@ const Custom404 = () => {
<div className="container-xl p-responsive py-6 width-full flex-1"> <div className="container-xl p-responsive py-6 width-full flex-1">
<article className="col-md-10 col-lg-7 mx-auto"> <article className="col-md-10 col-lg-7 mx-auto">
<h1 className="mb-3 pb-3 border-bottom">Ooops!</h1> <h1>Ooops!</h1>
<Lead>It looks like this page doesn't exist.</Lead> <Lead>It looks like this page doesn't exist.</Lead>
<p className="f3"> <p className="f3">
We track these errors automatically, but if the problem persists please feel free to We track these errors automatically, but if the problem persists please feel free to

View File

@@ -157,7 +157,7 @@ export async function getPathsWithMatchingStrings(strArr, org, repo) {
async function searchCode(q, perPage, currentPage) { async function searchCode(q, perPage, currentPage) {
try { try {
const { data } = await github.rest.search.code({ const { data } = await secondaryRateLimitRetry(github.rest.search.code, {
q, q,
per_page: perPage, per_page: perPage,
page: currentPage, page: currentPage,
@@ -169,3 +169,41 @@ async function searchCode(q, perPage, currentPage) {
throw err throw err
} }
} }
async function secondaryRateLimitRetry(callable, args, maxAttempts = 5) {
try {
const response = await callable(args)
return response
} catch (err) {
// If you get a secondary rate limit error (403) you'll get a data
// response that includes:
//
// {
// documentation_url: 'https://docs.github.com/en/free-pro-team@latest/rest/overview/resources-in-the-rest-api#secondary-rate-limits',
// message: 'You have exceeded a secondary rate limit. Please wait a few minutes before you try again.'
// }
//
// Let's look for that an manually self-recurse, under certain conditions
const lookFor = 'You have exceeded a secondary rate limit.'
const sleepTime = 5000 // ms
if (
err.status &&
err.status === 403 &&
err.response?.data?.message.includes(lookFor) &&
maxAttempts > 0
) {
console.warn(
`Got secondary rate limit blocked. Sleeping for ${
sleepTime / 1000
} seconds. (attempts left: ${maxAttempts})`
)
return new Promise((resolve) => {
setTimeout(() => {
resolve(secondaryRateLimitRetry(callable, args, maxAttempts - 1))
}, sleepTime)
})
}
throw err
}
}

View File

@@ -0,0 +1,22 @@
---
title: Managing accessibility settings
intro: 'You can disable character key shortcuts on {% data variables.product.prodname_dotcom %} in your accessibility settings.'
versions:
fpt: '*'
ghes: '>=3.4'
feature: keyboard-shortcut-accessibility-setting
---
## About accessibility settings
{% data variables.product.product_name %} includes a variety of keyboard shortcuts so that you can perform actions across the site without using your mouse to navigate. While shortcuts are useful to save time, they can sometimes make {% data variables.product.prodname_dotcom %} harder to use and less accessible.
All keyboard shortcuts are enabled by default on {% data variables.product.product_name %}, but you can choose to disable character key shortcuts in your accessibility settings. This setting does not affect keyboard shortcuts provided by your web browser or {% data variables.product.prodname_dotcom %} shortcuts that use a modifier key such as `control` or `command`.
## Managing character key shortcuts
{% data reusables.user_settings.access_settings %}
{% data reusables.user_settings.accessibility_settings %}
1. Select or deselect the **Enable character key shortcuts** checkbox.
![Screenshot of the 'Enable character key shortcuts' checkbox](/assets/images/help/settings/disable-character-key-shortcuts.png)
2. Click **Save**.

View File

@@ -0,0 +1,42 @@
---
title: Organizing information with collapsed sections
intro: 'You can streamline your Markdown by creating a collapsed section with the `<details>` tag.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
shortTitle: Collapsed sections
---
## Creating a collapsed section
You can temporarily obscure sections of your Markdown by creating a collapsed section that the reader can choose to expand. For example, when you want to include technical details in an issue comment that may not be relevant or interesting to every reader, you can put those details in a collapsed section.
Any Markdown within the `<details>` block will be collapsed until the reader clicks {% octicon "triangle-right" aria-label="The right triange icon" %} to expand the details. Within the `<details>` block, use the `<summary>` tag to create a label to the right of {% octicon "triangle-right" aria-label="The right triange icon" %}.
```markdown
<details><summary>CLICK ME</summary>
<p>
#### We can hide anything, even code!
```ruby
puts "Hello World"
```
</p>
</details>
```
The Markdown will be collapsed by default.
![Rendered collapsed](/assets/images/help/writing/collapsed-section-view.png)
After a reader clicks {% octicon "triangle-right" aria-label="The right triange icon" %}, the details are expanded.
![Rendered open](/assets/images/help/writing/open-collapsed-section.png)
## Further reading
- [{% data variables.product.prodname_dotcom %} Flavored Markdown Spec](https://github.github.com/gfm/)
- "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax)"

View File

@@ -0,0 +1,69 @@
---
title: Migrating GraphQL global node IDs
intro: 'Learn about the two global node ID formats and how to migrate from the legacy format to the new format.'
versions:
fpt: '*'
ghec: '*'
topics:
- API
shortTitle: Migrating global node IDs
---
## Background
The {% data variables.product.product_name %} GraphQL API currently supports two types of global node ID formats. The legacy format will be deprecated and replaced with a new format. This guide shows you how to migrate to the new format, if necessary.
By migrating to the new format, you ensure that the response times of your requests remain consistent and small. You also ensure that your application continues to work once the legacy IDs are fully deprecated.
To learn more about why the legacy global node ID format will be deprecated, see "[New global ID format coming to GraphQL](https://github.blog/2021-02-10-new-global-id-format-coming-to-graphql)."
## Determining if you need to take action
You only need to follow the migration steps if you store references to GraphQL global node IDs. These IDs correspond to the `id` field for any object in the schema. If you don't store any global node IDs, then you can continue to interact with the API with no change.
Additionally, if you currently decode the legacy IDs to extract type information (for example, if you use the first two characters of `PR_kwDOAHz1OX4uYAah` to determine if the object is a pull request), your service will break since the format of the IDs has changed. You should migrate your service to treat these IDs as opaque strings. These IDs will be unique, therefore you can rely on them directly as references.
## Migrating to the new global IDs
To facilitate migration to the new ID format, you can use the `X-Github-Next-Global-ID` header in your GraphQL API requests. The value of the `X-Github-Next-Global-ID` header can be `1` or `0`. Setting the value to `1` will force the response payload to always use the new ID format for any object that you requested the `id` field for. Setting the value to `0` will revert to default behavior, which is to show the legacy ID or new ID depending on the object creation date.
Here is an example request using cURL:
```
$ curl \
-H "Authorization: token $GITHUB_TOKEN" \
-H "X-Github-Next-Global-ID: 1" \
https://api.github.com/graphql \
-d '{ "query": "{ node(id: \"MDQ6VXNlcjM0MDczMDM=\") { id } }" }'
```
Even though the legacy ID `MDQ6VXNlcjM0MDczMDM=` was used in the query, the response will contain the new ID format:
```
{"data":{"node":{"id":"U_kgDOADP9xw"}}}
```
With the `X-Github-Next-Global-ID` header, you can find the new ID format for legacy IDs that you reference in your application. You can then update those references with the ID received in the response. You should update all references to legacy IDs and use the new ID format for any subsequent requests to the API.
To perform bulk operations, you can use aliases to submit multiple node queries in one API call. For more information, see "[the GraphQL docs](https://graphql.org/learn/queries/#aliases)."
You can also get the new ID for a collection of items. For example, if you wanted to get the new ID for the last 10 repositories in your organization, you could use a query like this:
```
{
organization(login: "github") {
repositories(last: 10) {
edges {
cursor
node {
name
id
}
}
}
}
}
```
Note that setting `X-Github-Next-Global-ID` to `1` will affect the return value of every `id` field in your query. This means that even when you submit a non-`node` query, you will get back the new format ID if you requested the `id` field.
## Sharing feedback
If you have any concerns about the rollout of this change impacting your app, please [contact {% data variables.product.product_name %}](https://support.github.com/contact) and include information such as your app name so that we can better assist you.

View File

@@ -0,0 +1,8 @@
---
#Reference: #4999.
#Documentation for the security manager org-level role
versions:
fpt: '*'
ghes: '>=3.4'
ghae: 'ghae-issue-5430'
ghec: '*'

View File

@@ -17,7 +17,7 @@ sections:
- heading: 'Cambios en la administración' - heading: 'Cambios en la administración'
notes: notes:
- '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the maintenance of repositories, especially for repositories that contain many unreachable objects. Note that the first maintenance cycle after upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may take longer than usual to complete.' - '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the maintenance of repositories, especially for repositories that contain many unreachable objects. Note that the first maintenance cycle after upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may take longer than usual to complete.'
- '{% data variables.product.prodname_ghe_server %} 3.3 includes a repository cache for geographically-distributed teams and CI infrastructure. The repository cache keeps a read-only copy of your repositories available in additional geographies, which prevents clients from downloading duplicate Git content from your primary instance. For more information, see "[About repository caching](/admin/enterprise-management/caching-repositories/about-repository-caching)."' - '{% data variables.product.prodname_ghe_server %} 3.3 includes the public beta of a repository cache for geographically-distributed teams and CI infrastructure. The repository cache keeps a read-only copy of your repositories available in additional geographies, which prevents clients from downloading duplicate Git content from your primary instance. For more information, see "[About repository caching](/admin/enterprise-management/caching-repositories/about-repository-caching)."'
- '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the user impersonation process. An impersonation session now requires a justification for the impersonation, actions are recorded in the audit log as being performed as an impersonated user, and the user who is impersonated will receive an email notification that they have been impersonated by an enterprise administrator. For more information, see "[Impersonating a user](/enterprise-server@3.3/admin/user-management/managing-users-in-your-enterprise/impersonating-a-user)."' - '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the user impersonation process. An impersonation session now requires a justification for the impersonation, actions are recorded in the audit log as being performed as an impersonated user, and the user who is impersonated will receive an email notification that they have been impersonated by an enterprise administrator. For more information, see "[Impersonating a user](/enterprise-server@3.3/admin/user-management/managing-users-in-your-enterprise/impersonating-a-user)."'
- 'A new stream processing service has been added to facilitate the growing set of events that are published to the audit log, including events associated with Git and {% data variables.product.prodname_actions %} activity.' - 'A new stream processing service has been added to facilitate the growing set of events that are published to the audit log, including events associated with Git and {% data variables.product.prodname_actions %} activity.'
- heading: 'Cambios de Token' - heading: 'Cambios de Token'
@@ -77,6 +77,9 @@ sections:
- 'When creating or updating a repository, you can now configure whether forking is allowed using the REST and GraphQL APIs. Previously, APIs for creating and updating repositories didn''t include the fields `allow_forking` (REST) or `forkingAllowed` (GraphQL). For more information, see "[Repositories](/rest/reference/repos)" in the REST API documentation and "[Repositories](/graphql/reference/objects#repository)" in the GraphQL API documentation.' - 'When creating or updating a repository, you can now configure whether forking is allowed using the REST and GraphQL APIs. Previously, APIs for creating and updating repositories didn''t include the fields `allow_forking` (REST) or `forkingAllowed` (GraphQL). For more information, see "[Repositories](/rest/reference/repos)" in the REST API documentation and "[Repositories](/graphql/reference/objects#repository)" in the GraphQL API documentation.'
- "A new GraphQL mutation [`createCommitOnBranch`](/graphql/reference/mutations#createcommitonbranch) makes it easier to add, update, and delete files in a branch of a repository. Compared to the REST API, you do not need to manually create blobs and trees before creating the commit. This allows you to add, update, or delete multiple files in a single API call.\n\nCommits authored using the new API are automatically GPG signed and are [marked as verified](/github/authenticating-to-github/managing-commit-signature-verification/about-commit-signature-verification) in the {% data variables.product.prodname_ghe_server %} UI. GitHub Apps can use the mutation to author commits directly or [on behalf of users](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests).\n" - "A new GraphQL mutation [`createCommitOnBranch`](/graphql/reference/mutations#createcommitonbranch) makes it easier to add, update, and delete files in a branch of a repository. Compared to the REST API, you do not need to manually create blobs and trees before creating the commit. This allows you to add, update, or delete multiple files in a single API call.\n\nCommits authored using the new API are automatically GPG signed and are [marked as verified](/github/authenticating-to-github/managing-commit-signature-verification/about-commit-signature-verification) in the {% data variables.product.prodname_ghe_server %} UI. GitHub Apps can use the mutation to author commits directly or [on behalf of users](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests).\n"
- 'When a new tag is created, the [push](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push) webhook payload now always includes a `head_commit` object that contains the data of the commit that the new tag points to. As a result, the `head_commit` object will always contain the commit data of the payload''s `after` commit.' - 'When a new tag is created, the [push](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push) webhook payload now always includes a `head_commit` object that contains the data of the commit that the new tag points to. As a result, the `head_commit` object will always contain the commit data of the payload''s `after` commit.'
- heading: 'Performance Changes'
notes:
- 'Page loads and jobs are now significantly faster for repositories with many Git refs.'
known_issues: known_issues:
- 'On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user.' - 'On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user.'
- 'Las reglas de cortafuegos personalizadas se eliminan durante el proceso de actualización.' - 'Las reglas de cortafuegos personalizadas se eliminan durante el proceso de actualización.'

View File

@@ -2,4 +2,4 @@
- To narrow the scope within a user or organization account, highlight a repository then use <kbd>Tab</kbd> to add it to the scope. - To narrow the scope within a user or organization account, highlight a repository then use <kbd>Tab</kbd> to add it to the scope.
- To expand the scope, highlight and remove an item in the scope using the <kbd>Backspace</kbd> or <kbd>delete</kbd> key. - To expand the scope, highlight and remove an item in the scope using the <kbd>Backspace</kbd> or <kbd>delete</kbd> key.
- To clear the scope and text box, click **Clear**. - To clear the scope and text box, click **Clear** or use <kbd>Ctrl</kbd><kbd>Backspace</kbd> (Windows and Linux) or <kbd>⌘</kbd><kbd>Backspace</kbd> (Mac).

View File

@@ -9,7 +9,7 @@
<tbody> <tbody>
<tr> <tr>
<td> <td>
Windows Server 2022<sup>[beta]</sup> Windows Server 2022
</td> </td>
<td> <td>
<code>windows-2022</code> <code>windows-2022</code>

View File

@@ -0,0 +1 @@
1. En la barra lateral izquierda, da clic en **Configuración de moderación**. ![Moderation settings in organization's settings](/assets/images/help/organizations/org-settings-moderation-settings.png)

View File

@@ -0,0 +1 @@
1. In the navigation on the left hand side, click the **Accessibility** link. ![Screenshot of the user settings navigation. The Accessibility link is highlighted.](/assets/images/help/settings/accessibility-tab.png)

View File

@@ -0,0 +1,22 @@
---
title: Managing accessibility settings
intro: 'You can disable character key shortcuts on {% data variables.product.prodname_dotcom %} in your accessibility settings.'
versions:
fpt: '*'
ghes: '>=3.4'
feature: keyboard-shortcut-accessibility-setting
---
## About accessibility settings
{% data variables.product.product_name %} includes a variety of keyboard shortcuts so that you can perform actions across the site without using your mouse to navigate. While shortcuts are useful to save time, they can sometimes make {% data variables.product.prodname_dotcom %} harder to use and less accessible.
All keyboard shortcuts are enabled by default on {% data variables.product.product_name %}, but you can choose to disable character key shortcuts in your accessibility settings. This setting does not affect keyboard shortcuts provided by your web browser or {% data variables.product.prodname_dotcom %} shortcuts that use a modifier key such as `control` or `command`.
## Managing character key shortcuts
{% data reusables.user_settings.access_settings %}
{% data reusables.user_settings.accessibility_settings %}
1. Select or deselect the **Enable character key shortcuts** checkbox.
![Screenshot of the 'Enable character key shortcuts' checkbox](/assets/images/help/settings/disable-character-key-shortcuts.png)
2. Click **Save**.

View File

@@ -0,0 +1,42 @@
---
title: Organizing information with collapsed sections
intro: 'You can streamline your Markdown by creating a collapsed section with the `<details>` tag.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
shortTitle: Collapsed sections
---
## Creating a collapsed section
You can temporarily obscure sections of your Markdown by creating a collapsed section that the reader can choose to expand. For example, when you want to include technical details in an issue comment that may not be relevant or interesting to every reader, you can put those details in a collapsed section.
Any Markdown within the `<details>` block will be collapsed until the reader clicks {% octicon "triangle-right" aria-label="The right triange icon" %} to expand the details. Within the `<details>` block, use the `<summary>` tag to create a label to the right of {% octicon "triangle-right" aria-label="The right triange icon" %}.
```markdown
<details><summary>CLICK ME</summary>
<p>
#### We can hide anything, even code!
```ruby
puts "Hello World"
```
</p>
</details>
```
The Markdown will be collapsed by default.
![Rendered collapsed](/assets/images/help/writing/collapsed-section-view.png)
After a reader clicks {% octicon "triangle-right" aria-label="The right triange icon" %}, the details are expanded.
![Rendered open](/assets/images/help/writing/open-collapsed-section.png)
## Further reading
- [{% data variables.product.prodname_dotcom %} Flavored Markdown Spec](https://github.github.com/gfm/)
- "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax)"

View File

@@ -0,0 +1,69 @@
---
title: Migrating GraphQL global node IDs
intro: 'Learn about the two global node ID formats and how to migrate from the legacy format to the new format.'
versions:
fpt: '*'
ghec: '*'
topics:
- API
shortTitle: Migrating global node IDs
---
## Background
The {% data variables.product.product_name %} GraphQL API currently supports two types of global node ID formats. The legacy format will be deprecated and replaced with a new format. This guide shows you how to migrate to the new format, if necessary.
By migrating to the new format, you ensure that the response times of your requests remain consistent and small. You also ensure that your application continues to work once the legacy IDs are fully deprecated.
To learn more about why the legacy global node ID format will be deprecated, see "[New global ID format coming to GraphQL](https://github.blog/2021-02-10-new-global-id-format-coming-to-graphql)."
## Determining if you need to take action
You only need to follow the migration steps if you store references to GraphQL global node IDs. These IDs correspond to the `id` field for any object in the schema. If you don't store any global node IDs, then you can continue to interact with the API with no change.
Additionally, if you currently decode the legacy IDs to extract type information (for example, if you use the first two characters of `PR_kwDOAHz1OX4uYAah` to determine if the object is a pull request), your service will break since the format of the IDs has changed. You should migrate your service to treat these IDs as opaque strings. These IDs will be unique, therefore you can rely on them directly as references.
## Migrating to the new global IDs
To facilitate migration to the new ID format, you can use the `X-Github-Next-Global-ID` header in your GraphQL API requests. The value of the `X-Github-Next-Global-ID` header can be `1` or `0`. Setting the value to `1` will force the response payload to always use the new ID format for any object that you requested the `id` field for. Setting the value to `0` will revert to default behavior, which is to show the legacy ID or new ID depending on the object creation date.
Here is an example request using cURL:
```
$ curl \
-H "Authorization: token $GITHUB_TOKEN" \
-H "X-Github-Next-Global-ID: 1" \
https://api.github.com/graphql \
-d '{ "query": "{ node(id: \"MDQ6VXNlcjM0MDczMDM=\") { id } }" }'
```
Even though the legacy ID `MDQ6VXNlcjM0MDczMDM=` was used in the query, the response will contain the new ID format:
```
{"data":{"node":{"id":"U_kgDOADP9xw"}}}
```
With the `X-Github-Next-Global-ID` header, you can find the new ID format for legacy IDs that you reference in your application. You can then update those references with the ID received in the response. You should update all references to legacy IDs and use the new ID format for any subsequent requests to the API.
To perform bulk operations, you can use aliases to submit multiple node queries in one API call. For more information, see "[the GraphQL docs](https://graphql.org/learn/queries/#aliases)."
You can also get the new ID for a collection of items. For example, if you wanted to get the new ID for the last 10 repositories in your organization, you could use a query like this:
```
{
organization(login: "github") {
repositories(last: 10) {
edges {
cursor
node {
name
id
}
}
}
}
}
```
Note that setting `X-Github-Next-Global-ID` to `1` will affect the return value of every `id` field in your query. This means that even when you submit a non-`node` query, you will get back the new format ID if you requested the `id` field.
## Sharing feedback
If you have any concerns about the rollout of this change impacting your app, please [contact {% data variables.product.product_name %}](https://support.github.com/contact) and include information such as your app name so that we can better assist you.

View File

@@ -0,0 +1,8 @@
---
#Reference: #4999.
#Documentation for the security manager org-level role
versions:
fpt: '*'
ghes: '>=3.4'
ghae: 'ghae-issue-5430'
ghec: '*'

View File

@@ -50,7 +50,7 @@ sections:
heading: 管理に関する変更 heading: 管理に関する変更
notes: notes:
- '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the maintenance of repositories, especially for repositories that contain many unreachable objects. Note that the first maintenance cycle after upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may take longer than usual to complete.' - '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the maintenance of repositories, especially for repositories that contain many unreachable objects. Note that the first maintenance cycle after upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may take longer than usual to complete.'
- '{% data variables.product.prodname_ghe_server %} 3.3 includes a repository cache for geographically-distributed teams and CI infrastructure. The repository cache keeps a read-only copy of your repositories available in additional geographies, which prevents clients from downloading duplicate Git content from your primary instance. For more information, see "[About repository caching](/admin/enterprise-management/caching-repositories/about-repository-caching)."' - '{% data variables.product.prodname_ghe_server %} 3.3 includes the public beta of a repository cache for geographically-distributed teams and CI infrastructure. The repository cache keeps a read-only copy of your repositories available in additional geographies, which prevents clients from downloading duplicate Git content from your primary instance. For more information, see "[About repository caching](/admin/enterprise-management/caching-repositories/about-repository-caching)."'
- '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the user impersonation process. An impersonation session now requires a justification for the impersonation, actions are recorded in the audit log as being performed as an impersonated user, and the user who is impersonated will receive an email notification that they have been impersonated by an enterprise administrator. For more information, see "[Impersonating a user](/enterprise-server@3.3/admin/user-management/managing-users-in-your-enterprise/impersonating-a-user)."' - '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the user impersonation process. An impersonation session now requires a justification for the impersonation, actions are recorded in the audit log as being performed as an impersonated user, and the user who is impersonated will receive an email notification that they have been impersonated by an enterprise administrator. For more information, see "[Impersonating a user](/enterprise-server@3.3/admin/user-management/managing-users-in-your-enterprise/impersonating-a-user)."'
- A new stream processing service has been added to facilitate the growing set of events that are published to the audit log, including events associated with Git and {% data variables.product.prodname_actions %} activity. - A new stream processing service has been added to facilitate the growing set of events that are published to the audit log, including events associated with Git and {% data variables.product.prodname_actions %} activity.
- -
@@ -153,6 +153,10 @@ sections:
Commits authored using the new API are automatically GPG signed and are [marked as verified](/github/authenticating-to-github/managing-commit-signature-verification/about-commit-signature-verification) in the {% data variables.product.prodname_ghe_server %} UI. GitHub Apps can use the mutation to author commits directly or [on behalf of users](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests). Commits authored using the new API are automatically GPG signed and are [marked as verified](/github/authenticating-to-github/managing-commit-signature-verification/about-commit-signature-verification) in the {% data variables.product.prodname_ghe_server %} UI. GitHub Apps can use the mutation to author commits directly or [on behalf of users](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests).
- 'When a new tag is created, the [push](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push) webhook payload now always includes a `head_commit` object that contains the data of the commit that the new tag points to. As a result, the `head_commit` object will always contain the commit data of the payload''s `after` commit.' - 'When a new tag is created, the [push](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push) webhook payload now always includes a `head_commit` object that contains the data of the commit that the new tag points to. As a result, the `head_commit` object will always contain the commit data of the payload''s `after` commit.'
-
heading: 'Performance Changes'
notes:
- Page loads and jobs are now significantly faster for repositories with many Git refs.
#No security/bug fixes for the RC release #No security/bug fixes for the RC release
#security_fixes: #security_fixes:
#- PLACEHOLDER #- PLACEHOLDER

View File

@@ -2,4 +2,4 @@
- To narrow the scope within a user or organization account, highlight a repository then use <kbd>Tab</kbd> to add it to the scope. - To narrow the scope within a user or organization account, highlight a repository then use <kbd>Tab</kbd> to add it to the scope.
- To expand the scope, highlight and remove an item in the scope using the <kbd>Backspace</kbd> or <kbd>delete</kbd> key. - To expand the scope, highlight and remove an item in the scope using the <kbd>Backspace</kbd> or <kbd>delete</kbd> key.
- To clear the scope and text box, click **Clear**. - To clear the scope and text box, click **Clear** or use <kbd>Ctrl</kbd><kbd>Backspace</kbd> (Windows and Linux) or <kbd>⌘</kbd><kbd>Backspace</kbd> (Mac).

View File

@@ -9,7 +9,7 @@
<tbody> <tbody>
<tr> <tr>
<td> <td>
Windows Server 2022<sup>[beta]</sup> Windows Server 2022
</td> </td>
<td> <td>
<code>windows-2022</code> <code>windows-2022</code>

View File

@@ -0,0 +1 @@
1. 左サイドバーで [**Moderation settings**] をクリックします。 ![Moderation settings in organization's settings](/assets/images/help/organizations/org-settings-moderation-settings.png)

View File

@@ -0,0 +1 @@
1. In the navigation on the left hand side, click the **Accessibility** link. ![Screenshot of the user settings navigation. The Accessibility link is highlighted.](/assets/images/help/settings/accessibility-tab.png)

View File

@@ -0,0 +1,22 @@
---
title: Managing accessibility settings
intro: 'You can disable character key shortcuts on {% data variables.product.prodname_dotcom %} in your accessibility settings.'
versions:
fpt: '*'
ghes: '>=3.4'
feature: keyboard-shortcut-accessibility-setting
---
## About accessibility settings
{% data variables.product.product_name %} includes a variety of keyboard shortcuts so that you can perform actions across the site without using your mouse to navigate. While shortcuts are useful to save time, they can sometimes make {% data variables.product.prodname_dotcom %} harder to use and less accessible.
All keyboard shortcuts are enabled by default on {% data variables.product.product_name %}, but you can choose to disable character key shortcuts in your accessibility settings. This setting does not affect keyboard shortcuts provided by your web browser or {% data variables.product.prodname_dotcom %} shortcuts that use a modifier key such as `control` or `command`.
## Managing character key shortcuts
{% data reusables.user_settings.access_settings %}
{% data reusables.user_settings.accessibility_settings %}
1. Select or deselect the **Enable character key shortcuts** checkbox.
![Screenshot of the 'Enable character key shortcuts' checkbox](/assets/images/help/settings/disable-character-key-shortcuts.png)
2. Click **Save**.

View File

@@ -0,0 +1,42 @@
---
title: Organizing information with collapsed sections
intro: 'You can streamline your Markdown by creating a collapsed section with the `<details>` tag.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
shortTitle: Collapsed sections
---
## Creating a collapsed section
You can temporarily obscure sections of your Markdown by creating a collapsed section that the reader can choose to expand. For example, when you want to include technical details in an issue comment that may not be relevant or interesting to every reader, you can put those details in a collapsed section.
Any Markdown within the `<details>` block will be collapsed until the reader clicks {% octicon "triangle-right" aria-label="The right triange icon" %} to expand the details. Within the `<details>` block, use the `<summary>` tag to create a label to the right of {% octicon "triangle-right" aria-label="The right triange icon" %}.
```markdown
<details><summary>CLICK ME</summary>
<p>
#### We can hide anything, even code!
```ruby
puts "Hello World"
```
</p>
</details>
```
The Markdown will be collapsed by default.
![Rendered collapsed](/assets/images/help/writing/collapsed-section-view.png)
After a reader clicks {% octicon "triangle-right" aria-label="The right triange icon" %}, the details are expanded.
![Rendered open](/assets/images/help/writing/open-collapsed-section.png)
## Further reading
- [{% data variables.product.prodname_dotcom %} Flavored Markdown Spec](https://github.github.com/gfm/)
- "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax)"

View File

@@ -0,0 +1,69 @@
---
title: Migrating GraphQL global node IDs
intro: 'Learn about the two global node ID formats and how to migrate from the legacy format to the new format.'
versions:
fpt: '*'
ghec: '*'
topics:
- API
shortTitle: Migrating global node IDs
---
## Background
The {% data variables.product.product_name %} GraphQL API currently supports two types of global node ID formats. The legacy format will be deprecated and replaced with a new format. This guide shows you how to migrate to the new format, if necessary.
By migrating to the new format, you ensure that the response times of your requests remain consistent and small. You also ensure that your application continues to work once the legacy IDs are fully deprecated.
To learn more about why the legacy global node ID format will be deprecated, see "[New global ID format coming to GraphQL](https://github.blog/2021-02-10-new-global-id-format-coming-to-graphql)."
## Determining if you need to take action
You only need to follow the migration steps if you store references to GraphQL global node IDs. These IDs correspond to the `id` field for any object in the schema. If you don't store any global node IDs, then you can continue to interact with the API with no change.
Additionally, if you currently decode the legacy IDs to extract type information (for example, if you use the first two characters of `PR_kwDOAHz1OX4uYAah` to determine if the object is a pull request), your service will break since the format of the IDs has changed. You should migrate your service to treat these IDs as opaque strings. These IDs will be unique, therefore you can rely on them directly as references.
## Migrating to the new global IDs
To facilitate migration to the new ID format, you can use the `X-Github-Next-Global-ID` header in your GraphQL API requests. The value of the `X-Github-Next-Global-ID` header can be `1` or `0`. Setting the value to `1` will force the response payload to always use the new ID format for any object that you requested the `id` field for. Setting the value to `0` will revert to default behavior, which is to show the legacy ID or new ID depending on the object creation date.
Here is an example request using cURL:
```
$ curl \
-H "Authorization: token $GITHUB_TOKEN" \
-H "X-Github-Next-Global-ID: 1" \
https://api.github.com/graphql \
-d '{ "query": "{ node(id: \"MDQ6VXNlcjM0MDczMDM=\") { id } }" }'
```
Even though the legacy ID `MDQ6VXNlcjM0MDczMDM=` was used in the query, the response will contain the new ID format:
```
{"data":{"node":{"id":"U_kgDOADP9xw"}}}
```
With the `X-Github-Next-Global-ID` header, you can find the new ID format for legacy IDs that you reference in your application. You can then update those references with the ID received in the response. You should update all references to legacy IDs and use the new ID format for any subsequent requests to the API.
To perform bulk operations, you can use aliases to submit multiple node queries in one API call. For more information, see "[the GraphQL docs](https://graphql.org/learn/queries/#aliases)."
You can also get the new ID for a collection of items. For example, if you wanted to get the new ID for the last 10 repositories in your organization, you could use a query like this:
```
{
organization(login: "github") {
repositories(last: 10) {
edges {
cursor
node {
name
id
}
}
}
}
}
```
Note that setting `X-Github-Next-Global-ID` to `1` will affect the return value of every `id` field in your query. This means that even when you submit a non-`node` query, you will get back the new format ID if you requested the `id` field.
## Sharing feedback
If you have any concerns about the rollout of this change impacting your app, please [contact {% data variables.product.product_name %}](https://support.github.com/contact) and include information such as your app name so that we can better assist you.

View File

@@ -0,0 +1,8 @@
---
#Reference: #4999.
#Documentation for the security manager org-level role
versions:
fpt: '*'
ghes: '>=3.4'
ghae: 'ghae-issue-5430'
ghec: '*'

View File

@@ -50,7 +50,7 @@ sections:
heading: Alterações na administração heading: Alterações na administração
notes: notes:
- '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the maintenance of repositories, especially for repositories that contain many unreachable objects. Note that the first maintenance cycle after upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may take longer than usual to complete.' - '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the maintenance of repositories, especially for repositories that contain many unreachable objects. Note that the first maintenance cycle after upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may take longer than usual to complete.'
- '{% data variables.product.prodname_ghe_server %} 3.3 includes a repository cache for geographically-distributed teams and CI infrastructure. The repository cache keeps a read-only copy of your repositories available in additional geographies, which prevents clients from downloading duplicate Git content from your primary instance. For more information, see "[About repository caching](/admin/enterprise-management/caching-repositories/about-repository-caching)."' - '{% data variables.product.prodname_ghe_server %} 3.3 includes the public beta of a repository cache for geographically-distributed teams and CI infrastructure. The repository cache keeps a read-only copy of your repositories available in additional geographies, which prevents clients from downloading duplicate Git content from your primary instance. For more information, see "[About repository caching](/admin/enterprise-management/caching-repositories/about-repository-caching)."'
- '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the user impersonation process. An impersonation session now requires a justification for the impersonation, actions are recorded in the audit log as being performed as an impersonated user, and the user who is impersonated will receive an email notification that they have been impersonated by an enterprise administrator. For more information, see "[Impersonating a user](/enterprise-server@3.3/admin/user-management/managing-users-in-your-enterprise/impersonating-a-user)."' - '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the user impersonation process. An impersonation session now requires a justification for the impersonation, actions are recorded in the audit log as being performed as an impersonated user, and the user who is impersonated will receive an email notification that they have been impersonated by an enterprise administrator. For more information, see "[Impersonating a user](/enterprise-server@3.3/admin/user-management/managing-users-in-your-enterprise/impersonating-a-user)."'
- A new stream processing service has been added to facilitate the growing set of events that are published to the audit log, including events associated with Git and {% data variables.product.prodname_actions %} activity. - A new stream processing service has been added to facilitate the growing set of events that are published to the audit log, including events associated with Git and {% data variables.product.prodname_actions %} activity.
- -
@@ -153,6 +153,10 @@ sections:
Commits authored using the new API are automatically GPG signed and are [marked as verified](/github/authenticating-to-github/managing-commit-signature-verification/about-commit-signature-verification) in the {% data variables.product.prodname_ghe_server %} UI. GitHub Apps can use the mutation to author commits directly or [on behalf of users](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests). Commits authored using the new API are automatically GPG signed and are [marked as verified](/github/authenticating-to-github/managing-commit-signature-verification/about-commit-signature-verification) in the {% data variables.product.prodname_ghe_server %} UI. GitHub Apps can use the mutation to author commits directly or [on behalf of users](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests).
- 'When a new tag is created, the [push](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push) webhook payload now always includes a `head_commit` object that contains the data of the commit that the new tag points to. As a result, the `head_commit` object will always contain the commit data of the payload''s `after` commit.' - 'When a new tag is created, the [push](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push) webhook payload now always includes a `head_commit` object that contains the data of the commit that the new tag points to. As a result, the `head_commit` object will always contain the commit data of the payload''s `after` commit.'
-
heading: 'Performance Changes'
notes:
- Page loads and jobs are now significantly faster for repositories with many Git refs.
#No security/bug fixes for the RC release #No security/bug fixes for the RC release
#security_fixes: #security_fixes:
#- PLACEHOLDER #- PLACEHOLDER

View File

@@ -2,4 +2,4 @@
- To narrow the scope within a user or organization account, highlight a repository then use <kbd>Tab</kbd> to add it to the scope. - To narrow the scope within a user or organization account, highlight a repository then use <kbd>Tab</kbd> to add it to the scope.
- To expand the scope, highlight and remove an item in the scope using the <kbd>Backspace</kbd> or <kbd>delete</kbd> key. - To expand the scope, highlight and remove an item in the scope using the <kbd>Backspace</kbd> or <kbd>delete</kbd> key.
- To clear the scope and text box, click **Clear**. - To clear the scope and text box, click **Clear** or use <kbd>Ctrl</kbd><kbd>Backspace</kbd> (Windows and Linux) or <kbd>⌘</kbd><kbd>Backspace</kbd> (Mac).

View File

@@ -9,7 +9,7 @@
<tbody> <tbody>
<tr> <tr>
<td> <td>
Windows Server 2022<sup>[beta]</sup> Windows Server 2022
</td> </td>
<td> <td>
<code>windows-2022</code> <code>windows-2022</code>

View File

@@ -0,0 +1 @@
1. Na barra lateral esquerda, clique em **Configurações de moderação**. ![Moderation settings in organization's settings](/assets/images/help/organizations/org-settings-moderation-settings.png)

View File

@@ -0,0 +1 @@
1. In the navigation on the left hand side, click the **Accessibility** link. ![Screenshot of the user settings navigation. The Accessibility link is highlighted.](/assets/images/help/settings/accessibility-tab.png)

View File

@@ -0,0 +1,22 @@
---
title: Managing accessibility settings
intro: 'You can disable character key shortcuts on {% data variables.product.prodname_dotcom %} in your accessibility settings.'
versions:
fpt: '*'
ghes: '>=3.4'
feature: keyboard-shortcut-accessibility-setting
---
## About accessibility settings
{% data variables.product.product_name %} includes a variety of keyboard shortcuts so that you can perform actions across the site without using your mouse to navigate. While shortcuts are useful to save time, they can sometimes make {% data variables.product.prodname_dotcom %} harder to use and less accessible.
All keyboard shortcuts are enabled by default on {% data variables.product.product_name %}, but you can choose to disable character key shortcuts in your accessibility settings. This setting does not affect keyboard shortcuts provided by your web browser or {% data variables.product.prodname_dotcom %} shortcuts that use a modifier key such as `control` or `command`.
## Managing character key shortcuts
{% data reusables.user_settings.access_settings %}
{% data reusables.user_settings.accessibility_settings %}
1. Select or deselect the **Enable character key shortcuts** checkbox.
![Screenshot of the 'Enable character key shortcuts' checkbox](/assets/images/help/settings/disable-character-key-shortcuts.png)
2. Click **Save**.

View File

@@ -0,0 +1,42 @@
---
title: Organizing information with collapsed sections
intro: 'You can streamline your Markdown by creating a collapsed section with the `<details>` tag.'
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
shortTitle: Collapsed sections
---
## Creating a collapsed section
You can temporarily obscure sections of your Markdown by creating a collapsed section that the reader can choose to expand. For example, when you want to include technical details in an issue comment that may not be relevant or interesting to every reader, you can put those details in a collapsed section.
Any Markdown within the `<details>` block will be collapsed until the reader clicks {% octicon "triangle-right" aria-label="The right triange icon" %} to expand the details. Within the `<details>` block, use the `<summary>` tag to create a label to the right of {% octicon "triangle-right" aria-label="The right triange icon" %}.
```markdown
<details><summary>CLICK ME</summary>
<p>
#### We can hide anything, even code!
```ruby
puts "Hello World"
```
</p>
</details>
```
The Markdown will be collapsed by default.
![Rendered collapsed](/assets/images/help/writing/collapsed-section-view.png)
After a reader clicks {% octicon "triangle-right" aria-label="The right triange icon" %}, the details are expanded.
![Rendered open](/assets/images/help/writing/open-collapsed-section.png)
## Further reading
- [{% data variables.product.prodname_dotcom %} Flavored Markdown Spec](https://github.github.com/gfm/)
- "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax)"

View File

@@ -0,0 +1,69 @@
---
title: Migrating GraphQL global node IDs
intro: 'Learn about the two global node ID formats and how to migrate from the legacy format to the new format.'
versions:
fpt: '*'
ghec: '*'
topics:
- API
shortTitle: Migrating global node IDs
---
## Background
The {% data variables.product.product_name %} GraphQL API currently supports two types of global node ID formats. The legacy format will be deprecated and replaced with a new format. This guide shows you how to migrate to the new format, if necessary.
By migrating to the new format, you ensure that the response times of your requests remain consistent and small. You also ensure that your application continues to work once the legacy IDs are fully deprecated.
To learn more about why the legacy global node ID format will be deprecated, see "[New global ID format coming to GraphQL](https://github.blog/2021-02-10-new-global-id-format-coming-to-graphql)."
## Determining if you need to take action
You only need to follow the migration steps if you store references to GraphQL global node IDs. These IDs correspond to the `id` field for any object in the schema. If you don't store any global node IDs, then you can continue to interact with the API with no change.
Additionally, if you currently decode the legacy IDs to extract type information (for example, if you use the first two characters of `PR_kwDOAHz1OX4uYAah` to determine if the object is a pull request), your service will break since the format of the IDs has changed. You should migrate your service to treat these IDs as opaque strings. These IDs will be unique, therefore you can rely on them directly as references.
## Migrating to the new global IDs
To facilitate migration to the new ID format, you can use the `X-Github-Next-Global-ID` header in your GraphQL API requests. The value of the `X-Github-Next-Global-ID` header can be `1` or `0`. Setting the value to `1` will force the response payload to always use the new ID format for any object that you requested the `id` field for. Setting the value to `0` will revert to default behavior, which is to show the legacy ID or new ID depending on the object creation date.
Here is an example request using cURL:
```
$ curl \
-H "Authorization: token $GITHUB_TOKEN" \
-H "X-Github-Next-Global-ID: 1" \
https://api.github.com/graphql \
-d '{ "query": "{ node(id: \"MDQ6VXNlcjM0MDczMDM=\") { id } }" }'
```
Even though the legacy ID `MDQ6VXNlcjM0MDczMDM=` was used in the query, the response will contain the new ID format:
```
{"data":{"node":{"id":"U_kgDOADP9xw"}}}
```
With the `X-Github-Next-Global-ID` header, you can find the new ID format for legacy IDs that you reference in your application. You can then update those references with the ID received in the response. You should update all references to legacy IDs and use the new ID format for any subsequent requests to the API.
To perform bulk operations, you can use aliases to submit multiple node queries in one API call. For more information, see "[the GraphQL docs](https://graphql.org/learn/queries/#aliases)."
You can also get the new ID for a collection of items. For example, if you wanted to get the new ID for the last 10 repositories in your organization, you could use a query like this:
```
{
organization(login: "github") {
repositories(last: 10) {
edges {
cursor
node {
name
id
}
}
}
}
}
```
Note that setting `X-Github-Next-Global-ID` to `1` will affect the return value of every `id` field in your query. This means that even when you submit a non-`node` query, you will get back the new format ID if you requested the `id` field.
## Sharing feedback
If you have any concerns about the rollout of this change impacting your app, please [contact {% data variables.product.product_name %}](https://support.github.com/contact) and include information such as your app name so that we can better assist you.

View File

@@ -0,0 +1,8 @@
---
#Reference: #4999.
#Documentation for the security manager org-level role
versions:
fpt: '*'
ghes: '>=3.4'
ghae: 'ghae-issue-5430'
ghec: '*'

View File

@@ -50,7 +50,7 @@ sections:
heading: 管理更改 heading: 管理更改
notes: notes:
- '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the maintenance of repositories, especially for repositories that contain many unreachable objects. Note that the first maintenance cycle after upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may take longer than usual to complete.' - '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the maintenance of repositories, especially for repositories that contain many unreachable objects. Note that the first maintenance cycle after upgrading to {% data variables.product.prodname_ghe_server %} 3.3 may take longer than usual to complete.'
- '{% data variables.product.prodname_ghe_server %} 3.3 includes a repository cache for geographically-distributed teams and CI infrastructure. The repository cache keeps a read-only copy of your repositories available in additional geographies, which prevents clients from downloading duplicate Git content from your primary instance. For more information, see "[About repository caching](/admin/enterprise-management/caching-repositories/about-repository-caching)."' - '{% data variables.product.prodname_ghe_server %} 3.3 includes the public beta of a repository cache for geographically-distributed teams and CI infrastructure. The repository cache keeps a read-only copy of your repositories available in additional geographies, which prevents clients from downloading duplicate Git content from your primary instance. For more information, see "[About repository caching](/admin/enterprise-management/caching-repositories/about-repository-caching)."'
- '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the user impersonation process. An impersonation session now requires a justification for the impersonation, actions are recorded in the audit log as being performed as an impersonated user, and the user who is impersonated will receive an email notification that they have been impersonated by an enterprise administrator. For more information, see "[Impersonating a user](/enterprise-server@3.3/admin/user-management/managing-users-in-your-enterprise/impersonating-a-user)."' - '{% data variables.product.prodname_ghe_server %} 3.3 includes improvements to the user impersonation process. An impersonation session now requires a justification for the impersonation, actions are recorded in the audit log as being performed as an impersonated user, and the user who is impersonated will receive an email notification that they have been impersonated by an enterprise administrator. For more information, see "[Impersonating a user](/enterprise-server@3.3/admin/user-management/managing-users-in-your-enterprise/impersonating-a-user)."'
- A new stream processing service has been added to facilitate the growing set of events that are published to the audit log, including events associated with Git and {% data variables.product.prodname_actions %} activity. - A new stream processing service has been added to facilitate the growing set of events that are published to the audit log, including events associated with Git and {% data variables.product.prodname_actions %} activity.
- -
@@ -153,6 +153,10 @@ sections:
Commits authored using the new API are automatically GPG signed and are [marked as verified](/github/authenticating-to-github/managing-commit-signature-verification/about-commit-signature-verification) in the {% data variables.product.prodname_ghe_server %} UI. GitHub Apps can use the mutation to author commits directly or [on behalf of users](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests). Commits authored using the new API are automatically GPG signed and are [marked as verified](/github/authenticating-to-github/managing-commit-signature-verification/about-commit-signature-verification) in the {% data variables.product.prodname_ghe_server %} UI. GitHub Apps can use the mutation to author commits directly or [on behalf of users](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests).
- 'When a new tag is created, the [push](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push) webhook payload now always includes a `head_commit` object that contains the data of the commit that the new tag points to. As a result, the `head_commit` object will always contain the commit data of the payload''s `after` commit.' - 'When a new tag is created, the [push](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#push) webhook payload now always includes a `head_commit` object that contains the data of the commit that the new tag points to. As a result, the `head_commit` object will always contain the commit data of the payload''s `after` commit.'
-
heading: 'Performance Changes'
notes:
- Page loads and jobs are now significantly faster for repositories with many Git refs.
#No security/bug fixes for the RC release #No security/bug fixes for the RC release
#security_fixes: #security_fixes:
#- PLACEHOLDER #- PLACEHOLDER

View File

@@ -2,4 +2,4 @@
- To narrow the scope within a user or organization account, highlight a repository then use <kbd>Tab</kbd> to add it to the scope. - To narrow the scope within a user or organization account, highlight a repository then use <kbd>Tab</kbd> to add it to the scope.
- To expand the scope, highlight and remove an item in the scope using the <kbd>Backspace</kbd> or <kbd>delete</kbd> key. - To expand the scope, highlight and remove an item in the scope using the <kbd>Backspace</kbd> or <kbd>delete</kbd> key.
- To clear the scope and text box, click **Clear**. - To clear the scope and text box, click **Clear** or use <kbd>Ctrl</kbd><kbd>Backspace</kbd> (Windows and Linux) or <kbd>⌘</kbd><kbd>Backspace</kbd> (Mac).

View File

@@ -9,7 +9,7 @@
<tbody> <tbody>
<tr> <tr>
<td> <td>
Windows Server 2022<sup>[beta]</sup> Windows Server 2022
</td> </td>
<td> <td>
<code>windows-2022</code> <code>windows-2022</code>

View File

@@ -0,0 +1 @@
1. 在左侧边栏中,单击 **Moderation settings仲裁设置**。 ![Moderation settings in organization's settings](/assets/images/help/organizations/org-settings-moderation-settings.png)

View File

@@ -0,0 +1 @@
1. In the navigation on the left hand side, click the **Accessibility** link. ![Screenshot of the user settings navigation. The Accessibility link is highlighted.](/assets/images/help/settings/accessibility-tab.png)