Skip to content

Commit 8ec98d9

Browse files
author
Martin Lopes
authored
Merge branch 'main' into 5765-private-profile
2 parents 572176d + b16be00 commit 8ec98d9

File tree

26 files changed

+350
-96
lines changed

26 files changed

+350
-96
lines changed

.github/workflows/azure-preview-env-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ jobs:
165165
rsync -rptovR ./user-code/components/./**/*.{ts,tsx} ./components
166166
rsync -rptovR --ignore-missing-args ./user-code/lib/./**/*.{js,ts} ./lib
167167
rsync -rptovR --ignore-missing-args ./user-code/middleware/./**/*.{js,ts} ./middleware
168-
rsync -rptovR ./user-code/pages/./**/*.{tsx} ./pages
169-
rsync -rptovR ./user-code/stylesheets/./**/*.{scss} ./stylesheets
168+
rsync -rptovR ./user-code/pages/./**/*.tsx ./pages
169+
rsync -rptovR ./user-code/stylesheets/./**/*.scss ./stylesheets
170170
171171
# In addition to making the final image smaller, we also save time by not sending unnecessary files to the docker build context
172172
- name: 'Prune for preview env'

.github/workflows/move-ready-to-merge-pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: move PR
2525
uses: alex-page/github-project-automation-plus@bb266ff4dde9242060e2d5418e120a133586d488
2626
with:
27-
project: Docs team reviews
27+
project: Docs open source board
2828
column: Triage
2929
repo-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
3030

components/lib/events.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,15 @@ function initClipboardEvent() {
245245
})
246246
}
247247

