Skip to content

Commit b2f2d3e

Browse files
authored
Merge branch 'main' into patch-3
2 parents b5c58b5 + dd82933 commit b2f2d3e

327 files changed

Lines changed: 5079 additions & 5367 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/actions-scripts/staging-commit-status-success.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env node
22

3+
import * as github from '@actions/github'
4+
35
import getOctokit from '../../script/helpers/github.js'
46

57
const { GITHUB_TOKEN } = process.env
@@ -25,6 +27,10 @@ if (!HEAD_SHA) {
2527
throw new Error('$HEAD_SHA not set')
2628
}
2729

30+
const { context } = github
31+
const owner = context.repo.owner
32+
const repo = context.payload.repository.name
33+
2834
await octokit.repos.createCommitStatus({
2935
owner,
3036
repo,
97.3 KB
Loading

components/DefaultLayout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { SmallFooter } from 'components/page-footer/SmallFooter'
66
import { ScrollButton } from 'components/ui/ScrollButton'
77
import { SupportSection } from 'components/page-footer/SupportSection'
88
import { DeprecationBanner } from 'components/page-header/DeprecationBanner'
9+
import { RestRepoBanner } from 'components/page-header/RestRepoBanner'
910
import { useMainContext } from 'components/context/MainContext'
1011
import { useTranslation } from 'components/hooks/useTranslation'
1112
import { useRouter } from 'next/router'
@@ -86,6 +87,7 @@ export const DefaultLayout = (props: Props) => {
8687
<main className="flex-1 min-width-0">
8788
<Header />
8889
<DeprecationBanner />
90+
<RestRepoBanner />
8991

9092
{props.children}
9193

components/landing/CodeExamples.tsx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useState } from 'react'
22
import { ArrowRightIcon, SearchIcon } from '@primer/octicons-react'
3+
import { Text } from '@primer/components'
34

45
import { useProductLandingContext } from 'components/context/ProductLandingContext'
56
import { useTranslation } from 'components/hooks/useTranslation'
@@ -31,6 +32,16 @@ export const CodeExamples = () => {
3132
return (
3233
<div>
3334
<div className="pr-lg-3 mb-5 mt-3">
35+
<Text
36+
className="ml-1 mr-2"
37+
fontWeight="bold"
38+
fontSize={2}
39+
as="label"
40+
htmlFor="searchCodeExamples"
41+
id="searchCodeExamples"
42+
>
43+
Search code examples:
44+
</Text>
3445
<input
3546
data-testid="code-examples-input"
3647
className="input-lg py-2 px-3 col-12 col-lg-8 form-control"
@@ -45,9 +56,9 @@ export const CodeExamples = () => {
4556
<div className="d-flex flex-wrap gutter">
4657
{(isSearching ? searchResults : productCodeExamples.slice(0, numVisible)).map((example) => {
4758
return (
48-
<div key={example.href} className="col-12 col-xl-4 col-lg-6 mb-4">
59+
<li key={example.href} className="col-12 col-xl-4 col-lg-6 mb-4 list-style-none">
4960
<CodeExampleCard example={example} />
50-
</div>
61+
</li>
5162
)
5263
})}
5364
</div>

components/landing/GuideCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const GuideCard = ({ guide }: Props) => {
88
const authorString = `@${authors.join(', @')}`
99

1010
return (
11-
<div className="col-lg-4 col-12 mb-4">
11+
<li className="col-lg-4 col-12 mb-4 list-style-none">
1212
<a
1313
className="Box color-shadow-medium height-full d-block hover-shadow-large no-underline color-fg-default p-5"
1414
href={guide.href}
@@ -50,6 +50,6 @@ export const GuideCard = ({ guide }: Props) => {
5050
<div>{authorString}</div>
5151
</footer>
5252
</a>
53-
</div>
53+
</li>
5454
)
5555
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import { Flash } from '@primer/components'
2+
import { useRouter } from 'next/router'
3+
import { Link } from 'components/Link'
4+
5+
const restDisplayPages = [
6+
'/rest/reference/branches',
7+
'/rest/reference/collaborators',
8+
'/rest/reference/commits',
9+
'/rest/reference/deployments',
10+
'/rest/reference/pages',
11+
'/rest/reference/releases',
12+
'/rest/reference/repos',
13+
'/rest/reference/repository-metrics',
14+
'/rest/reference/webhooks',
15+
]
16+
const restRepoCategoryExceptionsTitles = {
17+
branches: 'Branches',
18+
collaborators: 'Collaborators',
19+
commits: 'Commits',
20+
deployments: 'Deployments',
21+
pages: 'Github Pages',
22+
releases: 'Releases',
23+
'repository-metrics': 'Repository metrics',
24+
webhooks: 'Webhooks',
25+
}
26+
27+
export const RestRepoBanner = () => {
28+
const router = useRouter()
29+
const asPathRoot = router.asPath.split('?')[0].split('#')[0]
30+
if (!restDisplayPages.includes(asPathRoot)) {
31+
return null
32+
}
33+
34+
const pages = Object.keys(restRepoCategoryExceptionsTitles) as Array<
35+
keyof typeof restRepoCategoryExceptionsTitles
36+
>
37+
const newRestPagesText = pages.map((page, i) => [
38+
<Link href={`/${router.locale}/rest/reference/${page}`}>
39+
{restRepoCategoryExceptionsTitles[page]}
40+
{i < pages.length - 1 && ', '}
41+
</Link>,
42+
])
43+
44+
return (
45+
<div data-testid="rest-api-repos-banner" className="container-xl mt-3 mx-auto p-responsive">
46+
<Flash variant="warning">
47+
<p>
48+
<b className="text-bold">
49+
<span>
50+
We've recently moved some of the REST API documentation. If you can't find what you're
51+
looking for, you might try the new {newRestPagesText} REST API pages.
52+
</span>
53+
</b>{' '}
54+
</p>
55+
</Flash>
56+
</div>
57+
)
58+
}

content/actions/deployment/managing-your-deployments/viewing-deployment-history.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ To view current and past deployments, click **Environments** on the home page of
2424

2525
The deployments page displays the last active deployment of each environment for your repository. If the deployment includes an environment URL, a **View deployment** button that links to the URL is shown next to the deployment.
2626

27-
The activity log shows the deployment history for your environments. By default, only the most recent deployment for an environment has an `Active` status; all previously active deployments have an `Inactive` status. For more information on automatic inactivation of deployments, see "[Inactive deployments](/rest/reference/repos#inactive-deployments)."
27+
The activity log shows the deployment history for your environments. By default, only the most recent deployment for an environment has an `Active` status; all previously active deployments have an `Inactive` status. For more information on automatic inactivation of deployments, see "[Inactive deployments](/rest/reference/deployments#inactive-deployments)."
2828

2929
You can also use the REST API to get information about deployments. For more information, see "[Repositories](/rest/reference/repos#deployments)."

content/actions/learn-github-actions/events-that-trigger-workflows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ on:
307307

308308
### `deployment_status`
309309

310-
Runs your workflow anytime a third party provides a deployment status, which triggers the `deployment_status` event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see "[Create a deployment status](/rest/reference/repos#create-a-deployment-status)."
310+
Runs your workflow anytime a third party provides a deployment status, which triggers the `deployment_status` event. Deployments created with a commit SHA may not have a Git ref. For information about the REST API, see "[Create a deployment status](/rest/reference/deployments#create-a-deployment-status)."
311311

312312
| Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` |
313313
| --------------------- | -------------- | ------------ | -------------|
@@ -701,7 +701,7 @@ on:
701701

702702
{% note %}
703703

704-
**Note:** The webhook payload available to GitHub Actions does not include the `added`, `removed`, and `modified` attributes in the `commit` object. You can retrieve the full commit object using the REST API. For more information, see "[Get a commit](/rest/reference/repos#get-a-commit)".
704+
**Note:** The webhook payload available to GitHub Actions does not include the `added`, `removed`, and `modified` attributes in the `commit` object. You can retrieve the full commit object using the REST API. For more information, see "[Get a commit](/rest/reference/commits#get-a-commit)".
705705

706706
{% endnote %}
707707

content/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance/disabling-unauthenticated-sign-ups.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Disabling unauthenticated sign-ups
33
redirect_from:
4-
- /enterprise/admin/articles/disabling-sign-ups/
4+
- /enterprise/admin/articles/disabling-sign-ups
55
- /enterprise/admin/user-management/disabling-unauthenticated-sign-ups
66
- /enterprise/admin/authentication/disabling-unauthenticated-sign-ups
77
- /admin/authentication/disabling-unauthenticated-sign-ups

content/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
title: Authenticating users for your GitHub Enterprise Server instance
33
intro: 'You can use {% data variables.product.prodname_ghe_server %}''s built-in authentication, or choose between CAS, LDAP, or SAML to integrate your existing accounts and centrally manage user access to {% data variables.product.product_location %}.'
44
redirect_from:
5-
- /enterprise/admin/categories/authentication/
6-
- /enterprise/admin/guides/installation/user-authentication/
7-
- /enterprise/admin/articles/inviting-users/
8-
- /enterprise/admin/guides/migrations/authenticating-users-for-your-github-enterprise-instance/
5+
- /enterprise/admin/categories/authentication
6+
- /enterprise/admin/guides/installation/user-authentication
7+
- /enterprise/admin/articles/inviting-users
8+
- /enterprise/admin/guides/migrations/authenticating-users-for-your-github-enterprise-instance
99
- /enterprise/admin/user-management/authenticating-users-for-your-github-enterprise-server-instance
1010
- /enterprise/admin/authentication/authenticating-users-for-your-github-enterprise-server-instance
1111
versions:

0 commit comments

Comments
 (0)