1
0
mirror of synced 2025-12-25 02:17:36 -05:00

Merge branch 'main' into pwsh-commands

This commit is contained in:
Martin Lopes
2022-03-10 16:03:39 +10:00
committed by GitHub
148 changed files with 1250 additions and 1164 deletions

View File

@@ -163,10 +163,10 @@ jobs:
rsync -rptovR ./user-code/assets/./**/*.png ./assets
rsync -rptovR ./user-code/data/./**/*.{yml,md} ./data
rsync -rptovR ./user-code/components/./**/*.{ts,tsx} ./components
rsync -rptovR ./user-code/lib/./**/*.{js,ts,json} ./lib
rsync -rptovR ./user-code/middleware/./**/*.{js,ts} ./middleware
rsync -rptovR ./user-code/pages/./**/*.{tsx} ./pages
rsync -rptovR ./user-code/stylesheets/./**/*.{scss} ./stylesheets
rsync -rptovR --ignore-missing-args ./user-code/lib/./**/*.{js,ts} ./lib
rsync -rptovR --ignore-missing-args ./user-code/middleware/./**/*.{js,ts} ./middleware
rsync -rptovR ./user-code/pages/./**/*.tsx ./pages
rsync -rptovR ./user-code/stylesheets/./**/*.scss ./stylesheets
# In addition to making the final image smaller, we also save time by not sending unnecessary files to the docker build context
- name: 'Prune for preview env'

View File

@@ -24,7 +24,7 @@ jobs:
- name: move PR
uses: alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488
with:
project: Docs team reviews
project: Docs open source board
column: Triage
repo-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}

View File

@@ -132,6 +132,11 @@ jobs:
- name: Run build script
run: npm run build
- name: Warm possible disk caching
env:
NODE_ENV: test
run: ./script/warm-before-tests.mjs
- name: Run tests
env:
DIFF_FILE: get_diff_files.txt

View File