248+
function initCopyButtonEvent() {
249+
document.documentElement.addEventListener('click', (evt) => {
250+
const target = evt.target as HTMLElement
251+
const button = target.closest('.js-btn-copy') as HTMLButtonElement
252+
if (!button) return
253+
sendEvent({ type: EventType.navigate, navigate_label: 'copy icon button' })
254+
})
255+
}
256+
248257
function initLinkEvent() {
249258
document.documentElement.addEventListener('click', (evt) => {
250259
const target = evt.target as HTMLElement
@@ -267,6 +276,7 @@ export default function initializeEvents() {
267276
initPageAndExitEvent() // must come first
268277
initLinkEvent()
269278
initClipboardEvent()
279+
initCopyButtonEvent()
270280
initPrintEvent()
271281
// survey event in ./survey.js
272282
// experiment event in ./experiment.js

components/rest/CodeBlock.tsx

Lines changed: 55 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,68 @@
11
import cx from 'classnames'
2+
import { CheckIcon, CopyIcon } from '@primer/octicons-react'
3+
import { Tooltip } from '@primer/react'
4+
5+
import useClipboard from 'components/hooks/useClipboard'
26

37
import styles from './CodeBlock.module.scss'
48

59
type Props = {
610
verb?: string
11+
headingLang?: string
712
codeBlock: string
813
highlight?: string
914
}
1015

11-
export function CodeBlock({ verb, codeBlock, highlight }: Props) {
16+
export function CodeBlock({ verb, headingLang, codeBlock, highlight }: Props) {
17+
const [isCopied, setCopied] = useClipboard(codeBlock, {
18+
successDuration: 1400,
19+
})
20+
1221
return (
13-
<pre className={cx(styles.methodCodeBlock, 'rounded-1 border')} data-highlight={highlight}>
14-
<code>
15-
{verb && (
16-
<span className="color-bg-accent-emphasis color-fg-on-emphasis rounded-1 text-uppercase">
17-
{verb}
18-
</span>
19-
)}{' '}
20-
{codeBlock}
21-
</code>
22-
</pre>
22+
<div className="code-extra">
23+
{headingLang && (
24+
<header className="d-flex flex-justify-between flex-items-center p-2 text-small rounded-top-1 border">
25+
{headingLang === 'JavaScript' ? (
26+
<span>
27+
{headingLang} (
28+
<a className="text-underline" href="https://github.com/octokit/core.js#readme">
29+
@octokit/core.js
30+
</a>
31+
)
32+
</span>
33+
) : (
34+
`${headingLang}`
35+
)}
36+
<Tooltip direction="w" aria-label={isCopied ? 'Copied!' : 'Copy to clipboard'}>
37+
<button className="js-btn-copy btn-octicon" onClick={() => setCopied()}>
38+
{isCopied ? <CheckIcon /> : <CopyIcon />}
39+
</button>
40+
</Tooltip>
41+
</header>
42+
)}
43+
<pre
44+
className={cx(
45+
styles.methodCodeBlock,
46+
'd-flex flex-justify-between flex-items-center rounded-1 border'
47+
)}
48+
data-highlight={highlight}
49+
>
50+
<code>
51+
{verb && (
52+
<span className="color-bg-accent-emphasis color-fg-on-emphasis rounded-1 text-uppercase">
53+
{verb}
54+
</span>
55+
)}{' '}
56+
{codeBlock}
57+
</code>
58+
{!headingLang && (
59+
<Tooltip direction="w" aria-label={isCopied ? 'Copied!' : 'Copy to clipboard'}>
60+
<button className="js-btn-copy btn-octicon" onClick={() => setCopied()}>
61+
{isCopied ? <CheckIcon /> : <CopyIcon />}
62+
</button>
63+
</Tooltip>
64+
)}
65+
</pre>
66+
</div>
2367
)
2468
}

components/rest/RestCodeSamples.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,10 @@ export function RestCodeSamples({ slug, xCodeSamples }: Props) {
1818
{xCodeSamples.map((sample, index) => {
1919
const sampleElements: JSX.Element[] = []
2020
if (sample.lang !== 'Ruby') {
21-
sampleElements.push(
22-
sample.lang === 'JavaScript' ? (
23-
<h5 key={`${sample.lang}-${index}`}>
24-
{sample.lang} (
25-
<a className="text-underline" href="https://github.com/octokit/core.js#readme">
26-
@octokit/core.js
27-
</a>
28-
)
29-
</h5>
30-
) : (
31-
<h5 key={`${sample.lang}-${index}`}>{sample.lang}</h5>
32-
)
33-
)
3421
sampleElements.push(
3522
<CodeBlock
3623
key={sample.lang + index}
24+
headingLang={sample.lang}
3725
codeBlock={sample.source}
3826
highlight={sample.lang === 'JavaScript' ? 'javascript' : 'curl'}
3927
></CodeBlock>

content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ shortTitle: Recover an account with 2FA
2222
**Warnings**:
2323

2424
- {% data reusables.two_fa.support-may-not-help %}
25-
- {% data reusables.accounts.you-must-know-your-password %}
2625

2726
{% endwarning %}
2827

@@ -32,7 +31,13 @@ shortTitle: Recover an account with 2FA
3231

3332
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)."
3433

35-
{% data reusables.two_fa.username-password %}
34+
1. Type your username and password to prompt authentication.
35+
36+
{% warning %}
37+
38+
**Warning**: {% data reusables.accounts.you-must-know-your-password %}
39+
40+
{% endwarning %}
3641

3742
{% ifversion fpt or ghec %}
3843
1. Under "Having problems?", click **Use a recovery code or request a reset**.

content/code-security/guides.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,23 @@ includeGuides:
3131
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/tracking-code-scanning-alerts-in-issues-using-task-lists
3232
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning
3333
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts
34+
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql
3435
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning
3536
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages
3637
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository
3738
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/running-codeql-code-scanning-in-a-container
3839
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository
3940
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests
4041
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow
42+
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/viewing-code-scanning-logs
4143
- /code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning
4244
- /code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning
4345
- /code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github
4446
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/about-codeql-code-scanning-in-your-ci-system
4547
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system
4648
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-runner-in-your-ci-system
4749
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/installing-codeql-cli-in-your-ci-system
50+
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/migrating-from-the-codeql-runner-to-codeql-cli
4851
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-runner-in-your-ci-system
4952
- /code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/troubleshooting-codeql-runner-in-your-ci-system
5053
- /code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities
@@ -58,6 +61,8 @@ includeGuides:
5861
- /code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory
5962
- /code-security/repository-security-advisories/withdrawing-a-repository-security-advisory
6063
- /code-security/security-overview/about-the-security-overview
64+
- /code-security/security-overview/filtering-alerts-in-the-security-overview
65+
- /code-security/security-overview/viewing-the-security-overview
6166
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates
6267
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions
6368
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates

content/code-security/index.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,29 @@ featuredLinks:
88
guides:
99
- /code-security/getting-started/securing-your-repository
1010
- /code-security/getting-started/securing-your-organization
11-
- '{% ifversion fpt %}/code-security/repository-security-advisories/creating-a-repository-security-advisory{% endif %}'
12-
- '{% ifversion ghes or ghae %}/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository{% endif%}'
11+
- '{% ifversion fpt or ghec %}/code-security/repository-security-advisories/creating-a-repository-security-advisory{% endif %}'
12+
- '{% ifversion ghes or ghae %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository{% endif%}'
1313
guideCards:
14-
- '{% ifversion fpt %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates{% endif %}'
15-
- '{% ifversion fpt %}/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/enabling-and-disabling-dependabot-version-updates{% endif %}'
16-
- '{% ifversion fpt %}/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/setting-up-code-scanning-for-a-repository{% endif %}'
17-
- '{% ifversion ghes %}/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository{% endif %}'
18-
- '{% ifversion ghes %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-notifications-for-vulnerable-dependencies{% endif %}'
19-
- '{% ifversion ghes or ghae %}/code-security/secret-security/configuring-secret-scanning-for-your-repositories{% endif %}'
20-
- '{% ifversion ghae %}/code-security/secure-coding/integrating-with-code-scanning/uploading-a-sarif-file-to-github{% endif %}'
21-
- '{% ifversion ghae %}/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system{% endif %}'
14+
- '{% ifversion fpt or ghec or ghes > 3.2 %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates{% endif %}'
15+
- '{% 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 %}'
16+
- '{% 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 %}'
17+
- '{% ifversion ghes < 3.3 %}/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository{% endif %}'
18+
- '{% ifversion ghes < 3.3 %}/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-notifications-for-vulnerable-dependencies{% endif %}'
19+
- '{% ifversion ghes < 3.3 or ghae %}/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories{% endif %}'
20+
- '{% ifversion ghae %}/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github{% endif %}'
21+
- '{% ifversion ghae %}/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system{% endif %}'
2222
popular:
2323
- '{% ifversion ghes %}/admin/release-notes{% endif %}'
2424
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies
2525
- /code-security/repository-security-advisories/about-coordinated-disclosure-of-security-vulnerabilities
2626
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot
2727
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates
2828
- /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-encrypted-secrets-for-dependabot
29-
- '{% ifversion ghae %}/code-security/secret-security/about-secret-scanning{% endif %}'
29+
- '{% ifversion ghae %}/code-security/secret-scanning/about-secret-scanning{% endif %}'
3030
- /code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/troubleshooting-the-detection-of-vulnerable-dependencies
31-
- '{% ifversion ghes or ghae %}/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages{% endif %}'
32-
- '{% ifversion ghes or ghae %}/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow{% endif %}'
33-
- '{% ifversion ghes or ghae %}/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/running-codeql-code-scanning-in-a-container{% endif %}'
31+
- '{% 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 %}'
32+
- '{% ifversion ghes < 3.3 or ghae %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow{% endif %}'
33+
- '{% 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 %}'
3434
changelog:
3535
label: security-and-compliance
3636
versions:

content/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ An outside collaborator is a person who is not a member of your organization, bu
2222

2323
{% data reusables.organizations.outside-collaborators-use-seats %}
2424

25+
{% ifversion fpt %}
26+
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.
27+
{% else %}
2528
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)."
29+
{% endif %}
2630

2731
{% ifversion ghes %}
2832
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
3236
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)."
3337
{% endif %}
3438

35-
{% ifversion fpt %}
36-
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 %}
37-
{% endif %}
38-
3939
## Adding outside collaborators to a repository
4040

4141
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5974 %}

content/organizations/managing-access-to-your-organizations-repositories/viewing-people-with-access-to-your-repository.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ You can use this information to help off-board people, gather data for complianc
2222

2323
{% ifversion fpt %}
2424
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).
25-
26-
{% data reusables.enterprise.link-to-ghec-trial %}
2725
{% endif %}
2826

2927
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5974 %}
@@ -44,6 +42,14 @@ You can see a combined overview of teams and people with access to your reposito
4442
{% ifversion ghec or ghes or ghae %}
4543
## Exporting a list of people with access to your repository
4644

45+
{% ifversion ghec %}
46+
{% note %}
47+
48+
**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 %}
49+
50+
{% endnote %}
51+
{% endif %}
52+
4753
{% data reusables.repositories.navigate-to-repo %}
4854
{% data reusables.repositories.accessing-repository-graphs %}
4955
{% data reusables.repositories.accessing-repository-people %}

0 commit comments

Comments
 (0)