@@ -1,8 +1,6 @@
import { useState, useEffect, ReactNode } from 'react'
import { useState, useEffect } from 'react'
import { useRouter } from 'next/router'
import dynamic from 'next/dynamic'
import cx from 'classnames'
import { ActionList, Heading } from '@primer/react'
import { ZapIcon, InfoIcon, ShieldLockIcon } from '@primer/octicons-react'
import { Callout } from 'components/ui/Callout'
@@ -10,7 +8,7 @@ import { Callout } from 'components/ui/Callout'
import { Link } from 'components/Link'
import { DefaultLayout } from 'components/DefaultLayout'
import { ArticleTitle } from 'components/article/ArticleTitle'
import { MiniTocItem, useArticleContext } from 'components/context/ArticleContext'
import { useArticleContext } from 'components/context/ArticleContext'
import { useTranslation } from 'components/hooks/useTranslation'
import { LearningTrackNav } from './LearningTrackNav'
import { MarkdownContent } from 'components/ui/MarkdownContent'
@@ -18,10 +16,8 @@ import { Lead } from 'components/ui/Lead'
import { ArticleGridLayout } from './ArticleGridLayout'
import { PlatformPicker } from 'components/article/PlatformPicker'
import { ToolPicker } from 'components/article/ToolPicker'
import { MiniTocs } from 'components/ui/MiniTocs'
const ClientSideRedirectExceptions = dynamic(() => import('./ClientsideRedirectExceptions'), {
ssr: false,
})
const ClientSideHighlightJS = dynamic(() => import('./ClientSideHighlightJS'), { ssr: false })
// Mapping of a "normal" article to it's interactive counterpart
@@ -49,12 +45,11 @@ const interactiveAlternatives: Record<string, { href: string }> = {
href: '/codespaces/setting-up-your-project-for-codespaces/setting-up-your-project-for-codespaces?langId=py',
},
}
export type StructuredContentT = {
structuredContent?: ReactNode
type Props = {
children?: React.ReactNode
}
export const ArticlePage = ({ structuredContent }: StructuredContentT) => {
export const ArticlePage = ({ children }: Props) => {
const { asPath } = useRouter()
const {
title,
@@ -69,58 +64,9 @@ export const ArticlePage = ({ structuredContent }: StructuredContentT) => {
miniTocItems,
currentLearningTrack,
} = useArticleContext()
const renderedContent = structuredContent || renderedPage
const { t } = useTranslation('pages')
const currentPath = asPath.split('?')[0]
const renderTocItem = (item: MiniTocItem) => {
return (
<ActionList.Item
as="li"
key={item.contents}
className={item.platform}
sx={{ listStyle: 'none', padding: '2px' }}
>
<div className={cx('lh-condensed d-block width-full')}>
<div dangerouslySetInnerHTML={{ __html: item.contents }} />
{item.items && item.items.length > 0 ? (
<ul className="ml-3">{item.items.map(renderTocItem)}</ul>
) : null}
</div>
</ActionList.Item>
)
}
// We have some one-off redirects for rest api docs
// currently those are limited to the repos page, but
// that will grow soon as we restructure the rest api docs.
// This is a workaround to updating the hardcoded links
// directly in the REST API code in a separate repo, which
// requires many file changes and teams to sign off.
// While the organization is turbulent, we can do this.
// Once it's more settled, we can refactor the rest api code
// to leverage the OpenAPI urls rather than hardcoded urls.
// The code below determines if we should bother loading this redirecting
// component at all.
// The reason this isn't done at the server-level is because there you
// can't possibly access the URL hash. That's only known in client-side
// code.
const [loadClientsideRedirectExceptions, setLoadClientsideRedirectExceptions] = useState(false)
useEffect(() => {
const { hash, pathname } = window.location
// Today, Jan 2022, it's known explicitly what the pathname.
// In the future there might be more.
// Hopefully, we can some day delete all of this and no longer
// be dependent on the URL hash to do the redirect.
if (
hash &&
(pathname.endsWith('/rest/reference/repos') ||
pathname.endsWith('/rest/reference/enterprise-admin'))
) {
setLoadClientsideRedirectExceptions(true)
}
}, [])
// If the page contains `[data-highlight]` blocks, these pages need
// syntax highlighting. But not every page needs it, so it's conditionally
// lazy-loaded on the client.
@@ -139,29 +85,8 @@ export const ArticlePage = ({ structuredContent }: StructuredContentT) => {
// consecutive one does.
}, [asPath])
// Scrollable code blocks in our REST API docs and elsewhere aren't accessible
// via keyboard navigation without setting tabindex="0". But we don't want to set
// this attribute on every `<pre>` code block, only the ones where there are scroll
// bars because the content isn't all visible.
useEffect(() => {
const codeBlocks = document.querySelectorAll<HTMLPreElement>('pre')
codeBlocks.forEach((codeBlock) => {
if (
codeBlock.scrollWidth > codeBlock.clientWidth ||
codeBlock.scrollHeight > codeBlock.clientHeight
) {
codeBlock.setAttribute('tabindex', '0')
}
})
}, [])
return (
<DefaultLayout>
{/* Doesn't matter *where* this is included because it will
never render anything. It always just return null. */}
{loadClientsideRedirectExceptions && <ClientSideRedirectExceptions />}
{/* Doesn't matter *where* this is included because it will
never render anything. It always just return null. */}
{lazyLoadHighlightJS && <ClientSideHighlightJS />}
@@ -220,28 +145,13 @@ export const ArticlePage = ({ structuredContent }: StructuredContentT) => {
</div>
)}
{miniTocItems.length > 1 && (
<>
<Heading as="h2" id="in-this-article" className="mb-1" sx={{ fontSize: 1 }}>
<Link href="#in-this-article">{t('miniToc')}</Link>
</Heading>
<ActionList
key={title}
items={miniTocItems.map((items, i) => {
return {
key: title + i,
text: title,
renderItem: () => <ul>{renderTocItem(items)}</ul>,
}
})}
/>
</>
<MiniTocs pageTitle={title} miniTocItems={miniTocItems} />
)}
</>
}
>
<div id="article-contents">
<MarkdownContent>{renderedContent}</MarkdownContent>
<MarkdownContent>{children || renderedPage}</MarkdownContent>
{effectiveDate && (
<div className="mt-4" id="effectiveDate">
Effective as of:{' '}

View File

@@ -245,6 +245,15 @@ function initClipboardEvent() {
})
}
function initCopyButtonEvent() {
document.documentElement.addEventListener('click', (evt) => {
const target = evt.target as HTMLElement
const button = target.closest('.js-btn-copy') as HTMLButtonElement
if (!button) return
sendEvent({ type: EventType.navigate, navigate_label: 'copy icon button' })
})
}
function initLinkEvent() {
document.documentElement.addEventListener('click', (evt) => {
const target = evt.target as HTMLElement
@@ -267,6 +276,7 @@ export default function initializeEvents() {
initPageAndExitEvent() // must come first
initLinkEvent()
initClipboardEvent()
initCopyButtonEvent()
initPrintEvent()
// survey event in ./survey.js
// experiment event in ./experiment.js

View File

@@ -6,7 +6,6 @@ import styles from './Breadcrumbs.module.scss'
export type BreadcrumbT = {
title: string
documentType?: string
href?: string
}

View File

@@ -1,24 +1,62 @@
import cx from 'classnames'
import { CheckIcon, CopyIcon } from '@primer/octicons-react'
import { Tooltip } from '@primer/react'
import useClipboard from 'components/hooks/useClipboard'
import styles from './CodeBlock.module.scss'
type Props = {
verb?: string
// Only Code samples should have a copy icon - if there's a headingLang it's a code sample
headingLang?: string
codeBlock: string
highlight?: string
}
export function CodeBlock({ verb, codeBlock, highlight }: Props) {
export function CodeBlock({ verb, headingLang, codeBlock, highlight }: Props) {
const [isCopied, setCopied] = useClipboard(codeBlock, {
successDuration: 1400,
})
return (
<pre className={cx(styles.methodCodeBlock, 'rounded-1 border')} data-highlight={highlight}>
<code>
{verb && (
<span className="color-bg-accent-emphasis color-fg-on-emphasis rounded-1 text-uppercase">
{verb}
</span>
)}{' '}
{codeBlock}
</code>
</pre>
<div className="code-extra">
{headingLang && (
<header className="d-flex flex-justify-between flex-items-center p-2 text-small rounded-top-1 border">
{headingLang === 'JavaScript' ? (
<span>
{headingLang} (
<a className="text-underline" href="https://github.com/octokit/core.js#readme">
@octokit/core.js
</a>
)
</span>
) : (
`${headingLang}`
)}
<Tooltip direction="w" aria-label={isCopied ? 'Copied!' : 'Copy to clipboard'}>
<button className="js-btn-copy btn-octicon" onClick={() => setCopied()}>
{isCopied ? <CheckIcon /> : <CopyIcon />}
</button>
</Tooltip>
</header>
)}
<pre
className={cx(
styles.methodCodeBlock,
'd-flex flex-justify-between flex-items-center rounded-1 border'
)}
data-highlight={highlight}
>
<code>
{verb && (
<span className="color-bg-accent-emphasis color-fg-on-emphasis rounded-1 text-uppercase">
{verb}
</span>
)}{' '}
{codeBlock}
</code>
</pre>
</div>
)
}

View File

@@ -18,22 +18,10 @@ export function RestCodeSamples({ slug, xCodeSamples }: Props) {
{xCodeSamples.map((sample, index) => {
const sampleElements: JSX.Element[] = []
if (sample.lang !== 'Ruby') {
sampleElements.push(
sample.lang === 'JavaScript' ? (
<h5 key={`${sample.lang}-${index}`}>
{sample.lang} (
<a className="text-underline" href="https://github.com/octokit/core.js#readme">
@octokit/core.js
</a>
)
</h5>
) : (
<h5 key={`${sample.lang}-${index}`}>{sample.lang}</h5>
)
)
sampleElements.push(
<CodeBlock
key={sample.lang + index}
headingLang={sample.lang}
codeBlock={sample.source}
highlight={sample.lang === 'JavaScript' ? 'javascript' : 'curl'}
></CodeBlock>

View File

@@ -24,6 +24,10 @@
}
tbody {
tr td {
width: auto;
}
tr td:first-child {
font-weight: bold;
}

View File

@@ -0,0 +1,159 @@
import { useState, useEffect } from 'react'
import { useRouter } from 'next/router'
import dynamic from 'next/dynamic'
import { DefaultLayout } from 'components/DefaultLayout'
import { ArticleTitle } from 'components/article/ArticleTitle'
import { useMainContext } from 'components/context/MainContext'
import { MarkdownContent } from 'components/ui/MarkdownContent'
import { Lead } from 'components/ui/Lead'
import { ArticleGridLayout } from 'components/article/ArticleGridLayout'
import { MiniTocItem } from 'components/context/ArticleContext'
import { RestCategoryOperationsT } from './types'
import { RestOperation } from './RestOperation'
import { MiniTocs } from 'components/ui/MiniTocs'
const ClientSideHighlightJS = dynamic(() => import('components/article/ClientSideHighlightJS'), {
ssr: false,
})
const ClientSideRedirectExceptions = dynamic(
() => import('components/article/ClientsideRedirectExceptions'),
{
ssr: false,
}
)
export type StructuredContentT = {
descriptions: any
introContent: string
restOperations: RestCategoryOperationsT
miniTocItems?: MiniTocItem[]
}
export const RestReferencePage = ({
descriptions,
introContent,
restOperations,
miniTocItems,
}: StructuredContentT) => {
const { asPath } = useRouter()
const { page } = useMainContext()
const subcategories = Object.keys(restOperations)
// We have some one-off redirects for rest api docs
// currently those are limited to the repos page, but
// that will grow soon as we restructure the rest api docs.
// This is a workaround to updating the hardcoded links
// directly in the REST API code in a separate repo, which
// requires many file changes and teams to sign off.
// While the organization is turbulent, we can do this.
// Once it's more settled, we can refactor the rest api code
// to leverage the OpenAPI urls rather than hardcoded urls.
// The code below determines if we should bother loading this redirecting
// component at all.
// The reason this isn't done at the server-level is because there you
// can't possibly access the URL hash. That's only known in client-side
// code.
const [loadClientsideRedirectExceptions, setLoadClientsideRedirectExceptions] = useState(false)
useEffect(() => {
const { hash, pathname } = window.location
// Today, Jan 2022, it's known explicitly what the pathname.
// In the future there might be more.
// Hopefully, we can some day delete all of this and no longer
// be dependent on the URL hash to do the redirect.
if (
hash &&
(pathname.endsWith('/rest/reference/repos') ||
pathname.endsWith('/rest/reference/enterprise-admin'))
) {
setLoadClientsideRedirectExceptions(true)
}
}, [])
// Scrollable code blocks in our REST API docs and elsewhere aren't accessible
// via keyboard navigation without setting tabindex="0". But we don't want to set
// this attribute on every `<pre>` code block, only the ones where there are scroll
// bars because the content isn't all visible.
useEffect(() => {
const codeBlocks = document.querySelectorAll<HTMLPreElement>('pre')
codeBlocks.forEach((codeBlock) => {
if (
codeBlock.scrollWidth > codeBlock.clientWidth ||
codeBlock.scrollHeight > codeBlock.clientHeight
) {
codeBlock.setAttribute('tabindex', '0')
}
})
}, [])
// If the page contains `[data-highlight]` blocks, these pages need
// syntax highlighting. But not every page needs it, so it's conditionally
// lazy-loaded on the client.
const [lazyLoadHighlightJS, setLazyLoadHighlightJS] = useState(false)
useEffect(() => {
// It doesn't need to use querySelector because all we care about is if
// there is greater than zero of these in the DOM.
// Note! This "core selector", which determines whether to bother
// or not, needs to match what's used inside ClientSideHighlightJS.tsx
if (document.querySelector('[data-highlight]')) {
setLazyLoadHighlightJS(true)
}
// Important to depend on the current path because the first page you
// load, before any client-side navigation, might not need it, but the
// consecutive one does.
}, [asPath])
return (
<DefaultLayout>
{/* Doesn't matter *where* this is included because it will
never render anything. It always just return null. */}
{loadClientsideRedirectExceptions && <ClientSideRedirectExceptions />}
{lazyLoadHighlightJS && <ClientSideHighlightJS />}
<div className="container-xl px-3 px-md-6 my-4">
<ArticleGridLayout
topper={<ArticleTitle>{page.title}</ArticleTitle>}
intro={
<>
{page.introPlainText && (
<Lead data-testid="lead" data-search="lead">
{page.introPlainText}
</Lead>
)}
</>
}
toc={
<>
{miniTocItems && miniTocItems.length > 1 && (
<MiniTocs pageTitle={page.title} miniTocItems={miniTocItems} />
)}
</>
}
>
<div key={`restCategory-introContent`}>
<div dangerouslySetInnerHTML={{ __html: introContent }} />
</div>
<div id="article-contents">
<MarkdownContent>
{subcategories.map((subcategory, index) => (
<div key={`restCategory-${index}`}>
<div dangerouslySetInnerHTML={{ __html: descriptions[subcategory] }} />
{restOperations[subcategory].map((operation, index) => (
<RestOperation
key={`restOperation-${index}`}
operation={operation}
index={index}
/>
))}
</div>
))}
</MarkdownContent>
</div>
</ArticleGridLayout>
</div>
</DefaultLayout>
)
}

View File

@@ -69,3 +69,7 @@ export interface ChildParameter {
description: string
type: string
}
export interface RestCategoryOperationsT {
[subcategory: string]: Operation[]
}

View File

@@ -0,0 +1,52 @@
import cx from 'classnames'
import { ActionList, Heading } from '@primer/react'
import { MiniTocItem } from 'components/context/ArticleContext'
import { Link } from 'components/Link'
import { useTranslation } from 'components/hooks/useTranslation'
export type MiniTocsPropsT = {
pageTitle: string
miniTocItems: MiniTocItem[]
}
const renderTocItem = (item: MiniTocItem) => {
return (
<ActionList.Item
as="li"
key={item.contents}
className={item.platform}
sx={{ listStyle: 'none', padding: '2px' }}
>
<div className={cx('lh-condensed d-block width-full')}>
<div dangerouslySetInnerHTML={{ __html: item.contents }} />
{item.items && item.items.length > 0 ? (
<ul className="ml-3">{item.items.map(renderTocItem)}</ul>
) : null}
</div>
</ActionList.Item>
)
}
export function MiniTocs({ pageTitle, miniTocItems }: MiniTocsPropsT) {
const { t } = useTranslation('pages')
return (
<>
<Heading as="h2" id="in-this-article" className="mb-1" sx={{ fontSize: 1 }}>
<Link href="#in-this-article">{t('miniToc')}</Link>
</Heading>
<ActionList
key={pageTitle}
items={miniTocItems.map((items, i) => {
return {
key: pageTitle + i,
text: pageTitle,
renderItem: () => <ul>{renderTocItem(items)}</ul>,
}
})}
/>
</>
)
}

View File

@@ -0,0 +1 @@
export { MiniTocs } from './MiniTocs'

View File

@@ -183,6 +183,7 @@ The `github` context contains information about the workflow run and the event t
| `github.action_path` | `string` | The path where an action is located. This property is only supported in composite actions. You can use this path to access files located in the same repository as the action. |
| `github.action_ref` | `string` | For a step executing an action, this is the ref of the action being executed. For example, `v2`. |
| `github.action_repository` | `string` | For a step executing an action, this is the owner and repository name of the action. For example, `actions/checkout`. |
| `github.action_status` | `string` | For a composite action, the current result of the composite action. |
| `github.actor` | `string` | The username of the user that initiated the workflow run. |
| `github.api_url` | `string` | The URL of the {% data variables.product.prodname_dotcom %} REST API. |
| `github.base_ref` | `string` | The `base_ref` or target branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is either `pull_request` or `pull_request_target`. |

View File

@@ -156,7 +156,7 @@ We strongly recommend that actions use environment variables to access the files
| `GITHUB_RUN_ID` | {% data reusables.actions.run_id_description %} For example, `1658821493`. |
| `GITHUB_RUN_NUMBER` | {% data reusables.actions.run_number_description %} For example, `3`. |
| `GITHUB_SERVER_URL`| The URL of the {% data variables.product.product_name %} server. For example: `https://{% data variables.product.product_url %}`.
| `GITHUB_SHA` | The commit SHA that triggered the workflow. For example, `ffac537e6cbbf934b08745a378932722df287a53`. |
| `GITHUB_SHA` | The commit SHA that triggered the workflow. The value of this commit SHA depends on the event that triggered the workflow. For more information, see [Events that trigger workflows](/actions/using-workflows/events-that-trigger-workflows). For example, `ffac537e6cbbf934b08745a378932722df287a53`. |
| `GITHUB_WORKFLOW` | The name of the workflow. For example, `My test workflow`. If the workflow file doesn't specify a `name`, the value of this variable is the full path of the workflow file in the repository. |
| `GITHUB_WORKSPACE` | The default working directory on the runner for steps, and the default location of your repository when using the [`checkout`](https://github.com/actions/checkout) action. For example, `/home/runner/work/my-repo-name/my-repo-name`. |
{%- if actions-runner-arch-envvars %}

View File

@@ -45,7 +45,6 @@ topics:
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.policies-tab %}
{% data reusables.enterprise-accounts.settings-tab %}
{% data reusables.enterprise-accounts.options-tab %}
4. Under "Dormancy threshold", use the drop-down menu, and click the desired dormancy threshold.
![The Dormancy threshold drop-down menu](/assets/images/enterprise/site-admin-settings/dormancy-threshold-menu.png)

View File

@@ -22,7 +22,6 @@ shortTitle: Recover an account with 2FA
**Warnings**:
- {% data reusables.two_fa.support-may-not-help %}
- {% data reusables.accounts.you-must-know-your-password %}
{% endwarning %}
@@ -32,7 +31,13 @@ shortTitle: Recover an account with 2FA
Use one of your recovery codes to automatically regain entry into your account. You may have saved your recovery codes to a password manager or your computer's downloads folder. The default filename for recovery codes is `github-recovery-codes.txt`. For more information about recovery codes, see "[Configuring two-factor authentication recovery methods](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication-recovery-methods#downloading-your-two-factor-authentication-recovery-codes)."
{% data reusables.two_fa.username-password %}
1. Type your username and password to prompt authentication.
{% warning %}
**Warning**: {% data reusables.accounts.you-must-know-your-password %}
{% endwarning %}
{% ifversion fpt or ghec %}
1. Under "Having problems?", click **Use a recovery code or request a reset**.

View File

@@ -31,6 +31,7 @@ includeGuides:
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/tracking-code-scanning-alerts-in-issues-using-task-lists
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository
@@ -38,6 +39,7 @@ includeGuides:
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/viewing-code-scanning-logs
- /code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning
- /code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning
- /code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github
@@ -45,6 +47,7 @@ includeGuides:
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-runner-in-your-ci-system
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/migrating-from-the-codeql-runner-to-codeql-cli
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-runner-in-your-ci-system
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/troubleshooting-codeql-runner-in-your-ci-system
- /code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities
@@ -58,6 +61,8 @@ includeGuides:
- /code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory
- /code-security/repository-security-advisories/withdrawing-a-repository-security-advisory
- /code-security/security-overview/about-the-security-overview
- /code-security/security-overview/filtering-alerts-in-the-security-overview
- /code-security/security-overview/viewing-the-security-overview
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates

View File

@@ -8,17 +8,17 @@ featuredLinks:
guides:
- /code-security/getting-started/securing-your-repository
- /code-security/getting-started/securing-your-organization
- '{% ifversion fpt %}/code-security/repository-security-advisories/creating-a-repository-security-advisory{% endif %}'
- '{% ifversion ghes or ghae %}/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository{% endif%}'
- '{% ifversion fpt or ghec %}/code-security/repository-security-advisories/creating-a-repository-security-advisory{% endif %}'
- '{% ifversion ghes or ghae %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository{% endif%}'
guideCards:
- '{% ifversion fpt %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates{% endif %}'
- '{% ifversion fpt %}/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/enabling-and-disabling-dependabot-version-updates{% endif %}'
- '{% ifversion fpt %}/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository{% endif %}'
- '{% ifversion ghes %}/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository{% endif %}'
- '{% ifversion ghes %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-notifications-for-vulnerable-dependencies{% endif %}'
- '{% ifversion ghes or ghae %}/code-security/secret-security/configuring-secret-scanning-for-your-repositories{% endif %}'
- '{% ifversion ghae %}/code-security/secure-coding/integrating-with-code-scanning/uploading-a-sarif-file-to-github{% endif %}'
- '{% ifversion ghae %}/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system{% endif %}'
- '{% ifversion fpt or ghec or ghes > 3.2 %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates{% endif %}'
- '{% ifversion fpt or ghec or ghes > 3.2 %}/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/enabling-and-disabling-dependabot-version-updates{% endif %}'
- '{% ifversion fpt or ghec or ghes > 3.2 %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository{% endif %}'
- '{% ifversion ghes < 3.3 %}/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository{% endif %}'
- '{% ifversion ghes < 3.3 %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-notifications-for-vulnerable-dependencies{% endif %}'
- '{% ifversion ghes < 3.3 or ghae %}/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories{% endif %}'
- '{% ifversion ghae %}/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github{% endif %}'
- '{% ifversion ghae %}/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system{% endif %}'
popular:
- '{% ifversion ghes %}/admin/release-notes{% endif %}'
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies
@@ -26,11 +26,11 @@ featuredLinks:
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot
- '{% ifversion ghae %}/code-security/secret-security/about-secret-scanning{% endif %}'
- '{% ifversion ghae %}/code-security/secret-scanning/about-secret-scanning{% endif %}'
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/troubleshooting-the-detection-of-vulnerable-dependencies
- '{% ifversion ghes or ghae %}/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages{% endif %}'
- '{% ifversion ghes or ghae %}/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow{% endif %}'
- '{% ifversion ghes or ghae %}/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/running-codeql-code-scanning-in-a-container{% endif %}'
- '{% ifversion ghes < 3.3 or ghae %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages{% endif %}'
- '{% ifversion ghes < 3.3 or ghae %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow{% endif %}'
- '{% ifversion ghes < 3.3 or ghae %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/running-codeql-code-scanning-in-a-container{% endif %}'
changelog:
label: security-and-compliance
versions:

View File

@@ -24,7 +24,7 @@ Organization owners can control which users in your organization can create and
To use codespaces in your organization, you must do the following:
- Ensure that users have [at least write access](/organizations/managing-access-to-your-organizations-repositories/repository-permission-levels-for-an-organization) to the repositories where they want to use a codespace.
- [Enable {% data variables.product.prodname_codespaces %} for users in your organization](#enable-codespaces-for-users-in-your-organization). You can choose allow {% data variables.product.prodname_codespaces %} for selected users or only for specific users.
- [Enable {% data variables.product.prodname_codespaces %} for users in your organization](#enable-codespaces-for-users-in-your-organization). You can choose to allow {% data variables.product.prodname_codespaces %} for selected users or only for specific users.
- [Set a spending limit](/billing/managing-billing-for-github-codespaces/managing-spending-limits-for-codespaces)
- Ensure that your organization does not have an IP address allow list enabled. For more information, see "[Managing allowed IP addresses for your organization](/organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization)."

View File

@@ -22,7 +22,11 @@ An outside collaborator is a person who is not a member of your organization, bu
{% data reusables.organizations.outside-collaborators-use-seats %}
{% ifversion fpt %}
Organizations that use {% data variables.product.prodname_ghe_cloud %} can restrict the ability to invite collaborators. For more information, see "[Setting permissions for adding outside collaborators](/enterprise-cloud@latest/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators)" in the {% data variables.product.prodname_ghe_cloud %} documentation.
{% else %}
An organization owner can restrict the ability to invite collaborators. For more information, see "[Setting permissions for adding outside collaborators](/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators)."
{% endif %}
{% ifversion ghes %}
Before you can add someone as an outside collaborator on a repository, the person must have a user account on {% data variables.product.product_location %}. If your enterprise uses an external authentication system such as SAML or LDAP, the person you want to add must sign in through that system to create an account. If the person does not have access to the authentication system and built-in authentication is enabled for your enterprise, a site admin can create a user account for the person. For more information, see "[Using built-in authentication](/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance/using-built-in-authentication#inviting-users)."
@@ -32,10 +36,6 @@ Before you can add someone as an outside collaborator on a repository, the perso
If your organization requires two-factor authentication, all outside collaborators must enable two-factor authentication before accepting your invitation to collaborate on a repository. For more information, see "[Requiring two-factor authentication in your organization](/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization)."
{% endif %}
{% ifversion fpt %}
To further support your team's collaboration abilities, you can upgrade to {% data variables.product.prodname_ghe_cloud %}, which includes features like protected branches and code owners on private repositories. {% data reusables.enterprise.link-to-ghec-trial %}
{% endif %}
## Adding outside collaborators to a repository
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5974 %}

View File

@@ -1,6 +1,6 @@
---
title: Viewing people with access to your repository
intro: 'Organization owners can view peoples access to a repository within an organization. Owners of organizations using {% data variables.product.prodname_ghe_cloud %} or {% data variables.product.prodname_ghe_server %} can also export a CSV list of people who have access to a repository.'
intro: 'You can view{% ifversion ghec or ghes or ghae %} and export{% endif %} a list of people with access to a repository within an organization.'
redirect_from:
- /articles/viewing-people-with-access-to-your-repository
- /github/setting-up-and-managing-organizations-and-teams/viewing-people-with-access-to-your-repository
@@ -13,9 +13,17 @@ topics:
- Organizations
- Teams
shortTitle: View people with access
permissions: Organization owners can view people with access to a repository.
---
Administrators can use this information to help off-board people, gather data for compliance, and other general security checkups.
## About the list of people with access to your repository
You can use this information to help off-board people, gather data for compliance, and other general security checkups.
{% ifversion fpt %}
Organizations that use {% data variables.product.prodname_ghe_cloud %} can also export a CSV list of people who have access to a repository. For more information, see [the {% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/organizations/managing-access-to-your-organizations-repositories/viewing-people-with-access-to-your-repository).
{% endif %}
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5974 %}
![Access management overview](/assets/images/help/repository/manage-access-overview.png)
{% else %}
@@ -30,12 +38,21 @@ You can see a combined overview of teams and people with access to your reposito
{% data reusables.repositories.accessing-repository-graphs %}
{% data reusables.repositories.accessing-repository-people %}
{% endif %}
{% ifversion ghec or ghes or ghae %}
## Exporting a list of people with access to your repository
Owners of organizations on {% data variables.product.prodname_ghe_cloud %} or {% data variables.product.prodname_ghe_server %} can export a CSV list of people who have access to a repository.
{% ifversion ghec %}
{% note %}
**Note:** Only organizations that use {% data variables.product.prodname_ghe_cloud %} can export a list of people with access to a repository. {% data reusables.enterprise.link-to-ghec-trial %}
{% endnote %}
{% endif %}
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.accessing-repository-graphs %}
{% data reusables.repositories.accessing-repository-people %}
4. Click **Export CSV**.
![People tab in the repository sidebar](/assets/images/help/repository/export-repository-permissions.png)
{% endif %}

View File

@@ -1,13 +1,11 @@
---
title: Setting permissions for adding outside collaborators
intro: 'To protect your organization''s data and the number of paid licenses used in your organization, you can allow only owners to invite outside collaborators to organization repositories.'
product: '{% data reusables.gated-features.restrict-add-collaborator %}'
redirect_from:
- /articles/restricting-the-ability-to-add-outside-collaborators-to-organization-repositories
- /articles/setting-permissions-for-adding-outside-collaborators
- /github/setting-up-and-managing-organizations-and-teams/setting-permissions-for-adding-outside-collaborators
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
@@ -17,7 +15,16 @@ topics:
shortTitle: Set collaborator policy
---
Organization owners, and members with admin privileges for a repository, can invite outside collaborators to work on the repository. You can also restrict outside collaborator invite permissions to only organization owners.
By default, anyone with admin access to a repository can invite outside collaborators to work on the repository. You can choose to restrict the ability to invite outside collaborators to organization owners only.
{% ifversion ghec %}
{% note %}
**Note:** Only organizations that use {% data variables.product.prodname_ghe_cloud %} can restrict the ability to invite outside collaborators to organization owners. {% data reusables.enterprise.link-to-ghec-trial %}
{% endnote %}
{% endif %}
{% data reusables.organizations.outside-collaborators-use-seats %}

View File

@@ -126,8 +126,8 @@ Some of the features listed below are limited to organizations using {% data var
| Pull (read) *all repositories* in the organization | **X** | | | **X** |
| Push (write) and clone (copy) *all repositories* in the organization | **X** | | | |
| Convert organization members to [outside collaborators](#outside-collaborators) | **X** | | | |
| [View people with access to an organization repository](/articles/viewing-people-with-access-to-your-repository) | **X** | | | |
| [Export a list of people with access to an organization repository](/articles/viewing-people-with-access-to-your-repository/#exporting-a-list-of-people-with-access-to-your-repository) | **X** | | | |
| [View people with access to an organization repository](/articles/viewing-people-with-access-to-your-repository) | **X** | | | |{% ifversion ghec or ghes or ghae %}
| [Export a list of people with access to an organization repository](/articles/viewing-people-with-access-to-your-repository/#exporting-a-list-of-people-with-access-to-your-repository) | **X** | | | |{% endif %}
| Manage the default branch name (see "[Managing the default branch name for repositories in your organization](/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization)") | **X** | | | |
| Manage default labels (see "[Managing default labels for repositories in your organization](/articles/managing-default-labels-for-repositories-in-your-organization)") | **X** | | | |{% ifversion ghec %}
| Enable team synchronization (see "[Managing team synchronization for your organization](/organizations/managing-saml-single-sign-on-for-your-organization/managing-team-synchronization-for-your-organization)" for details) | **X** | | | |{% endif %}

View File

@@ -67,7 +67,7 @@ For more information on reviewing pull requests in {% data variables.product.pro
{% data reusables.dependency-review.beta %}
If the pull request contains changes to dependencies you can use the dependency review for a manifest or lock file to see what has changed and check whether the changes introduce security vulnerabilities. For more information, see "[Reviewing dependency changes in a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request)."
If the pull request contains changes to dependencies you can use the dependency review for a manifest or lock file to see what has changed and check whether the changes introduce security vulnerabilities. For more information, see "[Reviewing dependency changes in a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request)."
{% data reusables.repositories.changed-files %}

View File

@@ -322,6 +322,7 @@ Take care to distinguish between product names and product elements. For more in
| Product | Element |
| --- | --- |
| GitHub Actions | an action |
| GitHub Codespaces | a codespace |
| GitHub Packages | a package |
| GitHub Pages | a GitHub Pages site |
@@ -594,7 +595,7 @@ Avoid ending a sentence with a preposition unless the rewritten sentence would s
### Product names
See the “Product names” section of this guide.
See the “[Product names](#product-names)” section of this guide.
### Terms to use or avoid

View File

@@ -2,7 +2,7 @@
security_advisories:
title: 'Fix and disclose a security vulnerability'
description: 'Using repository security advisories to privately fix a reported vulnerability and get a CVE.'
featured_track: '{% ifversion fpt %}true{% else %}false{% endif %}'
featured_track: '{% ifversion fpt or ghec %}true{% else %}false{% endif %}'
guides:
- /code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities
- /code-security/repository-security-advisories/creating-a-repository-security-advisory
@@ -13,32 +13,32 @@ security_advisories:
- /code-security/repository-security-advisories/withdrawing-a-repository-security-advisory
- /code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory
# Feature available on dotcom and GHES
# Feature available on dotcom and GHES 3.3+, so articles available on GHAE and earlier GHES hidden to hide the learning track
dependabot_alerts:
title: 'Get notifications for vulnerable dependencies'
description: 'Set up Dependabot to alert you to new vulnerabilities in your dependencies.'
guides:
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies
- '{% ifversion not ghae %}/github/administering-a-repository/managing-repository-settings/managing-security-and-analysis-settings-for-your-repository{% endif %}'
- '{% ifversion fpt or ghec or ghes > 3.2 %}/github/administering-a-repository/managing-repository-settings/managing-security-and-analysis-settings-for-your-repository{% endif %}'
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/viewing-and-updating-vulnerable-dependencies-in-your-repository
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-notifications-for-vulnerable-dependencies
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-pull-requests-for-dependency-updates
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/troubleshooting-the-detection-of-vulnerable-dependencies
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/troubleshooting-dependabot-errors
# Feature available only on dotcom, so articles available hidden to hide the learning track in other versions
# Feature available on dotcom and GHES 3.3+, so articles available on GHAE and earlier GHES hidden to hide the learning track
dependabot_security_updates:
title: 'Get pull requests to update your vulnerable dependencies'
description: 'Set up Dependabot to create pull requests when new vulnerabilities are reported.'
guides:
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates
- '{% ifversion fpt %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-notifications-for-vulnerable-dependencies{% endif %}'
- '{% ifversion fpt %}/github/administering-a-repository/managing-repository-settings/managing-security-and-analysis-settings-for-your-repository{% endif %}'
- '{% ifversion fpt or ghec or ghes > 3.2 %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-notifications-for-vulnerable-dependencies{% endif %}'
- '{% ifversion fpt or ghec or ghes > 3.2 %}/github/administering-a-repository/managing-repository-settings/managing-security-and-analysis-settings-for-your-repository{% endif %}'
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-pull-requests-for-dependency-updates
- '{% ifversion fpt %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/troubleshooting-the-detection-of-vulnerable-dependencies{% endif %}'
- '{% ifversion fpt or ghec or ghes > 3.2 %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/troubleshooting-the-detection-of-vulnerable-dependencies{% endif %}'
# Feature available only on dotcom
# Feature available only on dotcom and GHES 3.3+
dependency_version_updates:
title: 'Keep your dependencies up-to-date'
description: 'Use Dependabot to check for new releases and create pull requests to update your dependencies.'
@@ -54,32 +54,34 @@ dependency_version_updates:
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-pull-requests-for-dependency-updates
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/troubleshooting-dependabot-errors
# Feature available in all versions from GHES 3.0 up
# Feature available in GHEC, GHES 3.0 up, and GHAE. Feature limited on FPT so hidden there.
secret_scanning:
title: 'Scan for secrets'
description: 'Set up secret scanning to guard against accidental check-ins of tokens, passwords, and other secrets to your repository.'
guides:
- /code-security/secret-scanning/about-secret-scanning
- /code-security/secret-scanning/configuring-secret-scanning-for-your-repositories
- /code-security/secret-scanning/defining-custom-patterns-for-secret-scanning
- /code-security/secret-scanning/managing-alerts-from-secret-scanning
- '{% ifversion not fpt %}/code-security/secret-scanning/about-secret-scanning{% endif %}'
- '{% ifversion not fpt %}/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories{% endif %}'
- '{% ifversion not fpt %}/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning{% endif %}'
- '{% ifversion not fpt %}/code-security/secret-scanning/managing-alerts-from-secret-scanning{% endif %}'
- '{% ifversion not fpt %}/code-security/secret-scanning/secret-scanning-patterns{% endif %}'
# Security overview feature available only on dotcom currently, so other articles hidden to hide the learning path in other versions
# Security overview feature available in GHEC and GHES 3.2+, so other articles hidden to hide the learning path in other versions
security_alerts:
title: 'Explore and manage security alerts'
description: 'Learn where to find and resolve security alerts.'
guides:
- /code-security/security-overview/about-the-security-overview
- '{% ifversion fpt %}/code-security/secret-scanning/managing-alerts-from-secret-scanning {% endif %}'
- '{% ifversion fpt %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository{% endif %}'
- '{% ifversion fpt %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests{% endif %}'
- '{% ifversion fpt %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/viewing-and-updating-vulnerable-dependencies-in-your-repository{% endif %}'
- '{% ifversion ghec or ghes > 3.1 %}/code-security/security-overview/about-the-security-overview {% endif %}'
- '{% ifversion ghec or ghes > 3.1 %}/code-security/security-overview/viewing-the-security-overview {% endif %}'
- '{% ifversion ghec or ghes > 3.1 %}/code-security/secret-scanning/managing-alerts-from-secret-scanning {% endif %}'
- '{% ifversion ghec or ghes > 3.1 %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository{% endif %}'
- '{% ifversion ghec or ghes > 3.1 %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests{% endif %}'
- '{% ifversion ghec or ghes > 3.1 %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/viewing-and-updating-vulnerable-dependencies-in-your-repository{% endif %}'
# Feature available in all versions from GHES 2.22 up
code_security_actions:
title: 'Run code scanning with GitHub Actions'
description: 'Check your default branch and every pull request to keep vulnerabilities and errors out of your repository.'
featured_track: '{% ifversion ghae or ghes > 2.22 %}true{% else %}false{% endif %}'
featured_track: '{% ifversion ghae or ghes %}true{% else %}false{% endif %}'
guides:
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository
@@ -106,6 +108,5 @@ code_security_ci:
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/about-codeql-code-scanning-in-your-ci-system
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-runner-in-your-ci-system
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-runner-in-your-ci-system
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/migrating-from-the-codeql-runner-to-codeql-cli
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/troubleshooting-codeql-runner-in-your-ci-system

View File

@@ -19,9 +19,9 @@
- GitHub Actions
# Security policies
- title: Microsoft security policy
- title: Microsoft security policy template
description: Example security policy
href: /microsoft/microsoft.github.io/blob/master/SECURITY.MD
href: https://github.com/microsoft/repo-templates/blob/main/shared/SECURITY.md
tags:
- Security policy
- title: Electron security policy
@@ -50,8 +50,9 @@
versions:
fpt: '*'
ghec: '*'
ghes: '>=3.3'
# Dependabot configuration only relevant to GitHub.com
# Dependabot configuration only relevant to GitHub.com and GHES 3.3+
# Convert "languages" to "package-ecosystems" for Dependabot configurations
- title: Super linter configuration
description: Example Dependabot version updates configuration from the Super linter repository.
@@ -69,6 +70,7 @@
versions:
fpt: '*'
ghec: '*'
ghes: '>=3.3'
- title: Dependabot version update PR
description: Example pull request generated by the Dependabot version updates configuration in the Super linter repository.
@@ -81,3 +83,4 @@
versions:
fpt: '*'
ghec: '*'
ghes: '>=3.3'

View File

@@ -1 +1 @@
If you protect your personal account with two-factor authentication but do not know your password, you will not be able to generate a one-time password to recover your account. {% data variables.product.company_short %} can send a password reset email to a verified address associated with your account. For more information, see "[Updating your {% data variables.product.prodname_dotcom %} access credentials](/authentication/keeping-your-account-and-data-secure/updating-your-github-access-credentials#requesting-a-new-password)."
If you protect your personal account with two-factor authentication but do not know your password, you will not be able to follow these steps to recover your account. {% data variables.product.company_short %} can send a password reset email to a verified address associated with your account. For more information, see "[Updating your {% data variables.product.prodname_dotcom %} access credentials](/authentication/keeping-your-account-and-data-secure/updating-your-github-access-credentials#requesting-a-new-password)."

View File

@@ -1 +0,0 @@
Restricting the ability to add outside collaborators to owners is available with {% data variables.product.prodname_ghe_cloud %}. For more information, see "[GitHub's products](/articles/githubs-products)."

View File

@@ -1,5 +1,5 @@
You can manage permissions and policies for a number of different actions and features in your organization.
For example, to protect your organization's data and number of paid licenses, you can choose to allow only organization owners to invite outside collaborators to organization repositories. You can also choose to allow or prevent the forking of private repositories owned by your organization. For more information, see "[Setting permissions for adding outside collaborators](/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators)" and "[Managing the forking policy for your organization](/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization)."
For example, to protect your organization's data, you can restrict repository creation in your organization. You can also choose to allow or prevent the forking of private repositories owned by your organization. For more information, see "[Restricting repository creation in your organization](/organizations/managing-organization-settings/restricting-repository-creation-in-your-organization)" and "[Managing the forking policy for your organization](/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization)."
For the full list of settings you can configure for your organization, see "[Managing organization settings](/organizations/managing-organization-settings)."

View File

@@ -90,6 +90,7 @@ contribution_cta:
products:
graphql:
reference:
implements: Implements
fields: Fields
arguments: Arguments
name: Name

View File

@@ -14,8 +14,18 @@ export const next = '3.5'
export const nextNext = '3.6'
export const supported = ['3.4', '3.3', '3.2', '3.1']
// This indicates the point where we started treating redirect lookups
// to be a *function* rather than a big *lookup object*.
// This is important distinguish because we need to leverage that
// when dealing with redirects specifically in these archived
// enterprise versions.
// When you're archiving a version, add the new archived number to this
// array and you should never need to touch the `deprecated` array
// on the line just below.
export const deprecatedWithFunctionalRedirects = ['3.0']
export const deprecated = [
'3.0',
...deprecatedWithFunctionalRedirects,
'2.22',
'2.21',
'2.20',

View File

@@ -2,21 +2,32 @@ import { languageKeys } from './languages.js'
import nonEnterpriseDefaultVersion from './non-enterprise-default-version.js'
import { allVersions } from './all-versions.js'
import { latest, supported } from './enterprise-server-releases.js'
import {
latest,
supported,
deprecatedWithFunctionalRedirects,
} from './enterprise-server-releases.js'
const languagePrefixRegex = new RegExp(`^/(${languageKeys.join('|')})/`)
const nonEnterpriseDefaultVersionPrefix = `/${nonEnterpriseDefaultVersion}`
// Return the new URI if there is one, otherwise return undefined.
export default function getRedirect(uri, context) {
const { redirects, userLanguage } = context
const supportedAndRecentlyDeprecated = [...supported, ...deprecatedWithFunctionalRedirects]
export function splitPathByLanguage(uri, userLanguage) {
let language = userLanguage || 'en'
let withoutLanguage = uri
if (languagePrefixRegex.test(uri)) {
language = uri.match(languagePrefixRegex)[1]
withoutLanguage = uri.replace(languagePrefixRegex, '/')
}
return [language, withoutLanguage]
}
// Return the new URI if there is one, otherwise return undefined.
export default function getRedirect(uri, context) {
const { redirects, userLanguage } = context
const [language, withoutLanguage] = splitPathByLanguage(uri, userLanguage)
let destination
@@ -54,7 +65,6 @@ export default function getRedirect(uri, context) {
if (withoutLanguage === '/enterprise-server') {
return basicCorrection
}
// console.log({ basicCorrection })
} else if (withoutLanguage.startsWith('/enterprise-server@latest')) {
// E.g. '/enterprise-server@latest' or '/enterprise-server@latest/3.3/foo'
basicCorrection =
@@ -67,9 +77,9 @@ export default function getRedirect(uri, context) {
}
} else if (
withoutLanguage.startsWith('/enterprise/') &&
supported.includes(withoutLanguage.split('/')[2])
supportedAndRecentlyDeprecated.includes(withoutLanguage.split('/')[2])
) {
// E.g. '/enterprise/3.3' or '/enterprise/3.3/foo'
// E.g. '/enterprise/3.3' or '/enterprise/3.3/foo' or '/enterprise/3.0/foo
// If the URL is without a language, and no redirect is necessary,
// but it has as version prefix, the language has to be there

View File

@@ -30,3 +30,34 @@ export function readCompressedJsonFileFallback(xpath) {
}
}
}
// Wrapper on readCompressedJsonFileFallback that initially only checks
// if the file exists but doesn't read the content till you call it.
export function readCompressedJsonFileFallbackLazily(xpath) {
const cache = new Map()
// This will throw if the file isn't accessible at all, e.g. ENOENT
// But, the file might have been replaced by one called `SAMENAME.json.br`
// because in staging, we ship these files compressed to make the
// deployment faster. So, in our file-presence check, we need to
// account for that.
try {
fs.accessSync(xpath)
} catch (err) {
if (err.code === 'ENOENT') {
try {
fs.accessSync(xpath + '.br')
} catch (err) {
if (err.code === 'ENOENT') {
throw new Error(`Neither ${xpath} nor ${xpath}.br is accessible`)
}
throw err
}
} else {
throw err
}
}
return () => {
if (!cache.has(xpath)) cache.set(xpath, readCompressedJsonFileFallback(xpath))
return cache.get(xpath)
}
}

View File

@@ -440,3 +440,9 @@
- /github/administering-a-repository/managing-alerts-from-secret-scanning
- /code-security/secret-security/managing-alerts-from-secret-scanning
- /code-security/secret-scanning/managing-alerts-from-secret-scanning
/enterprise-cloud@latest/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators
- /articles/restricting-the-ability-to-add-outside-collaborators-to-organization-repositories
- /articles/setting-permissions-for-adding-outside-collaborators
- /github/setting-up-and-managing-organizations-and-teams/setting-permissions-for-adding-outside-collaborators
- /organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators

View File

@@ -1,3 +1,5 @@
import fs from 'fs'
import os from 'os'
import path from 'path'
import flat from 'flat'
import { get, set } from 'lodash-es'
@@ -5,17 +7,42 @@ import languages from './languages.js'
import dataDirectory from './data-directory.js'
import encodeBracketedParentheses from './encode-bracketed-parentheses.js'
const loadSiteDataFromDir = (dir) => ({
site: {
data: dataDirectory(path.join(dir, 'data'), {
preprocess: (dataString) => encodeBracketedParentheses(dataString.trimEnd()),
ignorePatterns: [/README\.md$/],
}),
},
const TEMP_DIRECTORY = process.env.RUNNER_TEMP || os.tmpdir()
function diskMemoize(prefix, fn) {
const useCache = process.env.NODE_ENV !== 'development'
return (dir) => {
const cacheFileName = `${prefix}.${dir.replace(/[^\w]+/g, '-').toLowerCase() || 'en'}.json`
if (useCache) {
try {
return JSON.parse(fs.readFileSync(cacheFileName, 'utf-8'))
} catch (err) {
if (!(err.code === 'ENOENT' || err instanceof SyntaxError)) throw err
}
}
const result = fn(dir)
if (useCache) {
fs.writeFileSync(cacheFileName, JSON.stringify(result), 'utf-8')
console.log(`Disk-cache miss on ${cacheFileName}`, new Date())
}
return result
}
}
const loadSiteDataFromDir = diskMemoize(path.join(TEMP_DIRECTORY, 'docs-site-data'), (dir) => {
return {
site: {
data: dataDirectory(path.join(dir, 'data'), {
preprocess: (dataString) => encodeBracketedParentheses(dataString.trimEnd()),
ignorePatterns: [/README\.md$/],
}),
},
}
})
export default function loadSiteData() {
// load english site data
// load English site data
const siteData = {
en: loadSiteDataFromDir(languages.en.dir),
}

View File

@@ -1,19 +1,20 @@
import fs from 'fs'
import path from 'path'
import slash from 'slash'
import statsd from '../lib/statsd.js'
import {
firstVersionDeprecatedOnNewSite,
lastVersionWithoutArchivedRedirectsFile,
deprecatedWithFunctionalRedirects,
} from '../lib/enterprise-server-releases.js'
import patterns from '../lib/patterns.js'
import versionSatisfiesRange from '../lib/version-satisfies-range.js'
import isArchivedVersion from '../lib/is-archived-version.js'
import { setFastlySurrogateKey, SURROGATE_ENUMS } from './set-fastly-surrogate-key.js'
import got from 'got'
import { readCompressedJsonFileFallback } from '../lib/read-json-file.js'
import { readCompressedJsonFileFallbackLazily } from '../lib/read-json-file.js'
import { cacheControlFactory } from './cache-control.js'
import { pathLanguagePrefixed, languagePrefixPathRegex } from '../lib/languages.js'
import getRedirect, { splitPathByLanguage } from '../lib/get-redirect.js'
function splitByLanguage(uri) {
let language = null
@@ -25,46 +26,18 @@ function splitByLanguage(uri) {
return [language, withoutLanguage]
}
function readJsonFileLazily(xpath) {
const cache = new Map()
// This will throw if the file isn't accessible at all, e.g. ENOENT
// But, the file might have been replaced by one called `SAMENAME.json.br`
// because in staging, we ship these files compressed to make the
// deployment faster. So, in our file-presence check, we need to
// account for that.
try {
fs.accessSync(xpath)
} catch (err) {
if (err.code === 'ENOENT') {
try {
fs.accessSync(xpath + '.br')
} catch (err) {
if (err.code === 'ENOENT') {
throw new Error(`Neither ${xpath} nor ${xpath}.br is accessible`)
}
throw err
}
} else {
throw err
}
}
return () => {
if (!cache.has(xpath)) cache.set(xpath, readCompressedJsonFileFallback(xpath))
return cache.get(xpath)
}
}
// These files are huge so lazy-load them. But note that the
// `readJsonFileLazily()` function will, at import-time, check that
// the path does exist.
const archivedRedirects = readJsonFileLazily(
const archivedRedirects = readCompressedJsonFileFallbackLazily(
'./lib/redirects/static/archived-redirects-from-213-to-217.json'
)
const archivedFrontmatterFallbacks = readJsonFileLazily(
const archivedFrontmatterFallbacks = readCompressedJsonFileFallbackLazily(
'./lib/redirects/static/archived-frontmatter-fallbacks.json'
)
const cacheControl = cacheControlFactory(60 * 60 * 24 * 365)
const noCacheControl = cacheControlFactory(0)
// Combine all the things you need to make sure the response is
// aggresively cached.
@@ -129,6 +102,39 @@ export default async function archivedEnterpriseVersions(req, res, next) {
const redirectCode = pathLanguagePrefixed(req.path) ? 301 : 302
if (deprecatedWithFunctionalRedirects.includes(requestedVersion)) {
const redirectTo = getRedirect(req.path, req.context)
if (redirectTo) {
if (redirectCode === 301) {
cacheControl(res)
} else {
noCacheControl(res)
}
res.removeHeader('set-cookie')
return res.redirect(redirectCode, redirectTo)
}
const redirectJson = await getRemoteJSON(getProxyPath('redirects.json', requestedVersion), {
retry: retryConfiguration,
// This is allowed to be different compared to the other requests
// we make because downloading the `redirects.json` once is very
// useful because it caches so well.
// And, as of 2021 that `redirects.json` is 10MB so it's more likely
// to time out.
timeout: 1000,
})
const [language, withoutLanguage] = splitPathByLanguage(req.path, req.context.userLanguage)
const newRedirectTo = redirectJson[withoutLanguage]
if (newRedirectTo) {
if (redirectCode === 301) {
cacheControl(res)
} else {
noCacheControl(res)
}
res.removeHeader('set-cookie')
return res.redirect(redirectCode, `/${language}${newRedirectTo}`)
}
}
// redirect language-prefixed URLs like /en/enterprise/2.10 -> /enterprise/2.10
// (this only applies to versions <2.13)
if (
@@ -165,7 +171,10 @@ export default async function archivedEnterpriseVersions(req, res, next) {
}
}
if (versionSatisfiesRange(requestedVersion, `>${lastVersionWithoutArchivedRedirectsFile}`)) {
if (
versionSatisfiesRange(requestedVersion, `>${lastVersionWithoutArchivedRedirectsFile}`) &&
!deprecatedWithFunctionalRedirects.includes(requestedVersion)
) {
const redirectJson = await getRemoteJSON(getProxyPath('redirects.json', requestedVersion), {
retry: retryConfiguration,
// This is allowed to be different compared to the other requests

View File

@@ -1,3 +1,5 @@
import liquid from '../../lib/render-content/liquid.js'
export default async function breadcrumbs(req, res, next) {
if (!req.context.page) return next()
if (req.context.page.hidden) return next()
@@ -9,95 +11,42 @@ export default async function breadcrumbs(req, res, next) {
return next()
}
const currentSiteTree =
req.context.siteTree[req.context.currentLanguage][req.context.currentVersion]
const fallbackSiteTree = req.context.siteTree.en[req.context.currentVersion]
req.context.breadcrumbs = await getBreadcrumbs(
// Array of child pages on the root, i.e., the product level.
currentSiteTree.childPages,
fallbackSiteTree.childPages,
req.context.currentPath.slice(3),
req.context.currentLanguage
)
req.context.breadcrumbs = await getBreadcrumbs(req)
return next()
}
async function getBreadcrumbs(
pageArray,
fallbackPageArray,
currentPathWithoutLanguage,
intendedLanguage
) {
// Find the page that starts with the requested path
let childPage = findPageWithPath(currentPathWithoutLanguage, pageArray)
// Find the page in the fallback page array (likely the English sub-tree)
const fallbackChildPage =
findPageWithPath(currentPathWithoutLanguage, fallbackPageArray || []) || childPage
// No matches, we bail
if (!childPage && !fallbackChildPage) {
return []
async function getBreadcrumbs(req) {
const crumbs = []
const { currentPath, currentVersion } = req.context
const split = currentPath.split('/')
while (split.length > 2 && split[split.length - 1] !== currentVersion) {
const href = split.join('/')
const page = req.context.pages[href]
crumbs.push({
href,
title: await getShortTitle(page, req.context),
})
split.pop()
}
crumbs.reverse()
// Didn't find the intended page, but found the fallback
if (!childPage) {
childPage = fallbackChildPage
}
const breadcrumb = {
documentType: childPage.page.documentType,
// give the breadcrumb the intendedLanguage, so nav through breadcrumbs doesn't inadvertantly change the user's selected language
href: `/${intendedLanguage}/${childPage.href.slice(4)}`,
title: childPage.renderedShortTitle || childPage.renderedFullTitle,
}
// Recursively loop through the childPages and create each breadcrumb, until we reach the
// point where the current siteTree page is the same as the requested page. Then stop.
if (childPage.childPages && currentPathWithoutLanguage !== childPage.href.slice(3)) {
return [
breadcrumb,
...(await getBreadcrumbs(
childPage.childPages,
fallbackChildPage.childPages,
currentPathWithoutLanguage,
intendedLanguage
)),
]
} else {
return [breadcrumb]
}
return crumbs
}
// Finds the page that starts with or equals the requested path in the array of
// pages e.g. if the current page is /actions/learn-github-actions/understanding-github-actions,
// depending on the pages in the pageArray agrument, would find:
//
// * /actions
// * /actions/learn-github-actions
// * /actions/learn-github-actions/understanding-github-actions
function findPageWithPath(pageToFind, pageArray) {
return pageArray.find((page) => {
const pageWithoutLanguage = page.href.slice(3)
const numPathSegments = pageWithoutLanguage.split('/').length
const pageToFindNumPathSegments = pageToFind.split('/').length
if (pageToFindNumPathSegments > numPathSegments) {
// if the current page to find has more path segments, add a trailing
// slash to the page comparison to avoid an overlap like:
//
// * /github-cli/github-cli/about-github-cli with /github
return pageToFind.startsWith(`${pageWithoutLanguage}/`)
} else if (pageToFindNumPathSegments === numPathSegments) {
// if the current page has the same number of path segments, only match
// if the paths are the same to avoid an overlap like:
//
// * /get-started/using-github with /get-started/using-git
return pageToFind === pageWithoutLanguage
} else {
return false
async function getShortTitle(page, context) {
if (page.rawShortTitle) {
if (page.rawShortTitle.includes('{')) {
// Can't easily cache this because the `page` is reused for multiple
// permalinks. We could do what the `Page.render()` method does which
// specifically caches based on the `context.currentPath` but at
// this point it's probably not worth it.
return await liquid.parseAndRender(page.rawShortTitle, context)
}
})
return page.shortTitle
}
if (page.rawTitle.includes('{')) {
return await liquid.parseAndRender(page.rawTitle, context)
}
return page.title
}

View File

@@ -1,15 +1,17 @@
import { readCompressedJsonFileFallback } from '../../lib/read-json-file.js'
import { readCompressedJsonFileFallbackLazily } from '../../lib/read-json-file.js'
import { allVersions } from '../../lib/all-versions.js'
const previews = readCompressedJsonFileFallback('./lib/graphql/static/previews.json')
const upcomingChanges = readCompressedJsonFileFallback('./lib/graphql/static/upcoming-changes.json')
const changelog = readCompressedJsonFileFallback('./lib/graphql/static/changelog.json')
const prerenderedObjects = readCompressedJsonFileFallback(
const previews = readCompressedJsonFileFallbackLazily('./lib/graphql/static/previews.json')
const upcomingChanges = readCompressedJsonFileFallbackLazily(
'./lib/graphql/static/upcoming-changes.json'
)
const changelog = readCompressedJsonFileFallbackLazily('./lib/graphql/static/changelog.json')
const prerenderedObjects = readCompressedJsonFileFallbackLazily(
'./lib/graphql/static/prerendered-objects.json'
)
const prerenderedInputObjects = readCompressedJsonFileFallback(
const prerenderedInputObjects = readCompressedJsonFileFallbackLazily(
'./lib/graphql/static/prerendered-input-objects.json'
)
const prerenderedMutations = readCompressedJsonFileFallback(
const prerenderedMutations = readCompressedJsonFileFallbackLazily(
'./lib/graphql/static/prerendered-mutations.json'
)
@@ -32,16 +34,16 @@ export default function graphqlContext(req, res, next) {
const graphqlVersion = currentVersionObj.miscVersionName
req.context.graphql = {
schemaForCurrentVersion: readCompressedJsonFileFallback(
schemaForCurrentVersion: readCompressedJsonFileFallbackLazily(
`lib/graphql/static/schema-${graphqlVersion}.json`
),
previewsForCurrentVersion: previews[graphqlVersion],
upcomingChangesForCurrentVersion: upcomingChanges[graphqlVersion],
prerenderedObjectsForCurrentVersion: prerenderedObjects[graphqlVersion],
prerenderedInputObjectsForCurrentVersion: prerenderedInputObjects[graphqlVersion],
prerenderedMutationsForCurrentVersion: prerenderedMutations[graphqlVersion],
)(),
previewsForCurrentVersion: previews()[graphqlVersion],
upcomingChangesForCurrentVersion: upcomingChanges()[graphqlVersion],
prerenderedObjectsForCurrentVersion: prerenderedObjects()[graphqlVersion],
prerenderedInputObjectsForCurrentVersion: prerenderedInputObjects()[graphqlVersion],
prerenderedMutationsForCurrentVersion: prerenderedMutations()[graphqlVersion],
explorerUrl,
changelog,
changelog: changelog(),
}
return next()

274
package-lock.json generated
View File

@@ -147,7 +147,6 @@
"make-promises-safe": "^5.1.0",
"minimatch": "^5.0.0",
"mkdirp": "^1.0.4",
"mock-express-response": "^0.3.0",
"mockdate": "^3.0.5",
"nock": "^13.2.2",
"nodemon": "^2.0.15",
@@ -14894,149 +14893,6 @@
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
"optional": true
},
"node_modules/mock-express-request": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/mock-express-request/-/mock-express-request-0.2.2.tgz",
"integrity": "sha512-EymHjY1k1jWIsaVaCsPdFterWO18gcNwQMb99OryhSBtIA33SZJujOLeOe03Rf2DTV997xLPyl2I098WCFm/mA==",
"dev": true,
"dependencies": {
"accepts": "^1.3.4",
"fresh": "^0.5.2",
"lodash": "^4.17.4",
"mock-req": "^0.2.0",
"parseurl": "^1.3.2",
"range-parser": "^1.2.0",
"type-is": "^1.6.15"
}
},
"node_modules/mock-express-response": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/mock-express-response/-/mock-express-response-0.3.0.tgz",
"integrity": "sha512-1rw9Ccd4+7eI8uaM5AX3NCP63o5g5DFLtpusJziPO1b42WTZxgVaN95LsWBJSrpslp6Eg2Qc2xM27wxC7GMeVg==",
"dev": true,
"dependencies": {
"content-disposition": "^0.5.2",
"content-type": "^1.0.4",
"cookie": "^0.3.1",
"cookie-signature": "^1.0.6",
"depd": "^1.1.1",
"escape-html": "^1.0.3",
"etag": "^1.8.1",
"mock-express-request": "^0.2.2",
"mock-res": "^0.5.0",
"on-finished": "^2.3.0",
"proxy-addr": "^2.0.2",
"qs": "^6.5.1",
"send": "^0.16.1",
"utils-merge": "^1.0.1",
"vary": "^1.1.2"
}
},
"node_modules/mock-express-response/node_modules/cookie": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
"integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=",
"dev": true,
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mock-express-response/node_modules/debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"dependencies": {
"ms": "2.0.0"
}
},
"node_modules/mock-express-response/node_modules/http-errors": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
"integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
"dev": true,
"dependencies": {
"depd": "~1.1.2",
"inherits": "2.0.3",
"setprototypeof": "1.1.0",
"statuses": ">= 1.4.0 < 2"
},
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mock-express-response/node_modules/inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
},
"node_modules/mock-express-response/node_modules/mime": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
"integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==",
"dev": true,
"bin": {
"mime": "cli.js"
}
},
"node_modules/mock-express-response/node_modules/ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
},
"node_modules/mock-express-response/node_modules/send": {
"version": "0.16.2",
"resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz",
"integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==",
"dev": true,
"dependencies": {
"debug": "2.6.9",
"depd": "~1.1.2",
"destroy": "~1.0.4",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"fresh": "0.5.2",
"http-errors": "~1.6.2",
"mime": "1.4.1",
"ms": "2.0.0",
"on-finished": "~2.3.0",
"range-parser": "~1.2.0",
"statuses": "~1.4.0"
},
"engines": {
"node": ">= 0.8.0"
}
},
"node_modules/mock-express-response/node_modules/setprototypeof": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
"integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==",
"dev": true
},
"node_modules/mock-express-response/node_modules/statuses": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
"integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==",
"dev": true,
"engines": {
"node": ">= 0.6"
}
},
"node_modules/mock-req": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/mock-req/-/mock-req-0.2.0.tgz",
"integrity": "sha1-dJRGgE0sAGFpNC7nvmu6HP/VNMI=",
"dev": true
},
"node_modules/mock-res": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/mock-res/-/mock-res-0.5.0.tgz",
"integrity": "sha1-mDaL6wnfdT9k9m2U5VNql7NqJDA=",
"dev": true
},
"node_modules/mockdate": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/mockdate/-/mockdate-3.0.5.tgz",
@@ -34004,136 +33860,6 @@
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
"optional": true
},
"mock-express-request": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/mock-express-request/-/mock-express-request-0.2.2.tgz",
"integrity": "sha512-EymHjY1k1jWIsaVaCsPdFterWO18gcNwQMb99OryhSBtIA33SZJujOLeOe03Rf2DTV997xLPyl2I098WCFm/mA==",
"dev": true,
"requires": {
"accepts": "^1.3.4",
"fresh": "^0.5.2",
"lodash": "^4.17.4",
"mock-req": "^0.2.0",
"parseurl": "^1.3.2",
"range-parser": "^1.2.0",
"type-is": "^1.6.15"
}
},
"mock-express-response": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/mock-express-response/-/mock-express-response-0.3.0.tgz",
"integrity": "sha512-1rw9Ccd4+7eI8uaM5AX3NCP63o5g5DFLtpusJziPO1b42WTZxgVaN95LsWBJSrpslp6Eg2Qc2xM27wxC7GMeVg==",
"dev": true,
"requires": {
"content-disposition": "^0.5.2",
"content-type": "^1.0.4",
"cookie": "^0.3.1",
"cookie-signature": "^1.0.6",
"depd": "^1.1.1",
"escape-html": "^1.0.3",
"etag": "^1.8.1",
"mock-express-request": "^0.2.2",
"mock-res": "^0.5.0",
"on-finished": "^2.3.0",
"proxy-addr": "^2.0.2",
"qs": "^6.5.1",
"send": "^0.16.1",
"utils-merge": "^1.0.1",
"vary": "^1.1.2"
},
"dependencies": {
"cookie": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
"integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=",
"dev": true
},
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"dev": true,
"requires": {
"ms": "2.0.0"
}
},
"http-errors": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
"integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
"dev": true,
"requires": {
"depd": "~1.1.2",
"inherits": "2.0.3",
"setprototypeof": "1.1.0",
"statuses": ">= 1.4.0 < 2"
}
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
"dev": true
},
"mime": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
"integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==",
"dev": true
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"dev": true
},
"send": {
"version": "0.16.2",
"resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz",
"integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==",
"dev": true,
"requires": {
"debug": "2.6.9",
"depd": "~1.1.2",
"destroy": "~1.0.4",
"encodeurl": "~1.0.2",
"escape-html": "~1.0.3",
"etag": "~1.8.1",
"fresh": "0.5.2",
"http-errors": "~1.6.2",
"mime": "1.4.1",
"ms": "2.0.0",
"on-finished": "~2.3.0",
"range-parser": "~1.2.0",
"statuses": "~1.4.0"
}
},
"setprototypeof": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
"integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==",
"dev": true
},
"statuses": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
"integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==",
"dev": true
}
}
},
"mock-req": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/mock-req/-/mock-req-0.2.0.tgz",
"integrity": "sha1-dJRGgE0sAGFpNC7nvmu6HP/VNMI=",
"dev": true
},
"mock-res": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/mock-res/-/mock-res-0.5.0.tgz",
"integrity": "sha1-mDaL6wnfdT9k9m2U5VNql7NqJDA=",
"dev": true
},
"mockdate": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/mockdate/-/mockdate-3.0.5.tgz",

View File

@@ -149,7 +149,6 @@
"make-promises-safe": "^5.1.0",
"minimatch": "^5.0.0",
"mkdirp": "^1.0.4",
"mock-express-response": "^0.3.0",
"mockdate": "^3.0.5",
"nock": "^13.2.2",
"nodemon": "^2.0.15",

View File

@@ -1,14 +1,15 @@
import { GetServerSideProps } from 'next'
import { Fragment } from 'react'
import { useRouter } from 'next/router'
import { MainContextT, MainContext, getMainContext } from 'components/context/MainContext'
import {
getArticleContextFromRequest,
ArticleContextT,
ArticleContext,
} from 'components/context/ArticleContext'
import { ArticlePage } from 'components/article/ArticlePage'
import { Link } from 'components/Link'
import { getEnabledForApps } from 'lib/rest/index.js'
import { ArticlePage } from 'components/article/ArticlePage'
import {
ArticleContext,
ArticleContextT,
getArticleContextFromRequest,
} from 'components/context/ArticleContext'
type OperationT = {
slug: string
@@ -36,7 +37,7 @@ export default function Category({ mainContext, enabledForApps, articleContext }
const { locale } = useRouter()
const content = Object.entries(enabledForApps).map(([category, operations]) => (
<div key={`enabledAppCategory-${category}`}>
<Fragment key={category}>
{operations.length > 0 && (
<h3 id={category}>
<Link href={`/${locale}/rest/reference/${category}`}>{category}</Link>
@@ -53,13 +54,13 @@ export default function Category({ mainContext, enabledForApps, articleContext }
</li>
))}
</ul>
</div>
</Fragment>
))
return (
<MainContext.Provider value={mainContext}>
<ArticleContext.Provider value={articleContext}>
<ArticlePage structuredContent={content} />
<ArticlePage>{content}</ArticlePage>
</ArticleContext.Provider>
</MainContext.Provider>
)

View File

@@ -1,19 +1,9 @@
import { GetServerSideProps } from 'next'
import { MainContextT, MainContext, getMainContext } from 'components/context/MainContext'
import getRest, { getRestOperationData } from 'lib/rest/index.js'
import { RestOperation } from 'components/rest/RestOperation'
import { Operation } from 'components/rest/types'
import {
getArticleContextFromRequest,
ArticleContextT,
ArticleContext,
MiniTocItem,
} from 'components/context/ArticleContext'
import { ArticlePage } from 'components/article/ArticlePage'
type RestCategoryOperationsT = {
[subcategory: string]: Operation[]
}
import { RestCategoryOperationsT } from 'components/rest/types'
import { MiniTocItem } from 'components/context/ArticleContext'
import { RestReferencePage } from 'components/rest/RestReferencePage'
type RestOperationsT = {
[version: string]: {
@@ -41,7 +31,7 @@ type Props = {
mainContext: MainContextT
restOperations: RestCategoryOperationsT
descriptions: { [subcategory: string]: string }
articleContext: ArticleContextT
miniTocItems: MiniTocItem[]
introContent: string
}
@@ -50,39 +40,19 @@ let restOperationData: RestDataT | null = null
export default function Category({
mainContext,
articleContext,
restOperations,
descriptions,
miniTocItems,
introContent,
}: Props) {
const subcategories = Object.keys(restOperations)
const operations = subcategories.map((subcategory, index: number) => {
const operations = restOperations[subcategory].map((operation: Operation, index: number) => (
<RestOperation key={`restOperation-${index}`} operation={operation} index={index} />
))
return (
<div key={`restCategory-${index}`}>
<div dangerouslySetInnerHTML={{ __html: descriptions[subcategory] }} />
{operations}
</div>
)
})
// This is Markdown content at the path
// data/reusables/rest-reference/<category>/<subcategory>
// that doesn't map directory to a group of operations.
operations.unshift(
<div key={`restCategory-introContent`}>
<div dangerouslySetInnerHTML={{ __html: introContent }} />
</div>
)
return (
<MainContext.Provider value={mainContext}>
<ArticleContext.Provider value={articleContext}>
<ArticlePage structuredContent={operations} />
</ArticleContext.Provider>
<RestReferencePage
descriptions={descriptions}
introContent={introContent}
restOperations={restOperations}
miniTocItems={miniTocItems}
/>
</MainContext.Provider>
)
}
@@ -130,20 +100,12 @@ export const getServerSideProps: GetServerSideProps<Props> = async (context) =>
)) as CategoryDataT
}
// Because the Markdown page in the content/rest/reference directory
// is only metadata, the miniTocItems and renderedPage properties
// are undefined. We need to populate those properties with the static
// data read from the decorated schema files.
const articleContext = getArticleContextFromRequest(req)
articleContext.miniTocItems =
restOperationData[currentLanguage][currentVersion][category].miniTocItems
return {
props: {
restOperations,
mainContext: getMainContext(req, res),
descriptions: restOperationData[currentLanguage][currentVersion][category].descriptions,
articleContext: articleContext,
miniTocItems: restOperationData[currentLanguage][currentVersion][category].miniTocItems,
introContent: restOperationData[currentLanguage][currentVersion][category].introContent,
},
}

22
script/warm-before-tests.mjs Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env node
// [start-readme]
//
// It runs the warmServer() function because that function can do things
// like writing to disk as a caching mechanism.
// When jest runs tests, it starts multiple concurrent processes,
// even if it runs it serially (`--runInBand`) so it's highly likely
// that two concurrent processes both attempt to writing to
// the same exact file. By running this script before anything
// begins, we can be certain that files that should have been created
// are created.
//
// [end-readme]
import warmServer from '../lib/warm-server.js'
main()
async function main() {
await warmServer()
}

View File

@@ -17,13 +17,7 @@ const slugger = new GithubSlugger()
const contentDir = path.join(__dirname, '../../content')
describe('category pages', () => {
let siteData
beforeAll(async () => {
// Load the English site data
const allSiteData = await loadSiteData()
siteData = allSiteData.en.site
})
const siteData = loadSiteData().en.site
const walkOptions = {
globs: ['*/index.md', 'enterprise/*/index.md'],

View File

@@ -1,10 +1,7 @@
import loadSiteData from '../../lib/site-data.js'
describe('glossaries', () => {
let glossaries
beforeAll(async () => {
glossaries = (await loadSiteData()).en.site.data.glossaries
})
const glossaries = loadSiteData().en.site.data.glossaries
test('are broken into external, internal, and candidates', async () => {
const keys = Object.keys(glossaries)
@@ -41,7 +38,7 @@ describe('glossaries', () => {
})
test('non-English external glossary is in correct order', async () => {
const vals = (await loadSiteData()).ja.site.data.glossaries.external
const vals = loadSiteData().ja.site.data.glossaries.external
vals.forEach((val, i) => {
expect(val.term.localeCompare(vals[i + 1], 'ja')).toBeGreaterThan(0)
})

View File

@@ -11,17 +11,12 @@ import { jest } from '@jest/globals'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
const siteData = loadSiteData()
const pages = (await loadPages()).filter((page) => page.languageCode === 'en')
describe('data references', () => {
jest.setTimeout(60 * 1000)
let data, pages
beforeAll(async () => {
data = await loadSiteData()
pages = await loadPages()
pages = pages.filter((page) => page.languageCode === 'en')
})
test('every data reference found in English content files is defined and has a value', () => {
let errors = []
expect(pages.length).toBeGreaterThan(0)
@@ -30,7 +25,7 @@ describe('data references', () => {
const file = path.join('content', page.relativePath)
const pageRefs = getDataReferences(page.markdown)
pageRefs.forEach((key) => {
const value = get(data.en, key)
const value = get(siteData.en, key)
if (typeof value !== 'string') errors.push({ key, value, file })
})
})
@@ -50,7 +45,7 @@ describe('data references', () => {
const { data: metadata } = frontmatter(fileContents, { filepath: page.fullPath })
const metadataRefs = getDataReferences(JSON.stringify(metadata))
metadataRefs.forEach((key) => {
const value = get(data.en, key)
const value = get(siteData.en, key)
if (typeof value !== 'string') errors.push({ key, value, metadataFile })
})
})
@@ -62,7 +57,7 @@ describe('data references', () => {
test('every data reference found in English reusable files is defined and has a value', async () => {
let errors = []
const allReusables = data.en.site.data.reusables
const allReusables = siteData.en.site.data.reusables
const reusables = Object.values(allReusables)
expect(reusables.length).toBeGreaterThan(0)
@@ -78,7 +73,7 @@ describe('data references', () => {
const reusableRefs = getDataReferences(JSON.stringify(reusablesPerFile))
reusableRefs.forEach((key) => {
const value = get(data.en, key)
const value = get(siteData.en, key)
if (typeof value !== 'string') errors.push({ key, value, reusableFile })
})
})
@@ -90,7 +85,7 @@ describe('data references', () => {
test('every data reference found in English variable files is defined and has a value', async () => {
let errors = []
const allVariables = data.en.site.data.variables
const allVariables = siteData.en.site.data.variables
const variables = Object.values(allVariables)
expect(variables.length).toBeGreaterThan(0)
@@ -106,7 +101,7 @@ describe('data references', () => {
const variableRefs = getDataReferences(JSON.stringify(variablesPerFile))
variableRefs.forEach((key) => {
const value = get(data.en, key)
const value = get(siteData.en, key)
if (typeof value !== 'string') errors.push({ key, value, variableFile })
})
})

View File

@@ -1,21 +1,17 @@
import { fileURLToPath } from 'url'
import path from 'path'
import fs from 'fs'
import { get, isPlainObject, has } from 'lodash-es'
import flat from 'flat'
import walkSync from 'walk-sync'
import { ParseError } from 'liquidjs'
import loadSiteData from '../../lib/site-data.js'
import patterns from '../../lib/patterns.js'
import { liquid } from '../../lib/render-content/index.js'
import walkSync from 'walk-sync'
const __dirname = path.dirname(fileURLToPath(import.meta.url))
describe('siteData module (English)', () => {
let data
beforeAll(async () => {
data = await loadSiteData()
})
const data = loadSiteData()
test('makes an object', async () => {
expect(isPlainObject(data)).toBe(true)
@@ -49,21 +45,6 @@ describe('siteData module (English)', () => {
expect(reusable.includes('任意のページの左上で')).toBe(true)
})
test('backfills missing translated site data with English values', async () => {
const newFile = path.join(__dirname, '../../data/newfile.yml')
fs.writeFileSync(newFile, 'newvalue: bar')
try {
const data = loadSiteData()
expect(get(data, 'en.site.data.newfile.newvalue')).toEqual('bar')
expect(get(data, 'ja.site.data.newfile.newvalue')).toEqual('bar')
} finally {
// If an error is thrown above, it will still "bubble up"
// to the jest reporter, but we still always need to clean up
// the temporary file.
fs.unlinkSync(newFile)
}
})
test('all Liquid tags are valid', async () => {
const dataMap = flat(data)
for (const key in dataMap) {

View File

@@ -25,6 +25,7 @@ import allowedVersionOperators from '../../lib/liquid-tags/ifversion-supported-o
import semver from 'semver'
import { jest } from '@jest/globals'
import { getDiffFiles } from '../helpers/diff-files.js'
import loadSiteData from '../../lib/site-data.js'
jest.useFakeTimers('legacy')
@@ -410,6 +411,9 @@ if (
describe('lint markdown content', () => {
if (mdToLint.length < 1) return
const siteData = loadSiteData()
describe.each(mdToLint)('%s', (markdownRelPath, markdownAbsPath) => {
let content,
ast,
@@ -453,12 +457,14 @@ describe('lint markdown content', () => {
}
})
const context = { site: siteData.en.site }
// visit is not async-friendly so we need to do an async map to parse the YML snippets
yamlScheduledWorkflows = (
await Promise.all(
yamlScheduledWorkflows.map(async (snippet) => {
// If we don't parse the Liquid first, yaml loading chokes on {% raw %} tags
const rendered = await renderContent.liquid.parseAndRender(snippet)
const rendered = await renderContent.liquid.parseAndRender(snippet, context)
const parsed = yaml.load(rendered)
return parsed.on.schedule
})
@@ -1031,6 +1037,9 @@ describe('lint GHAE release notes', () => {
describe('lint learning tracks', () => {
if (learningTracksToLint.length < 1) return
const siteData = loadSiteData()
describe.each(learningTracksToLint)('%s', (yamlRelPath, yamlAbsPath) => {
let dictionary
let dictionaryError = false
@@ -1066,7 +1075,7 @@ describe('lint learning tracks', () => {
const productVersions = getApplicableVersions(data.versions, productTocPath)
const featuredTracks = {}
const context = { enterpriseServerVersions }
const context = { enterpriseServerVersions, site: siteData.en.site }
// For each of the product's versions, render the learning track data and look for a featured track.
await Promise.all(

View File

@@ -120,7 +120,6 @@ describe('breadcrumbs', () => {
const breadcrumbs = await getJSON('/en/github?json=breadcrumbs')
const expected = [
{
documentType: 'product',
href: '/en/github',
title: 'GitHub',
},
@@ -134,17 +133,14 @@ describe('breadcrumbs', () => {
)
const expected = [
{
documentType: 'product',
href: '/en/issues',
title: 'GitHub Issues',
},
{
documentType: 'category',
href: '/en/issues/tracking-your-work-with-issues',
title: 'Issues',
},
{
documentType: 'article',
href: '/en/issues/tracking-your-work-with-issues/quickstart',
title: 'Quickstart for GitHub Issues',
},
@@ -158,17 +154,14 @@ describe('breadcrumbs', () => {
)
const expected = [
{
documentType: 'product',
href: '/en/account-and-profile',
title: 'Account and profile',
},
{
documentType: 'category',
href: '/en/account-and-profile/setting-up-and-managing-your-github-user-account',
title: 'User accounts',
},
{
documentType: 'mapTopic',
href: '/en/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings',
title: 'User account settings',
},
@@ -182,22 +175,18 @@ describe('breadcrumbs', () => {
)
const expected = [
{
documentType: 'product',
href: '/en/account-and-profile',
title: 'Account and profile',
},
{
documentType: 'category',
href: '/en/account-and-profile/setting-up-and-managing-your-github-user-account',
title: 'User accounts',
},
{
documentType: 'mapTopic',
href: '/en/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings',
title: 'User account settings',
},
{
documentType: 'article',
href: '/en/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/about-your-personal-dashboard',
title: 'Your personal dashboard',
},
@@ -211,17 +200,14 @@ describe('breadcrumbs', () => {
)
const expected = [
{
documentType: 'product',
href: '/en/github',
title: 'GitHub',
},
{
documentType: 'category',
href: '/en/github/site-policy',
title: 'Site policy',
},
{
documentType: 'article',
href: '/en/github/site-policy/github-privacy-statement',
title: 'GitHub Privacy Statement',
},

View File

@@ -1,8 +1,6 @@
import languages from '../../lib/languages.js'
import robotsParser from 'robots-parser'
import robotsMiddleware from '../../middleware/robots.js'
import { get } from '../helpers/supertest.js'
import MockExpressResponse from 'mock-express-response'
import { jest } from '@jest/globals'
describe('robots.txt', () => {
@@ -36,17 +34,12 @@ describe('robots.txt', () => {
})
it('disallows indexing of azurecontainer.io domains', async () => {
const req = {
hostname: 'docs-internal-preview-12345-asdfz.azurecontainer.io',
path: '/robots.txt',
}
const res = new MockExpressResponse()
const next = () => {
/* no op */
}
await robotsMiddleware(req, res, next)
expect(res._getString()).toEqual('User-agent: *\nDisallow: /')
const res = await get('/robots.txt', {
headers: {
host: 'docs-internal-preview-12345-asdfz.azurecontainer.io',
},
})
expect(res.text).toEqual('User-agent: *\nDisallow: /')
})
it('does not have duplicate lines', () => {

View File

@@ -1,9 +1,11 @@
import supertest from 'supertest'
import { describe, jest, test } from '@jest/globals'
import createApp from '../../lib/app.js'
import enterpriseServerReleases from '../../lib/enterprise-server-releases.js'
import { get, getDOM } from '../helpers/supertest.js'
import { SURROGATE_ENUMS } from '../../middleware/set-fastly-surrogate-key.js'
import supertest from 'supertest'
import { jest } from '@jest/globals'
import { PREFERRED_LOCALE_COOKIE_NAME } from '../../middleware/detect-language.js'
jest.useFakeTimers('legacy')
@@ -89,6 +91,73 @@ describe('enterprise deprecation', () => {
})
})
// Starting with the deprecation of 3.0, it's the first time we deprecate
// enterprise versions since redirects is a *function* rather than a
// lookup in a big object.
describe('recently deprecated redirects', () => {
test('basic enterprise 3.0 redirects', async () => {
const res = await get('/enterprise/3.0')
expect(res.statusCode).toBe(302)
expect(res.headers.location).toBe('/en/enterprise-server@3.0')
expect(res.headers['set-cookie']).toBeUndefined()
// Deliberately no cache control because it is user-dependent
expect(res.headers['cache-control']).toBe('private, no-store')
})
test('basic enterprise 3.0 redirects by cookie', async () => {
const res = await get('/enterprise/3.0', {
headers: {
Cookie: `${PREFERRED_LOCALE_COOKIE_NAME}=ja`,
},
})
expect(res.statusCode).toBe(302)
expect(res.headers.location).toBe('/ja/enterprise-server@3.0')
})
test('already languaged enterprise 3.0 redirects', async () => {
const res = await get('/en/enterprise/3.0')
expect(res.statusCode).toBe(301)
expect(res.headers.location).toBe('/en/enterprise-server@3.0')
// 301 redirects are safe to cache aggressively
expect(res.headers['set-cookie']).toBeUndefined()
expect(res.headers['cache-control']).toContain('public')
expect(res.headers['cache-control']).toMatch(/max-age=\d+/)
})
test('redirects enterprise-server 3.0 with actual redirect without language', async () => {
const res = await get(
'/enterprise-server@3.0/github/getting-started-with-github/githubs-products'
)
expect(res.statusCode).toBe(302)
expect(res.headers['set-cookie']).toBeUndefined()
// Deliberately no cache control because it is user-dependent
expect(res.headers['cache-control']).toBe('private, no-store')
// This is based on
// https://github.com/github/help-docs-archived-enterprise-versions/blob/master/3.0/redirects.json
expect(res.headers.location).toBe(
'/en/enterprise-server@3.0/get-started/learning-about-github/githubs-products'
)
})
test('redirects enterprise-server 3.0 with actual redirect with language', async () => {
const res = await get(
'/ja/enterprise-server@3.0/github/getting-started-with-github/githubs-products'
)
expect(res.statusCode).toBe(301)
expect(res.headers['set-cookie']).toBeUndefined()
expect(res.headers['cache-control']).toContain('public')
expect(res.headers['cache-control']).toMatch(/max-age=\d+/)
// This is based on
// https://github.com/github/help-docs-archived-enterprise-versions/blob/master/3.0/redirects.json
expect(res.headers.location).toBe(
'/ja/enterprise-server@3.0/get-started/learning-about-github/githubs-products'
)
})
test('follow redirects enterprise-server 3.0 with actual redirect without language', async () => {
const res = await get(
'/enterprise-server@3.0/github/getting-started-with-github/githubs-products',
{ followAllRedirects: true }
)
expect(res.statusCode).toBe(200)
})
})
describe('deprecation banner', () => {
test('renders a deprecation warning banner on oldest supported Enterprise version', async () => {
const $ = await getDOM(`/en/enterprise/${enterpriseServerReleases.oldestSupported}`)

View File

@@ -1,6 +1,36 @@
import getRedirect from '../../lib/get-redirect.js'
import { describe, expect, test } from '@jest/globals'
import getRedirect, { splitPathByLanguage } from '../../lib/get-redirect.js'
import { latest } from '../../lib/enterprise-server-releases.js'
describe('splitPathByLanguage', () => {
test('basic', () => {
const [language, withoutLanguage] = splitPathByLanguage('/foo/')
expect(language).toBe('en')
expect(withoutLanguage).toBe('/foo/')
})
test('already has /en in it', () => {
const [language, withoutLanguage] = splitPathByLanguage('/en/foo/')
expect(language).toBe('en')
expect(withoutLanguage).toBe('/foo/')
})
test('basic with different fallback', () => {
const [language, withoutLanguage] = splitPathByLanguage('/foo/', 'ja')
expect(language).toBe('ja')
expect(withoutLanguage).toBe('/foo/')
})
test('already has /en different fallback', () => {
const [language, withoutLanguage] = splitPathByLanguage('/en/foo/', 'ja')
expect(language).toBe('en')
expect(withoutLanguage).toBe('/foo/')
})
test('unrecognized prefix is ignored', () => {
const [language, withoutLanguage] = splitPathByLanguage('/sv/foo/')
expect(language).toBe('en')
expect(withoutLanguage).toBe('/sv/foo/')
})
})
describe('getRedirect basics', () => {
it('should sometimes not correct the version prefix', () => {
// This essentially tests legacy entries that come from the
@@ -162,4 +192,15 @@ describe('getRedirect basics', () => {
ctx.userLanguage = null
expect(getRedirect('/foo', ctx)).toBe(`/en/bar`)
})
it('should work for some deprecated enterprise-server URLs too', () => {
// Starting with enterprise-server 3.0, we have made redirects become
// a *function* rather than a lookup on a massive object.
const ctx = {
pages: {},
redirects: {},
}
expect(getRedirect('/enterprise/3.0', ctx)).toBe('/en/enterprise-server@3.0')
expect(getRedirect('/enterprise/3.0/foo', ctx)).toBe('/en/enterprise-server@3.0/foo')
})
})

View File

@@ -191,11 +191,7 @@ describe('liquid template parser', () => {
// Create a fake req so we can test the feature versions middleware
const req = { language: 'en', query: {} }
let siteData
beforeAll(async () => {
const allSiteData = await loadSiteData()
siteData = allSiteData.en.site
})
const siteData = loadSiteData().en.site
test('does not render in FPT because feature is not available in FPT', async () => {
req.context = {

View File

@@ -19,6 +19,8 @@ shortTitle: Contribuciones faltantes
La gráfica de contribuciones en tu perfil es un registro de las contribuciones que has hecho en los repositorios {% ifversion ghae %}que le pertenecen{% else %}de{% endif %} {% data variables.product.product_location %}. Las contribuciones son registros horarios de acuerdo a la zona horaria universal coordinada (UTC) en lugar de tu zona horaria local. Las contribuciones solo se cuentan si cumplen con determinados criterios. En algunos casos, necesitamos reconstruir tu gráfico para que aparezcan las contribuciones.
If you are part of an organization that uses SAML single sign-on (SSO), you wont be able to see contribution activity from the organization on your profile if you do not have an active SSO session. People viewing your profile from outside your organization will see anonymized contribution activity of your contribution activity for your organization.
## Contribuciones que se cuentan
### Propuestas, solicitudes de cambios y debates

View File

@@ -78,6 +78,12 @@ Puedes administrar el servicio de ejecutor en la aplicación de **Servicios** de
```
{% endmac %}
The command takes an optional `user` argument to install the service as a different user.
```shell
./svc.sh install --user <em>USERNAME</em>
```
## Iniciar el servicio
Inicia el servicio con el siguiente comando:

View File

@@ -41,7 +41,9 @@ Cuando habilitas {% data variables.product.prodname_github_connect %}, configura
To use {% data variables.product.prodname_github_connect %}, you must have an organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} that uses {% data variables.product.prodname_ghe_cloud %}. You may already have {% data variables.product.prodname_ghe_cloud %} included in your plan. {% data reusables.enterprise.link-to-ghec-trial %}
{% ifversion ghes %}
To configure a connection, your proxy configuration must allow connectivity to `github.com`, `api.github.com`, and `uploads.github.com`. Para obtener más información, consulta "[Configuring an outbound web proxy server](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-an-outbound-web-proxy-server)."
If your organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} uses IP allow lists, you must add the IP address or network for {% data variables.product.product_location %} to your IP allow list on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Managing allowed IP addresses for your organization](/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization)" and "[Enforcing policies for security settings in your enterprise](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-allowed-ip-addresses-for-organizations-in-your-enterprise)" in the {% data variables.product.prodname_ghe_cloud %} documentation.
To configure a connection, your proxy configuration must allow connectivity to `github.com`, `api.github.com`, and `uploads.github.com`. For more information, see "[Configuring an outbound web proxy server](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-an-outbound-web-proxy-server)."
{% endif %}
## Habilitar {% data variables.product.prodname_github_connect %}
@@ -69,7 +71,7 @@ Si estás conectando {% data variables.product.product_location %} a una organiz
Los propietarios de empresas pueden inhabilitar {% data variables.product.prodname_github_connect %}.
Cuando te desconectas de {% data variables.product.prodname_ghe_cloud %}, se elimina la {% data variables.product.prodname_github_connect %} {% data variables.product.prodname_github_app %} de tu cuenta de empresa u organización, y las credenciales almacenadas en {% data variables.product.product_location %} se eliminan.
When you disconnect from {% data variables.product.prodname_ghe_cloud %}, the {% data variables.product.prodname_github_connect %} {% data variables.product.prodname_github_app %} is deleted from your enterprise account or organization and credentials stored on {% data variables.product.product_location %} are deleted.
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.github-connect-tab %}

View File

@@ -33,8 +33,6 @@ redirect_from:
{% data reusables.saml.about-saml-access-enterprise-account %}Para obtener más información, consulta la sección "[Visualizar y administrar el acceso de SAML de un usuario a tu cuenta empresarial](/admin/user-management/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise)".
{% data reusables.saml.cannot-update-existing-saml-settings %}
{% data reusables.saml.saml-disabled-linked-identities-removed %}
{% data reusables.scim.enterprise-account-scim %}

View File

@@ -25,7 +25,11 @@ Con {% data variables.product.prodname_emus %}, tu empresa utiliza el SSO de SAM
Después de que configures el SSO de SAML, te recomendamos que almacenes tus códigos de recuperación para que puedas recuperar el acceso a tu empresa en caso de que no esté disponible tu proveedor de identidad.
{% data reusables.saml.cannot-update-existing-saml-settings %}
{% note %}
**Note:** When SAML SSO is enabled, the only setting you can update on {% data variables.product.prodname_dotcom %} for your existing SAML configuration is the SAML certificate. If you need to update the Sign on URL or Issuer, you must first disable SAML SSO and then reconfigure SAML SSO with the new settings.
{% endnote %}
## Configurar el inicio de sesión único de SAML para {% data variables.product.prodname_emus %}

View File

@@ -76,6 +76,8 @@ Para configurar el aprovisionamiento, el usuario de configuración con el nombre
Después de haber configurado el SSO de SAML y el aprovisionamiento, podrás aprovisionar usuarios nuevos en {% data variables.product.prodname_dotcom_the_website %} asignando a los usuarios a la aplicación de {% data variables.product.prodname_emu_idp_application %}.
{% data reusables.scim.emu-scim-rate-limit %}
You can also automatically manage organization membership by assigning groups to the application and adding them to the "Push Groups" tab in Okta. When the group is provisioned successfully, it will be available to connect to teams in the enterprise's organizations. Para obtener más información sobre cómo administrar los equipos, consulta la sección "[Administrar las membrecías de los quipos con grupos de proveedor de identidad](/github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/managing-team-memberships-with-identity-provider-groups)".
Cuando asignas usuarios, puedes utilizar el atributo de "Roles" en la aplicación de {% data variables.product.prodname_emu_idp_application %} para configurar el rol de un usuario en tu empresa en {% data variables.product.product_name %}. Para obtener más información sobre los roles, consulta la sección "[Roles en una empresa](/github/setting-up-and-managing-your-enterprise/managing-users-in-your-enterprise/roles-in-an-enterprise)".

View File

@@ -51,6 +51,8 @@ Para configurar el aprovisionamiento de tu {% data variables.product.prodname_em
Después de crear tu token de acceso personal y almacenarlo de forma segura, puedes configurar el aprovisionamiento en tu proveedor de identidad.
{% data reusables.scim.emu-scim-rate-limit %}
Para configurar a Azure Active Directory para que aprovisione usuarios para tu {% data variables.product.prodname_emu_enterprise %}, consulta el [Tutorial: Configurar a los Usuarios Administrados Empresariales de Github para un aprovisionamiento de usuarios automático](https://docs.microsoft.com/en-us/azure/active-directory/saas-apps/github-enterprise-managed-user-provisioning-tutorial) en la documentación de Azure AD.
Para configurar Okta para que aprovisione usuarios para tu {% data variables.product.prodname_emu_enterprise %}, consulta la sección "[Configurar el aprovisionamiento de SCIM para los Usuarios Administrados Empresariales con Okta](/github/setting-up-and-managing-your-enterprise/managing-your-enterprise-users-with-your-identity-provider/configuring-scim-provisioning-for-enterprise-managed-users-with-okta)".

View File

@@ -69,7 +69,7 @@ You can restrict network traffic to your enterprise on {% data variables.product
{% elsif ghec %}
Enterprise owners can restrict access to assets owned by organizations in an enterprise by configuring an allow list for specific IP addresses. {% data reusables.identity-and-permissions.ip-allow-lists-example-and-restrictions %}
Enterprise owners can restrict access to private assets owned by organizations in an enterprise by configuring an allow list for specific IP addresses. {% data reusables.identity-and-permissions.ip-allow-lists-example-and-restrictions %}
{% data reusables.identity-and-permissions.ip-allow-lists-cidr-notation %}

View File

@@ -47,7 +47,7 @@ Si tu empresa utiliza {% data variables.product.prodname_emus %}, solo se pueden
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.people-tab %}
1. En la barra lateral izquierda, haz clic en **Administrators** (Administradores). ![Pestaña Administrators (Administradores) en la barra lateral izquierda](/assets/images/help/business-accounts/administrators-tab.png)
{% data reusables.enterprise-accounts.administrators-tab %}
1. Sobre la lista de administradores, haz clic en {% ifversion ghec %}**Invitar administrador**{% elsif ghes %}**Agregar propietario**{% endif %}.
{% ifversion ghec %}
![botón de "invitar administrador" sobre la lista de propietarios empresariales](/assets/images/help/business-accounts/invite-admin-button.png)
@@ -65,10 +65,11 @@ Solo los propietarios de empresa pueden eliminar a otros administradores de empr
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.people-tab %}
1. Junto al nombre de usuario de la persona que te gustaría eliminar, haz clic en {% octicon "gear" aria-label="The Settings gear" %}, luego en **Eliminar propietario**{% ifversion ghec %} o **Eliminar gerente de facturación**{% endif %}.
{% data reusables.enterprise-accounts.administrators-tab %}
1. Next to the username of the person you'd like to remove, click {% octicon "gear" aria-label="The Settings gear" %}, then click {% ifversion ghes %}**Remove owner**{% elsif ghec %}**Convert to member**{% endif %}.
{% ifversion ghec %}
![Parámetros con opción del menú para eliminar un administrador de empresa](/assets/images/help/business-accounts/remove-admin.png)
{% elsif ghes %}
![Parámetros con opción del menú para eliminar un administrador de empresa](/assets/images/help/business-accounts/ghes-remove-owner.png)
{% endif %}
1. Lee la confirmación y luego haz clic en **Eliminar propietario**{% ifversion ghec %} o **Eliminar gerente de facturación**{% endif %}.
1. Read the confirmation, then click {% ifversion ghes %}**Remove owner**{% elsif ghec %}**Yes, convert USERNAME to member**{% endif %}.

View File

@@ -52,6 +52,13 @@ Si bajas tu organización de nivel desde {% data variables.product.prodname_team
Si bajas a tu organización de nivel desde {% data variables.product.prodname_ghe_cloud %} a {% data variables.product.prodname_team %} o {% data variables.product.prodname_free_team %}, la cuenta perderá acceso a los controles avanzados de seguridad, cumplimiento y despliegue. {% data reusables.gated-features.more-info %}
{% note %}
**Note:** If you're currently trialing {% data variables.product.prodname_ghe_cloud %}, and you don't purchase {% data variables.product.prodname_enterprise %} before the trial ends, your organization will be automatically downgraded to {% data variables.product.prodname_free_team %} or {% data variables.product.prodname_team %}. Para obtener más información, consulta "[Configurar una prueba de {% data variables.product.prodname_ghe_cloud %}](/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-cloud#finishing-your-trial)".
{% endnote %}
{% data reusables.organizations.billing-settings %}
1. Debajo de "Plan actual", utiliza el menú desplegable **Editar** y haz clic en la opción a la que quieras bajar. ![Botón Bajar de categoría](/assets/images/help/billing/downgrade-option-button.png)
{% data reusables.dotcom_billing.confirm_cancel_org_plan %}

View File

@@ -16,6 +16,8 @@ shortTitle: Configuración
Esta guía te muestra cómo tu equipo puede obtener suscriptores de {% data variables.product.prodname_vs %} con licencia y comenzar a utilizar {% data variables.product.prodname_enterprise %}.
If you prefer video, you can watch [Setting up your {% data variables.product.prodname_enterprise %} licenses with {% data variables.product.prodname_vs %} subscriptions](https://www.youtube.com/watch?v=P_zBgp_BE_I) on Microsoft Visual Studio's YouTube channel.
## Roles para {% data variables.product.prodname_vss_ghe %}
Antes de configurar {% data variables.product.prodname_vss_ghe %}, es importante entender los roles para esta oferta combinada.

View File

@@ -105,7 +105,7 @@ Any valid SARIF 2.1.0 output file can be uploaded, however, {% data variables.pr
| `properties.tags[]` | **Optional.** An array of strings. {% data variables.product.prodname_code_scanning_capc %} uses `tags` to allow you to filter results on {% data variables.product.prodname_dotcom %}. For example, it is possible to filter to all results that have the tag `security`.
| `properties.precision` | **Recommended.** A string that indicates how often the results indicated by this rule are true. For example, if a rule has a known high false-positive rate, the precision should be `low`. {% data variables.product.prodname_code_scanning_capc %} orders results by precision on {% data variables.product.prodname_dotcom %} so that the results with the highest `level`, and highest `precision` are shown first. Can be one of: `very-high`, `high`, `medium`, or `low`. {% ifversion fpt or ghes > 3.1 or ghae or ghec %}
| `properties.problem.severity` | **Recommended.** A string that indicates the level of severity of any alerts generated by a non-security query. This, with the `properties.precision` property, determines whether the results are displayed by default on {% data variables.product.prodname_dotcom %} so that the results with the highest `problem.severity`, and highest `precision` are shown first. Can be one of: `error`, `warning`, or `recommendation`.
| `properties.security-severity` | **Recommended.** A score that indicates the level of severity, between 0.0 and 10.0, for security queries (`@tags` includes `security`). This, with the `properties.precision` property, determines whether the results are displayed by default on {% data variables.product.prodname_dotcom %} so that the results with the highest `security-severity`, and highest `precision` are shown first. {% data variables.product.prodname_code_scanning_capc %} translates numerical scores as follows: over 9.0 is `critical`, 7.0 to 8.9 is `high`, 4.0 to 6.9 is `medium` and 3.9 or less is `low`. {% endif %}
| `properties.security-severity` | **Recommended.** A string representing a score that indicates the level of severity, between 0.0 and 10.0, for security queries (`@tags` includes `security`). This, with the `properties.precision` property, determines whether the results are displayed by default on {% data variables.product.prodname_dotcom %} so that the results with the highest `security-severity`, and highest `precision` are shown first. {% data variables.product.prodname_code_scanning_capc %} translates numerical scores as follows: over 9.0 is `critical`, 7.0 to 8.9 is `high`, 4.0 to 6.9 is `medium` and 3.9 or less is `low`. {% endif %}
### `result` object
@@ -114,7 +114,7 @@ Any valid SARIF 2.1.0 output file can be uploaded, however, {% data variables.pr
| Name | Description |
|----|----|
| `ruleId`| **Optional.** The unique identifier of the rule (`reportingDescriptor.id`). For more information, see the [`reportingDescriptor` object](#reportingdescriptor-object). {% data variables.product.prodname_code_scanning_capc %} uses the rule identifier to filter results by rule on {% data variables.product.prodname_dotcom %}.
| `ruleIndex`| **Optional.** The index of the associated rule (`reportingDescriptor` object) in the tool component `rules` array. For more information, see the [`run` object](#run-object).
| `ruleIndex`| **Optional.** The index of the associated rule (`reportingDescriptor` object) in the tool component `rules` array. For more information, see the [`run` object](#run-object). The allowed range for this property 0 to 2^63 - 1.
| `rule`| **Optional.** A reference used to locate the rule (reporting descriptor) for this result. For more information, see the [`reportingDescriptor` object](#reportingdescriptor-object).
| `level`| **Optional.** The severity of the result. This level overrides the default severity defined by the rule. {% data variables.product.prodname_code_scanning_capc %} uses the level to filter results by severity on {% data variables.product.prodname_dotcom %}.
| `message.text`| **Required.** A message that describes the result. {% data variables.product.prodname_code_scanning_capc %} displays the message text as the title of the result. Only the first sentence of the message will be displayed when visible space is limited.
@@ -129,7 +129,7 @@ A location within a programming artifact, such as a file in the repository or a
| Name | Description |
|----|----|
| `location.id` | **Optional.** A unique identifier that distinguishes this location from all other locations within a single result object.
| `location.id` | **Optional.** A unique identifier that distinguishes this location from all other locations within a single result object. The allowed range for this property 0 to 2^63 - 1.
| `location.physicalLocation` | **Required.** Identifies the artifact and region. For more information, see the [`physicalLocation`](#physicallocation-object).
| `location.message.text` | **Optional.** A message relevant to the location.

View File

@@ -67,7 +67,6 @@ includeGuides:
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/listing-dependencies-configured-for-version-updates
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-pull-requests-for-dependency-updates
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/upgrading-from-dependabotcom-to-github-native-dependabot
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-managing-vulnerable-dependencies

View File

@@ -7,6 +7,7 @@ redirect_from:
- /github/administering-a-repository/about-github-dependabot-version-updates
- /github/administering-a-repository/about-dependabot-version-updates
- /code-security/supply-chain-security/about-dependabot-version-updates
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/upgrading-from-dependabotcom-to-github-native-dependabot
versions:
fpt: '*'
ghec: '*'

View File

@@ -15,7 +15,6 @@ topics:
- Pull requests
children:
- /about-dependabot-version-updates
- /upgrading-from-dependabotcom-to-github-native-dependabot
- /enabling-and-disabling-dependabot-version-updates
- /listing-dependencies-configured-for-version-updates
- /managing-pull-requests-for-dependency-updates

View File

@@ -1,54 +0,0 @@
---
title: Upgrading from Dependabot.com to GitHub-native Dependabot
intro: You can upgrade to GitHub-native Dependabot by merging a pull request that will allow your dependencies to continue being updated.
versions:
fpt: '*'
ghec: '*'
type: how_to
topics:
- Repositories
- Dependabot
- Version updates
- Dependencies
redirect_from:
- /code-security/supply-chain-security/upgrading-from-dependabotcom-to-github-native-dependabot
shortTitle: Dependabot.com upgrades
---
{% warning %}
Dependabot Preview has been shut down as of August 3rd, 2021. In order to keep getting Dependabot updates, please migrate to GitHub-native Dependabot.
Open pull requests from Dependabot Preview will remain open, including the pull request to upgrade to GitHub-native Dependabot, but the bot itself will no longer work on your {% data variables.product.prodname_dotcom %} accounts and organizations.
{% endwarning %}
## About upgrading from Dependabot Preview to {% data variables.product.prodname_dotcom %}-native {% data variables.product.prodname_dependabot %}
Dependabot Preview has been built directly into {% data variables.product.prodname_dotcom %}, so you can use {% data variables.product.prodname_dependabot %} alongside all the other functionality in {% data variables.product.prodname_dotcom %} without having to install and use a separate application. By migrating to {% data variables.product.prodname_dotcom %}-native {% data variables.product.prodname_dependabot %}, we can also focus on bringing lots of exciting new features to {% data variables.product.prodname_dependabot %}, including more [ecosystem updates](https://github.com/github/roadmap/issues/150), [improved notifications](https://github.com/github/roadmap/issues/133), and {% data variables.product.prodname_dependabot %} support for [{% data variables.product.prodname_ghe_server %}](https://github.com/github/roadmap/issues/86) and [{% data variables.product.prodname_ghe_managed %}](https://github.com/github/roadmap/issues/135).
## Differences between Dependabot Preview and {% data variables.product.prodname_dotcom %}-native {% data variables.product.prodname_dependabot %}
While most of the Dependabot Preview features exist in {% data variables.product.prodname_dotcom %}-native {% data variables.product.prodname_dependabot %}, a few remain unavailable:
- **Live updates:** We hope to bring these back in the future. For now, you can run {% data variables.product.prodname_dotcom %} {% data variables.product.prodname_dependabot %} daily to catch new packages within one day of release.
- **PHP environment variable registries:** For projects that rely on the `ACF_PRO_KEY` environment variable, you may be able to vendor your licensed copy of the Advanced Custom Fields plugin. For an example, see [dependabot/acf-php-example](https://github.com/dependabot/acf-php-example#readme). For other environment variables, you can use {% data variables.product.prodname_actions %} to fetch dependencies from these registries.
- **Auto-merge:** We always recommend verifying your dependencies before merging them; therefore, auto-merge will not be supported for the foreseeable future. For those of you who have vetted your dependencies, or are only using internal dependencies, we recommend adding third-party auto-merge apps, or setting up GitHub Actions to merge. We have provided the [`dependabot/fetch-metadata`](https://github.com/marketplace/actions/fetch-metadata-from-dependabot-prs) action to help developers [enable GitHub's automerge](https://github.com/dependabot/fetch-metadata/#enabling-auto-merge).
In {% data variables.product.prodname_dotcom %}-native {% data variables.product.prodname_dependabot %}, you can configure all version updates using the configuration file. This file is similar to the Dependabot Preview configuration file with a few changes and improvements that will be automatically included in your upgrade pull request. For more information about the upgrade pull request, see "[Upgrading to GitHub-native Dependabot](/code-security/supply-chain-security/upgrading-from-dependabotcom-to-github-native-dependabot#upgrading-to-github-native-dependabot)".
To see update logs for {% data variables.product.prodname_dotcom %}-native {% data variables.product.prodname_dependabot %} that were previously on the Dependabot.com dashboard:
1. Navigate to your repositorys **Insights** page.
2. Click **Dependency graph** to the left.
3. Click **{% data variables.product.prodname_dependabot %}**.
For more information about version updates with {% data variables.product.prodname_dotcom %}-native {% data variables.product.prodname_dependabot %}, see "[About Dependabot version updates](/code-security/supply-chain-security/about-dependabot-version-updates)."
## Upgrading to {% data variables.product.prodname_dotcom %}-native {% data variables.product.prodname_dependabot %}
Upgrading from Dependabot Preview to {% data variables.product.prodname_dotcom %}-native {% data variables.product.prodname_dependabot %} requires you to merge the *Upgrade to GitHub-native Dependabot* pull request in your repository. This pull request includes the updated configuration file needed for {% data variables.product.prodname_dotcom %}-native {% data variables.product.prodname_dependabot %}.
If you are using private repositories, you will have to grant Dependabot access to these repositories in your organization's security and analysis settings. For more information, see "[Allowing Dependabot to access private dependencies](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization#allowing-dependabot-to-access-private-dependencies)". Previously, Dependabot had access to all repositories within an organization, but we implemented this change because it is much safer to use the principle of least privilege for Dependabot.
If you are using private registries, you will have to add your existing Dependabot Preview secrets to your repository's or organization's "Dependabot secrets". For more information, see "[Managing encrypted secrets for Dependabot](/code-security/supply-chain-security/managing-encrypted-secrets-for-dependabot)".
If you have any questions or need help migrating, you can view or open issues in the [`dependabot/dependabot-core`](https://github.com/dependabot/dependabot-core/issues/new?assignees=%40dependabot%2Fpreview-migration-reviewers&labels=E%3A+preview-migration&template=migration-issue.md&title=) repository.

View File

@@ -57,7 +57,7 @@ Each {% data variables.product.prodname_dependabot %} alert has a unique numeric
1. Optionally, if there isn't already a {% data variables.product.prodname_dependabot_security_updates %} update for the alert, to create a pull request to resolve the vulnerability, click **Create {% data variables.product.prodname_dependabot %} security update**.
![Create {% data variables.product.prodname_dependabot %} security update button](/assets/images/help/repository/create-dependabot-security-update-button-ungrouped.png)
1. When you're ready to update your dependency and resolve the vulnerability, merge the pull request. Each pull request raised by {% data variables.product.prodname_dependabot %} includes information on commands you can use to control {% data variables.product.prodname_dependabot %}. For more information, see "[Managing pull requests for dependency updates](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-pull-requests-for-dependency-updates#managing-dependabot-pull-requests-with-comment-commands)."
1. Optionally, if the alert is being fixed, if it's incorrect, or located in unused code, select the "Dismiss" drop-down, and click a reason for dismissing the alert.
1. Optionally, if the alert is being fixed, if it's incorrect, or located in unused code, select the "Dismiss" dropdown, and click a reason for dismissing the alert.{% if reopen-dependabot-alerts %} Unfixed dismissed alerts can be reopened later.{% endif %}
![Choosing reason for dismissing the alert via the "Dismiss" drop-down](/assets/images/help/repository/dependabot-alert-dismiss-drop-down-ungrouped.png)
{% elsif ghes = 3.3 %}
@@ -94,6 +94,22 @@ Each {% data variables.product.prodname_dependabot %} alert has a unique numeric
![Dismiss security banner](/assets/images/enterprise/3.0/dependabot-alert-dismiss.png)
{% endif %}
{% if reopen-dependabot-alerts %}
## Viewing and updating closed alerts
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-security %}
{% data reusables.repositories.sidebar-dependabot-alerts %}
1. To just view closed alerts, click **Closed**.
![Screenshot showing the "Closed" option](/assets/images/help/repository/dependabot-alerts-closed.png)
1. Click the alert that you would like to view or update.
![Screenshot showing a highlighted dependabot alert](/assets/images/help/repository/dependabot-alerts-select-closed-alert.png)
2. Optionally, if the alert was dismissed and you wish to reopen it, click **Reopen**.
![Screenshot showing the "Reopen" button](/assets/images/help/repository/reopen-dismissed-alert.png)
{% endif %}
## Further reading
- "[About alerts for vulnerable dependencies](/code-security/supply-chain-security/about-alerts-for-vulnerable-dependencies)"{% ifversion fpt or ghec or ghes > 3.2 %}

View File

@@ -320,6 +320,16 @@ The pull request's `HEAD` branch was restored to the last known commit.
|:----------|:----------------:|:-----------------:|
| <ul><li>Pull requests</li></ul> | **X** | **X** |
## head_ref_force_pushed
The pull request's HEAD branch was force pushed.
### Availability
|Issue type | Issue events API | Timeline events API|
|:----------|:----------------:|:-----------------:|
| <ul><li>Pull requests</li></ul> | **X** | **X** |
### Event object properties
{% data reusables.issue-events.issue-event-common-properties %}

View File

@@ -1,6 +1,6 @@
---
title: Administrar las direcciones IP permitidas en tu organización
intro: Puedes restringir el acceso a los activos de tu organización si configuras una lista de direcciones IP que se pueden conectar a ella.
intro: You can restrict access to your organization's private assets by configuring a list of IP addresses that are allowed to connect.
product: '{% data reusables.gated-features.allowed-ip-addresses %}'
redirect_from:
- /github/setting-up-and-managing-organizations-and-teams/managing-allowed-ip-addresses-for-your-organization
@@ -19,7 +19,7 @@ Los propietarios de las organizaciones pueden administrar las direcciones IP per
## Acerca de las direcciones IP permitidas
Puedes restringir el acceso a los activos de la organización configurando un listado de direcciones IP específicas permitidas. {% data reusables.identity-and-permissions.ip-allow-lists-example-and-restrictions %}
You can restrict access to private organization assets by configuring an allow list for specific IP addresses. {% data reusables.identity-and-permissions.ip-allow-lists-example-and-restrictions %}
{% data reusables.identity-and-permissions.ip-allow-lists-cidr-notation %}
@@ -27,7 +27,7 @@ Puedes restringir el acceso a los activos de la organización configurando un li
Si configuras una lista de direcciones permitidas, también puedes elegir agregar automáticamente a ella cualquier dirección IP que hayas configurado para las {% data variables.product.prodname_github_apps %} que instales en tu organización. El creador de una {% data variables.product.prodname_github_app %} puede configurar una lista de direcciones permitidas para su aplicación, las cuales especifiquen las direcciones IP en las cuales se ejecuta esta. Al heredar la lista de direcciones permitidas en la tuya, estás evitando las solicitudes de conexión de la aplicación que se está rehusando. Para obtener más información, consulta la sección "[Permitir el acceso mediante {% data variables.product.prodname_github_apps %}](#allowing-access-by-github-apps)".
También puedes configurar las direcciones IP permitidas para las organizaciones en una cuenta empresarial. Para obtener más información, consulta la sección "[Requerir políticas para la configuración de seguridad en tu empresa](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise)".
También puedes configurar las direcciones IP permitidas para las organizaciones en una cuenta empresarial. Para obtener más información, consulta la sección "[Requerir políticas para la configuración de seguridad en tu empresa](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-allowed-ip-addresses-for-organizations-in-your-enterprise)".
## Agregar una dirección IP permitida

View File

@@ -109,11 +109,14 @@ Some of the features listed below are limited to organizations using {% data var
| Enable project boards | | | | **X** | **X** |
| Configure [pull request merges](/articles/configuring-pull-request-merges) | | | | **X** | **X** |
| Configure [a publishing source for {% data variables.product.prodname_pages %}](/articles/configuring-a-publishing-source-for-github-pages) | | | | **X** | **X** |
| [Manage branch protection rules](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule) | | | | | **X** |
| [Push to protected branches](/articles/about-protected-branches) | | | | **X** | **X** |
| Merge pull requests on protected branches, even if there are no approving reviews | | | | | **X** |{% ifversion fpt or ghes > 3.4 or ghae-issue-6337 or ghec %}
| Create tags that match a [tag protection rule](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-tag-protection-rules) | | | | **X** | **X** |
| Delete tags that match a [tag protection rule](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-tag-protection-rules) | | | | | **X** |{% endif %}
| [Create and edit repository social cards](/articles/customizing-your-repositorys-social-media-preview) | | | | **X** | **X** |{% ifversion fpt or ghec %}
| Limit [interactions in a repository](/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository)| | | | **X** | **X** |{% endif %}
| Delete an issue (see "[Deleting an issue](/articles/deleting-an-issue)") | | | | | **X** |
| Merge pull requests on protected branches, even if there are no approving reviews | | | | | **X** |
| [Define code owners for a repository](/articles/about-code-owners) | | | | | **X** |
| Add a repository to a team (see "[Managing team access to an organization repository](/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository#giving-a-team-access-to-a-repository)" for details) | | | | | **X** |
| [Manage outside collaborator access to a repository](/articles/adding-outside-collaborators-to-repositories-in-your-organization) | | | | | **X** |

View File

@@ -84,6 +84,8 @@ You can only choose an additional permission if it's not already included in the
- **Set interaction limits**: Temporarily restrict certain users from commenting, opening issues, or creating pull requests in your public repository to enforce a period of limited activity. For more information, see "[Limiting interactions in your repository](/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository)."
- **Set the social preview**: Add an identifying image to your repository that appears on social media platforms when your repository is linked. For more information, see "[Customizing your repository's social media preview](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/customizing-your-repositorys-social-media-preview)."
- **Push commits to protected branches**: Push to a branch that is marked as a protected branch.
- **Create protected tags**: Create tags that match a tag protection rule. For more information, see "[Configuring tag protection rules](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-tag-protection-rules)."
- **Delete protected tags**: Delete tags that match a tag protection rule. For more information, see "[Configuring tag protection rules](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-tag-protection-rules)."
### Security

View File

@@ -22,8 +22,6 @@ Si habilitas pero no exiges SAML SSO, los miembros de la organización que elija
{% data reusables.saml.saml-disabled-linked-identities-removed %}
{% data reusables.saml.cannot-update-existing-saml-settings %}
## Habilitar y probar el inicio de sesión único SAML para tu organización
Antes de requerir el SSO de SAML en tu organización, asegúrate de que la hayas preparado. Para obtener más información, consulta "[Preparación para exigir inicio de sesión único SAML en tu organización](/articles/preparing-to-enforce-saml-single-sign-on-in-your-organization)".

View File

@@ -36,10 +36,6 @@ When you enable auto assignment, any time your team has been requested to review
When code owners are automatically requested for review, the team is still removed and replaced with individuals unless a branch protection rule is configured to require review from code owners. If such a branch protection rule is in place, the team request cannot be removed and so the individual request will appear in addition.
{% ifversion fpt %}
To further enhance your team's collaboration abilities, you can upgrade to {% data variables.product.prodname_ghe_cloud %}, which includes features like protected branches and code owners on private repositories. {% data reusables.enterprise.link-to-ghec-trial %}
{% endif %}
### Routing algorithms
Code review assignments automatically choose and assign reviewers based on one of two possible algorithms.

View File

@@ -12,11 +12,11 @@ featuredLinks:
- /packages/learn-github-packages/installing-a-package
popular:
- /packages/working-with-a-github-packages-registry/working-with-the-npm-registry
- '{% ifversion fpt %}/packages/working-with-a-github-packages-registry/working-with-the-container-registry{% else %}/packages/working-with-a-github-packages-registry/working-with-the-docker-registry{% endif %}'
- '{% ifversion fpt or ghec%}/packages/working-with-a-github-packages-registry/working-with-the-container-registry{% else %}/packages/working-with-a-github-packages-registry/working-with-the-docker-registry{% endif %}'
- /packages/learn-github-packages
- /packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry
guideCards:
- '{% ifversion fpt %}/packages/working-with-a-github-packages-registry/working-with-the-container-registry{% else %}/packages/working-with-a-github-packages-registry/working-with-the-docker-registry{% endif %}'
- '{% ifversion fpt or ghec %}/packages/working-with-a-github-packages-registry/working-with-the-container-registry{% else %}/packages/working-with-a-github-packages-registry/working-with-the-docker-registry{% endif %}'
- /packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry
changelog:
label: packages

View File

@@ -1,6 +1,6 @@
---
title: Working with the Docker registry
intro: '{% ifversion fpt or ghec %}The Docker registry has now been replaced by the {% data variables.product.prodname_container_registry %}.{% else %}You can push and pull your Docker images using the {% data variables.product.prodname_registry %} Docker registry, which uses the package namespace `https://docker.pkg.github.com`.{% endif %}'
intro: '{% ifversion fpt or ghec %}The Docker registry has now been replaced by the {% data variables.product.prodname_container_registry %}.{% else %}You can push and pull your Docker images using the {% data variables.product.prodname_registry %} Docker registry.{% endif %}'
product: '{% data reusables.gated-features.packages %}'
redirect_from:
- /articles/configuring-docker-for-use-with-github-package-registry

View File

@@ -92,21 +92,21 @@ If you choose the `/docs` folder of any branch as your publishing source, {% dat
## Limits on use of {% data variables.product.prodname_pages %}
{% ifversion fpt or ghec %}
{% data variables.product.prodname_pages %} sites created after June 15, 2016 and using `github.io` domains are served over HTTPS. If you created your site before June 15, 2016, you can enable HTTPS support for traffic to your site. For more information, see "[Securing your {% data variables.product.prodname_pages %} with HTTPS](/articles/securing-your-github-pages-site-with-https)."
{% data variables.product.prodname_pages %} sites created after June 15, 2016, and using `github.io` domains are served over HTTPS. If you created your site before June 15, 2016, you can enable HTTPS support for traffic to your site. For more information, see "[Securing your {% data variables.product.prodname_pages %} with HTTPS](/articles/securing-your-github-pages-site-with-https)."
### Prohibited uses
{% endif %}
{% data variables.product.prodname_pages %} is not intended for or allowed to be used as a free web hosting service to run your online business, e-commerce site, or any other website that is primarily directed at either facilitating commercial transactions or providing commercial software as a service (SaaS). {% data reusables.pages.no_sensitive_data_pages %}
{% data variables.product.prodname_pages %} is not intended for or allowed to be used as a free web-hosting service to run your online business, e-commerce site, or any other website that is primarily directed at either facilitating commercial transactions or providing commercial software as a service (SaaS). {% data reusables.pages.no_sensitive_data_pages %}
In addition, your use of {% data variables.product.prodname_pages %} is subject to the [GitHub Terms of Service](/free-pro-team@latest/github/site-policy/github-terms-of-service/), including the restrictions on get rich quick schemes, sexually obscene content, and violent or threatening content or activity.
In addition, your use of {% data variables.product.prodname_pages %} is subject to the [GitHub Terms of Service](/free-pro-team@latest/github/site-policy/github-terms-of-service/), including the restrictions on get-rich-quick schemes, sexually obscene content, and violent or threatening content or activity.
### Usage limits
{% data variables.product.prodname_pages %} sites are subject to the following usage limits:
- {% data variables.product.prodname_pages %} source repositories have a recommended limit of 1GB.{% ifversion fpt or ghec %} For more information, see "[What is my disk quota?"](/articles/what-is-my-disk-quota/#file-and-repository-size-limitations){% endif %}
- {% data variables.product.prodname_pages %} source repositories have a recommended limit of 1 GB.{% ifversion fpt or ghec %} For more information, see "[What is my disk quota?](/articles/what-is-my-disk-quota/#file-and-repository-size-limitations)"{% endif %}
- Published {% data variables.product.prodname_pages %} sites may be no larger than 1 GB.
{% ifversion fpt or ghec %}
- {% data variables.product.prodname_pages %} sites have a *soft* bandwidth limit of 100GB per month.
- {% data variables.product.prodname_pages %} sites have a *soft* bandwidth limit of 100 GB per month.
- {% data variables.product.prodname_pages %} sites have a *soft* limit of 10 builds per hour.
If your site exceeds these usage quotas, we may not be able to serve your site, or you may receive a polite email from {% data variables.contact.contact_support %} suggesting strategies for reducing your site's impact on our servers, including putting a third-party content distribution network (CDN) in front of your site, making use of other {% data variables.product.prodname_dotcom %} features such as releases, or moving to a different hosting service that might better fit your needs.

View File

@@ -35,13 +35,13 @@ Before you can push the original repository to your new copy, or _mirror_, of th
```
3. Mirror-push to the new repository.
```shell
$ cd <em>old-repository</em>
$ cd <em>old-repository.git</em>
$ git push --mirror https://{% data variables.command_line.codeblock %}/<em>exampleuser</em>/<em>new-repository</em>.git
```
4. Remove the temporary local repository you created earlier.
```shell
$ cd ..
$ rm -rf <em>old-repository</em>
$ rm -rf <em>old-repository.git</em>
```
## Mirroring a repository that contains {% data variables.large_files.product_name_long %} objects
@@ -53,7 +53,7 @@ Before you can push the original repository to your new copy, or _mirror_, of th
```
3. Navigate to the repository you just cloned.
```shell
$ cd <em>old-repository</em>
$ cd <em>old-repository.git</em>
```
4. Pull in the repository's {% data variables.large_files.product_name_long %} objects.
```shell
@@ -70,7 +70,7 @@ Before you can push the original repository to your new copy, or _mirror_, of th
7. Remove the temporary local repository you created earlier.
```shell
$ cd ..
$ rm -rf <em>old-repository</em>
$ rm -rf <em>old-repository.git</em>
```
## Mirroring a repository in another location

View File

@@ -0,0 +1,28 @@
---
title: Configuring tag protection rules
shortTitle: Tag protection rules
intro: You can configure tag protection rules for your repository to prevent contributors from creating or deleting tags.
product: '{% data reusables.gated-features.tag-protection-rules %}'
versions:
fpt: '*'
ghes: '>3.4'
ghae: issue-6337
ghec: '*'
---
{% note %}
**Note:** Tag protection rules are currently in beta and subject to change.
{% endnote %}
When you add a tag protection rule, all tags that match the pattern provided will be protected. Only users with admin or maintain permissions in the repository will be able to create protected tags, and only users with admin permissions in the repository will be able to delete protected tags. Para obtener más información, consulta la sección "[Roles de repositorio para una organización](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization#permissions-for-each-role)".
Additionally, you can create custom repository roles to allow other groups of users to create or delete tags that match tag protection rules. Para obtener más información, consulta la sección "[Administrar los roles personalizados de repositorio en una organización](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)".
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
1. In the "Code and automation" section of the sidebar, click **{% octicon "tag" aria-label="The tag icon" %} Tags**.
1. Click **New rule**. ![New tag protection rule](/assets/images/help/repository/new-tag-protection-rule.png)
1. Under "Tag name pattern", type the pattern of the tags you want to protect. In this example, typing "\*" protects all tags. ![Set tag protection pattern](/assets/images/help/repository/set-tag-protection-pattern.png)
1. Click **Add rule**. ![Add tag protection rule](/assets/images/help/repository/add-tag-protection-rule.png)

View File

@@ -17,6 +17,7 @@ children:
- /enabling-anonymous-git-read-access-for-a-repository
- /about-email-notifications-for-pushes-to-your-repository
- /configuring-autolinks-to-reference-external-resources
- /configuring-tag-protection-rules
shortTitle: Administrar la configuración de un repositorio
---

View File

@@ -29,7 +29,7 @@ Primero, necesitas [registrar tu aplicación][new oauth app]. A cada aplicación
Puedes llenar toda la información como más te guste, con excepción de la **URL de rellamado para la autorización**. Esta es fácilmente la parte más importante para configurar tu aplicación. Es la URL de rellamado a la cual {% data variables.product.product_name %} devuelve al usuario después de una autenticación exitosa.
Ya que estamos ejecutando un servidor común de Sinatra, la ubicación de la instancia local se configura como `http://localhost:4567`. Vamos a llenar la URL de rellamado como `http://localhost:4567/callback`.
Since we're running a regular Sinatra server, the location of the local instance is set to `http://127.0.0.1:4567`. Let's fill in the callback URL as `http://127.0.0.1:4567/callback`.
## Aceptar la autorización del usuario
@@ -80,7 +80,7 @@ Posteriormente, pega este contenido en _views/index.erb_:
También, ten en cuenta que la URL utiliza el parámetro de consulta `scope` para definir los [alcances][oauth scopes] que solicita la aplicación. Para nuestra aplicación, estamos solicitando el alcance `user:email` para leer las direcciones de correo electrónico privadas.
Navega en tu buscador hacia `http://localhost:4567`. Después de dar clic en el enlace, se te llevará a {% data variables.product.product_name %} y se te mostrará un diálogo que se ve más o menos así: ![Diálogo de OAuth de GitHub](/assets/images/oauth_prompt.png)
Navigate your browser to `http://127.0.0.1:4567`. Después de dar clic en el enlace, se te llevará a {% data variables.product.product_name %} y se te mostrará un diálogo que se ve más o menos así: ![Diálogo de OAuth de GitHub](/assets/images/oauth_prompt.png)
Si confías en ti mismo, da clic en **Autorizar App**. ¡Oh-oh! Sinatra te arroja un error `404`. ¡¿Qué pasa?!
@@ -175,7 +175,7 @@ Podemos hacer lo que queramos con nuestros resultados. En este caso, solo las va
## Implementar la autenticación "persistente"
Estaríamos hablando de un pésimo modelo si requerimos que los usuarios inicien sesión en la app cada vez que necesiten acceder a la página web. Por ejemplo, intenta navegar directamente a `http://localhost:4567/basic`. Obtendrás un error.
Estaríamos hablando de un pésimo modelo si requerimos que los usuarios inicien sesión en la app cada vez que necesiten acceder a la página web. For example, try navigating directly to `http://127.0.0.1:4567/basic`. Obtendrás un error.
¿Qué pasaría si pudiéramos evitar todo el proceso de "da clic aquí", y solo lo _recordáramos_, mientras que los usuarios sigan en sesión dentro de
{% data variables.product.product_name %}, y pudieran acceder a esta aplicación? Agárrate,
@@ -294,7 +294,7 @@ Después, crea un archivo en _views_, el cual se llame _advanced.erb_ y pega est
</html>
```
Desde la líne de comandos, llama a `ruby advanced_server.rb`, lo cual inicia tu servidor en el puerto `4567` -- el mismo puerto que utilizamos cuando tuvimos una app de Sinatra sencilla. Cuando navegas a `http://localhost:4567`, la app llama a `authenticate!`, lo cual te redirige a `/callback`. Entonces, `/callback` nos regresa a `/` y, ya que estuvimos autenticados, interpreta a _advanced.erb_.
Desde la líne de comandos, llama a `ruby advanced_server.rb`, lo cual inicia tu servidor en el puerto `4567` -- el mismo puerto que utilizamos cuando tuvimos una app de Sinatra sencilla. When you navigate to `http://127.0.0.1:4567`, the app calls `authenticate!` which redirects you to `/callback`. Entonces, `/callback` nos regresa a `/` y, ya que estuvimos autenticados, interpreta a _advanced.erb_.
Podríamos simplificar completamente esta ruta redonda si solo cambiamos nuestra URL de rellamado en {% data variables.product.product_name %} a `/`. Pero, ya que tanto _server.rb_ como _advanced.rb_ dependen de la misma URL de rellamado, necesitamos hacer un poco más de ajustes para que funcione.

View File

@@ -0,0 +1,7 @@
---
#Reference 5861
versions:
fpt: '*'
ghec: '*'
ghes: '>3.4'
ghae: 'issue-5861'

View File

@@ -0,0 +1 @@
{% ifversion ghae %}Tag protection rules are available in internal and private repositories with {% data variables.product.prodname_ghe_managed %}, {% else%}Tag protection rules are available {% endif %}in public repositories with {% data variables.product.prodname_free_user %} and {% data variables.product.prodname_free_team %} for organizations, and in public and private repositories with {% data variables.product.prodname_pro %}, {% data variables.product.prodname_team %}, {% data variables.product.prodname_ghe_cloud %}, and {% data variables.product.prodname_ghe_server %}. {% ifversion fpt or ghec %}{% data reusables.gated-features.more-info %}{% endif %}

View File

@@ -1 +1 @@
Por ejemplo, puedes permitir el acceso desde la única dirección IP de tu red de oficina. La lista de direcciones IP permitidas bloqueará el acceso mediante la web, las API y Git desde cualquier dirección IP que no se encuentre en ella.
Por ejemplo, puedes permitir el acceso desde la única dirección IP de tu red de oficina. The allow list for IP addresses will block access to private resources via the web, API, and Git from any IP addresses that are not on the allow list.

View File

@@ -1,5 +0,0 @@
{% note %}
**Note:** When SAML SSO is enabled, the only setting you can update on {% data variables.product.prodname_dotcom %} for your existing SAML configuration is the SAML certificate. If you need to update the Sign on URL or Issuer, you must first disable SAML SSO and then reconfigure SAML SSO with the new settings.
{% endnote %}

View File

@@ -0,0 +1,5 @@
{% note %}
**Note:** To avoid exceeding the rate limit on {% data variables.product.product_name %}, do not assign more than 1,000 users per hour to the IdP application. If you use groups to assign users to the IdP application, do not add more than 100 users to each group per hour. If you exceed these thresholds, attempts to provision users may fail with a "rate limit" error.
{% endnote %}

View File

@@ -129,7 +129,6 @@ translations/es-ES/content/code-security/supply-chain-security/keeping-your-depe
translations/es-ES/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/listing-dependencies-configured-for-version-updates.md,Listed in localization-support#489
translations/es-ES/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot.md,Listed in localization-support#489
translations/es-ES/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-pull-requests-for-dependency-updates.md,Listed in localization-support#489
translations/es-ES/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/upgrading-from-dependabotcom-to-github-native-dependabot.md,broken liquid tags
translations/es-ES/content/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies.md,Listed in localization-support#489
translations/es-ES/content/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates.md,Listed in localization-support#489
translations/es-ES/content/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-managing-vulnerable-dependencies.md,Listed in localization-support#489
1 file reason
129 translations/es-ES/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/listing-dependencies-configured-for-version-updates.md Listed in localization-support#489
130 translations/es-ES/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot.md Listed in localization-support#489
131 translations/es-ES/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-pull-requests-for-dependency-updates.md Listed in localization-support#489
translations/es-ES/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/upgrading-from-dependabotcom-to-github-native-dependabot.md broken liquid tags
132 translations/es-ES/content/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies.md Listed in localization-support#489
133 translations/es-ES/content/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates.md Listed in localization-support#489
134 translations/es-ES/content/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-managing-vulnerable-dependencies.md Listed in localization-support#489

View File

@@ -100,4 +100,4 @@ topics:
## 反馈和支持
If you have feedback or feature requests for notifications, use a [{% data variables.product.product_name %} feedback discussion](https://github.com/github/feedback/discussions/categories/general-feedback).
如果您有针对通知的反馈或功能请求,请使用 [{% data variables.product.product_name %} 反馈讨论](https://github.com/github/feedback/discussions/categories/general-feedback)

View File

@@ -19,6 +19,8 @@ shortTitle: Missing contributions
Your profile contributions graph is a record of contributions you've made to repositories {% ifversion ghae %}owned by{% else %}on{% endif %} {% data variables.product.product_location %}. Contributions are timestamped according to Coordinated Universal Time (UTC) rather than your local time zone. Contributions are only counted if they meet certain criteria. In some cases, we may need to rebuild your graph in order for contributions to appear.
If you are part of an organization that uses SAML single sign-on (SSO), you wont be able to see contribution activity from the organization on your profile if you do not have an active SSO session. People viewing your profile from outside your organization will see anonymized contribution activity of your contribution activity for your organization.
## Contributions that are counted
### Issues, pull requests and discussions

View File

@@ -21,7 +21,7 @@ shortTitle: 添加电子邮件地址
**注意**
- {% data reusables.user-settings.no-verification-disposable-emails %}
- If you're a member of an {% data variables.product.prodname_emu_enterprise %}, you cannot make changes to your email address on {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.enterprise-accounts.emu-more-info-account %}
- 如果您是 {% data variables.product.prodname_emu_enterprise %} 的成员,则无法在 {% data variables.product.prodname_dotcom_the_website %} 上更改您的电子邮件地址。 {% data reusables.enterprise-accounts.emu-more-info-account %}
{% endnote %}

View File

@@ -19,7 +19,7 @@ shortTitle: 合并多个用户帐户
{% ifversion ghec %}
**Tip:** {% data variables.product.prodname_emus %} allow an enterprise to provision unique user accounts for its members through an identity provider (IdP). For more information, see "[About Enterprise Managed Users](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/about-enterprise-managed-users)." For other use cases, we recommend using only one user account to manage both personal and professional repositories.
**提示:** {% data variables.product.prodname_emus %} 允许企业通过身份提供商 (IdP) 为其成员配置唯一的用户帐户。 更多信息请参阅“[关于企业管理用户](/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/about-enterprise-managed-users)”。 对于其他用例,我们建议仅使用一个用户帐户来管理个人和专业存储库。
{% else %}
@@ -31,14 +31,14 @@ shortTitle: 合并多个用户帐户
{% warning %}
**Warning:** Organization and repository access permissions aren't transferable between accounts. If the account you want to delete has an existing access permission, an organization owner or repository administrator will need to invite the account that you want to keep.
**警告:** 组织和存储库访问权限不可在帐户之间转移。 如果要删除的帐户具有现有访问权限,则组织所有者或存储库管理员将需要邀请您要保留的帐户。
{% endwarning %}
1. 从您要删除的帐户[转让任何仓库](/articles/how-to-transfer-a-repository)到要保留的帐户。 议题、拉取请求和 wiki 也会转让。 确认要保留的帐户中存在仓库。
2. [更新远程 URL](/github/getting-started-with-github/managing-remote-repositories)(在移动的仓库的任何本地克隆中)。
3. [删除帐户](/articles/deleting-your-user-account)(不再使用的)。
4. To attribute past commits to the new account, add the email address you used to author the commits to the account you're keeping. 更多信息请参阅“[为什么我的贡献没有在我的个人资料中显示?](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile#your-local-git-commit-email-isnt-connected-to-your-account)”
4. 要将过去的提交归因于新帐户,请将用于创作提交的电子邮件地址添加到要保留的帐户。 更多信息请参阅“[为什么我的贡献没有在我的个人资料中显示?](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile#your-local-git-commit-email-isnt-connected-to-your-account)”
## 延伸阅读

View File

@@ -1,6 +1,6 @@
---
title: 查看组织中人员的角色
intro: '您可以查看组织中人员的列表,并按其角色进行筛选。 For more information on organization roles, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)."'
intro: '您可以查看组织中人员的列表,并按其角色进行筛选。 有关组织角色的详细信息,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)”。'
permissions: Organization members can see people's roles in the organization.
redirect_from:
- /articles/viewing-people-s-roles-in-an-organization
@@ -26,39 +26,39 @@ shortTitle: 查看组织中的人员
{% ifversion fpt %}
If your organization uses {% data variables.product.prodname_ghe_cloud %}, you can also view the enterprise owners who manage billing settings and policies for all your enterprise's organizations. 更多信息请参阅 [{% data variables.product.prodname_ghe_cloud %} 文档](/enterprise-cloud@latest/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/viewing-peoples-roles-in-an-organization#view-enterprise-owners-and-their-roles-in-an-organization)。
如果您的组织使用 {% data variables.product.prodname_ghe_cloud %},您还可以查看管理所有企业组织的计费设置和策略的企业所有者。 更多信息请参阅 [{% data variables.product.prodname_ghe_cloud %} 文档](/enterprise-cloud@latest/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/viewing-peoples-roles-in-an-organization#view-enterprise-owners-and-their-roles-in-an-organization)。
{% endif %}
{% if enterprise-owners-visible-for-org-members %}
## View enterprise owners and their roles in an organization
## 查看企业所有者及其在组织中的角色
If your organization is managed by an enterprise account, then you can view the enterprise owners who manage billing settings and policies for all of your enterprise's organizations. For more information about enterprise accounts, see "[Types of {% data variables.product.prodname_dotcom %} accounts](/get-started/learning-about-github/types-of-github-accounts)."
如果您的组织由企业帐户管理,则可以查看管理企业所有组织的帐单设置和策略的企业所有者。 有关企业帐户的详细信息,请参阅“[{% data variables.product.prodname_dotcom %} 帐户类型](/get-started/learning-about-github/types-of-github-accounts)”。
You can also view whether an enterprise owner has a specific role in the organization. Enterprise owners can also be an organization member, any other organization role, or be un-affililated with the organization.
您还可以查看企业所有者是否在组织中具有特定角色。 企业所有者也可以是组织成员、任何其他组织角色或与组织无关。
{% note %}
**Note:** If you're an organization owner, you can also invite an enterprise owner to have a role in the organization. If an enterprise owner accepts the invitation, a seat or license in the organization is used from the available licenses for your enterprise. For more information about how licensing works, see "[Roles in an enterprise](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise#enterprise-owner)."
**注意:**如果您是组织所有者,还可以邀请企业所有者在组织中担任角色。 如果企业所有者接受邀请,则会从企业的可用许可证中使用组织中的席位或许可证。 有关许可的工作原理的详细信息,请参阅“[企业中的角色](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise#enterprise-owner)”。
{% endnote %}
| **Enterprise role** | **Organization role** | **Organization access or impact** |
| ------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| 企业所有者 | Un-affililated or no official organization role | Cannot access organization content or repositories but manages enterprise settings and policies that impact your organization. |
| 企业所有者 | Organization owner | Able to configure organization settings and manage access to the organization's resources through teams, etc. |
| 企业所有者 | Organization member | Able to access organization resources and content, such as repositories, without access to the organization's settings. |
| **企业角色** | **组织角色** | **组织访问或影响** |
| -------- | ------------------ | ------------------------------ |
| 企业所有者 | 非附属或无官方组织角色 | 无法访问组织内容或存储库,但可管理影响组织的企业设置和策略。 |
| 企业所有者 | Organization owner | 能够配置组织设置并通过团队等管理对组织资源的访问。 |
| 企业所有者 | 组织成员 | 能够访问组织资源和内容(如存储库),而无需访问组织的设置。 |
To review all roles in an organization, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)." {% ifversion ghec %} An organization member can also have a custom role for a specific repository. For more information, see "[Managing custom repository roles for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)."{% endif %}
要查看组织中的所有角色,请参阅“[组织中的角色](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)”。 {% ifversion ghec %} 组织成员还可以具有特定存储库的自定义角色。 更多信息请参阅“[管理组织的自定义仓库角色](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)”。{% endif %}
For more information about the enterprise owner role, see "[Roles in an enterprise](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise#enterprise-owner)."
有关企业所有者角色的更多信息,请参阅“[企业中的角色](/admin/user-management/managing-users-in-your-enterprise/roles-in-an-enterprise#enterprise-owner)”。
{% data reusables.profile.access_org %}
{% data reusables.user-settings.access_org %}
{% data reusables.organizations.people %}
4. In the left sidebar, under "Enterprise permissions", click **Enterprise owners**. ![Screenshot of "Enterprise owners" option in sidebar menu](/assets/images/help/organizations/enterprise-owners-sidebar.png)
5. View the list of the enterprise owners for your enterprise. If the enterprise owner is also a member of your organization, you can see their role in the organization.
4. 在左侧边栏的“Enterprise permissions(企业权限)”下,单击 **Enterprise owners(企业所有者)** ![侧边栏菜单中 "企业所有者" 选项的屏幕截图](/assets/images/help/organizations/enterprise-owners-sidebar.png)
5. 查看企业的企业所有者列表。 如果企业所有者也是您组织的成员,则您可以看到他们在组织中的角色。
![Screenshot of list of Enterprise owners and their role in the organization](/assets/images/help/organizations/enterprise-owners-list-on-org-page.png)
![企业所有者列表及其在组织中的角色的屏幕截图](/assets/images/help/organizations/enterprise-owners-list-on-org-page.png)
{% endif %}

View File

@@ -78,6 +78,12 @@ shortTitle: 启动时运行运行器应用程序
```
{% endmac %}
The command takes an optional `user` argument to install the service as a different user.
```shell
./svc.sh install --user <em>USERNAME</em>
```
## 启动服务
使用以下命令启动服务:

View File

@@ -1,7 +1,7 @@
---
title: Monitoring and troubleshooting workflows
title: 监控和故障排除工作流程
shortTitle: 监控和故障排除
intro: 'You can view the status and results of each step in your workflow, debug a failed workflow, search and download logs, and view billable job execution minutes.'
intro: 您可以查看工作流程中每个步骤的状态和结果、调试失败的工作流程、搜索和下载日志以及查看计费作业执行分钟数。
redirect_from:
- /articles/viewing-your-repository-s-workflows
- /articles/viewing-your-repositorys-workflows

View File

@@ -57,7 +57,7 @@ versions:
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
{% data reusables.repositories.navigate-to-job %}
1. In the upper right corner, click {% octicon "gear" aria-label="The gear icon" %} and select **Download log archive**.
1. 在右上角,单击 {% octicon "gear" aria-label="The gear icon" %} ,然后选择 **Download log archive(下载日志存档)**
![下载日志下拉菜单](/assets/images/help/repository/download-logs-drop-down-updated-2.png)
@@ -70,7 +70,7 @@ versions:
{% data reusables.repositories.actions-tab %}
{% data reusables.repositories.navigate-to-workflow %}
{% data reusables.repositories.view-run %}
1. In the upper right corner, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}.
1. 在右上角,单击 {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}
![烤肉串水平图标](/assets/images/help/repository/workflow-run-kebab-horizontal-icon-updated-2.png)

View File

@@ -41,7 +41,9 @@ When you enable {% data variables.product.prodname_github_connect %}, you config
To use {% data variables.product.prodname_github_connect %}, you must have an organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} that uses {% data variables.product.prodname_ghe_cloud %}. You may already have {% data variables.product.prodname_ghe_cloud %} included in your plan. {% data reusables.enterprise.link-to-ghec-trial %}
{% ifversion ghes %}
To configure a connection, your proxy configuration must allow connectivity to `github.com`, `api.github.com`, and `uploads.github.com`. 更多信息请参阅“[配置出站 Web 代理服务器](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-an-outbound-web-proxy-server)”。
If your organization or enterprise account on {% data variables.product.prodname_dotcom_the_website %} uses IP allow lists, you must add the IP address or network for {% data variables.product.product_location %} to your IP allow list on {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[Managing allowed IP addresses for your organization](/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization)" and "[Enforcing policies for security settings in your enterprise](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-allowed-ip-addresses-for-organizations-in-your-enterprise)" in the {% data variables.product.prodname_ghe_cloud %} documentation.
To configure a connection, your proxy configuration must allow connectivity to `github.com`, `api.github.com`, and `uploads.github.com`. For more information, see "[Configuring an outbound web proxy server](/enterprise/{{ currentVersion }}/admin/guides/installation/configuring-an-outbound-web-proxy-server)."
{% endif %}
## 启用 {% data variables.product.prodname_github_connect %}
@@ -69,7 +71,7 @@ If you're connecting {% data variables.product.product_location %} to an organiz
Enterprise owners can disable {% data variables.product.prodname_github_connect %}.
{% data variables.product.prodname_ghe_cloud %} 断开连接后,{% data variables.product.prodname_github_connect %} {% data variables.product.prodname_github_app %} 会从企业帐户或组织中删除,{% data variables.product.product_location %} 上存储的凭据也会删除。
When you disconnect from {% data variables.product.prodname_ghe_cloud %}, the {% data variables.product.prodname_github_connect %} {% data variables.product.prodname_github_app %} is deleted from your enterprise account or organization and credentials stored on {% data variables.product.product_location %} are deleted.
{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.github-connect-tab %}

Some files were not shown because too many files have changed in this diff Show More