Skip to content

Commit 1282aab

Browse files
authored
Merge branch 'main' into patch-2
2 parents a42af97 + b73e416 commit 1282aab

File tree

1,727 files changed

+57713
-25015
lines changed

Some content is hidden

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

1,727 files changed

+57713
-25015
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Once you submit your PR, a Docs team member will review your proposal. We may as
8383

8484
Congratulations :tada::tada: The GitHub team thanks you :sparkles:.
8585

86-
Once your PR is merged, your contributions will be publicly visible on the [GitHubs docs](https://docs.github.com/en).
86+
Once your PR is merged, your contributions will be publicly visible on the [GitHub docs](https://docs.github.com/en).
8787

8888
Now that you are part of the GitHub docs community, see how else you can [contribute to the docs](/contributing/types-of-contributions.md).
8989

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# --------------------------------------------------------------------------------
44
# BASE IMAGE
55
# --------------------------------------------------------------------------------
6-
FROM node:16.15.0-alpine@sha256:1a9a71ea86aad332aa7740316d4111ee1bd4e890df47d3b5eff3e5bded3b3d10 as base
6+
FROM node:16.17.0-alpine@sha256:2c405ed42fc0fd6aacbe5730042640450e5ec030bada7617beac88f742b6997b as base
77

88
# This directory is owned by the node user
99
ARG APP_HOME=/home/node/app

components/context/ProductLandingContext.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export type ProductLandingContextT = {
5454
whatsNewChangelog?: Array<{ href: string; title: string; date: string }>
5555
tocItems: Array<TocItem>
5656
hasGuidesPage: boolean
57-
releases: Array<{
57+
ghesReleases: Array<{
5858
version: string
5959
firstPreviousRelease: string
6060
secondPreviousRelease: string
@@ -115,7 +115,7 @@ export const getProductLandingContextFromRequest = (req: any): ProductLandingCon
115115
changelogUrl: req.context.changelogUrl || [],
116116
productCodeExamples: req.context.productCodeExamples || [],
117117
productCommunityExamples: req.context.productCommunityExamples || [],
118-
releases: req.context.releases || [],
118+
ghesReleases: req.context.ghesReleases || [],
119119

120120
productUserExamples: (req.context.productUserExamples || []).map(
121121
({ user, description }: any) => ({

components/landing/ProductReleases.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ export function ProductReleases() {
99
const { t } = useTranslation('product_landing')
1010
const router = useRouter()
1111
const { enterpriseServerReleases, allVersions } = useMainContext()
12-
const { releases, shortTitle } = useProductLandingContext()
12+
const { ghesReleases, shortTitle } = useProductLandingContext()
1313
const currentPath = router.asPath.split('?')[0]
1414
return (
1515
<div>
1616
<div className="d-lg-flex gutter-lg flex-items-stretch">
17-
{releases.map((release) => {
17+
{ghesReleases.map((release) => {
1818
const releaseNumber = release.version
1919
if (!enterpriseServerReleases.supported.includes(releaseNumber)) {
2020
return null

components/release-notes/GHAEReleaseNotePatch.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
import { useRef, useEffect } from 'react'
2+
import dayjs from 'dayjs'
23
import cx from 'classnames'
34

45
import { useTranslation } from 'components/hooks/useTranslation'
56
import { useOnScreen } from 'components/hooks/useOnScreen'
67
import { PatchNotes } from './PatchNotes'
7-
import { ReleaseNotePatch } from './types'
8+
import { CurrentVersion, ReleaseNotePatch } from './types'
89

910
import styles from './PatchNotes.module.scss'
1011

11-
type Props = { patch: ReleaseNotePatch; didEnterView: () => void }
12-
export function GHAEReleaseNotePatch({ patch, didEnterView }: Props) {
12+
type Props = { patch: ReleaseNotePatch; currentVersion: CurrentVersion; didEnterView: () => void }
13+
export function GHAEReleaseNotePatch({ patch, currentVersion, didEnterView }: Props) {
1314
const { t } = useTranslation('release_notes')
1415
const containerRef = useRef<HTMLDivElement>(null)
1516
const onScreen = useOnScreen(containerRef, { rootMargin: '-40% 0px -50%' })
@@ -25,11 +26,13 @@ export function GHAEReleaseNotePatch({ patch, didEnterView }: Props) {
2526
<div
2627
ref={containerRef}
2728
className={cx(styles.sectionHeading, 'mb-10 pb-6 border-bottom border-top')}
28-
id={patch.date}
29+
id={patch.release}
2930
>
3031
<header style={{ zIndex: 1 }} className="container-xl border-bottom px-3 pt-4 pb-2">
3132
<div className="d-flex flex-items-center">
32-
<h2 className="border-bottom-0 m-0 p-0">{patch.title}</h2>
33+
<h2 className="border-bottom-0 m-0 p-0">
34+
{currentVersion.versionTitle} {patch.release}
35+
</h2>
3336

3437
{patch.release_candidate && (
3538
<span
@@ -41,7 +44,7 @@ export function GHAEReleaseNotePatch({ patch, didEnterView }: Props) {
4144
)}
4245
</div>
4346
<p className="color-fg-muted mt-1">
44-
{bannerText} {patch.friendlyDate}.
47+
{bannerText} {dayjs(patch.date).format('MMMM DD, YYYY')}.
4548
</p>
4649
</header>
4750

components/release-notes/GHAEReleaseNotes.tsx

Lines changed: 20 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { SyntheticEvent, useState } from 'react'
1+
import { useState } from 'react'
22
import cx from 'classnames'
3-
import { ChevronDownIcon } from '@primer/octicons-react'
3+
import dayjs from 'dayjs'
44
import { GHAEReleaseNotePatch } from './GHAEReleaseNotePatch'
55
import { GHAEReleaseNotesContextT } from './types'
66
import { MarkdownContent } from 'components/ui/MarkdownContent'
@@ -29,6 +29,7 @@ export function GHAEReleaseNotes({ context }: GitHubAEProps) {
2929
<GHAEReleaseNotePatch
3030
key={patch.version}
3131
patch={patch}
32+
currentVersion={currentVersion}
3233
didEnterView={() => setFocusedPatch(patch.version)}
3334
/>
3435
)
@@ -69,50 +70,26 @@ const CollapsibleReleaseSection = ({
6970
release: GHAEReleaseNotesContextT['releases'][0]
7071
focusedPatch: string
7172
}) => {
72-
const defaultIsOpen = true
73-
const [isOpen, setIsOpen] = useState(defaultIsOpen)
74-
75-
const onToggle = (e: SyntheticEvent) => {
76-
const newIsOpen = (e.target as HTMLDetailsElement).open
77-
setIsOpen(newIsOpen)
78-
}
79-
8073
return (
8174
<li key={release.version} className="border-bottom">
82-
<details
83-
className="my-0 details-reset release-notes-version-picker"
84-
aria-current="page"
85-
open={defaultIsOpen}
86-
onToggle={onToggle}
87-
>
88-
<summary className="px-3 py-4 my-0 d-flex flex-items-center flex-justify-between outline-none">
89-
{release.version}
90-
<div className="d-flex">
91-
<span className="color-fg-muted text-small text-normal mr-1">
92-
{release.patches.length} {release.patches.length === 1 ? 'release' : 'releases'}
93-
</span>
94-
<ChevronDownIcon className={isOpen ? 'rotate-180' : ''} />
95-
</div>
96-
</summary>
97-
<ul className="color-bg-subtle border-top list-style-none py-4 px-0 my-0">
98-
{release.patches.map((patch) => {
99-
const isActive = patch.version === focusedPatch
100-
return (
101-
<li
102-
key={patch.version}
103-
className={cx('px-3 my-0 py-1', isActive && 'color-bg-accent')}
75+
<ul className="list-style-none py-4 px-0 my-0">
76+
{release.patches.map((patch) => {
77+
const isActive = patch.release === focusedPatch
78+
return (
79+
<li key={patch.release} className={cx('px-3 my-0', isActive && 'color-bg-accent')}>
80+
<a
81+
href={`#${patch.release}`}
82+
className="d-flex flex-items-center flex-justify-between"
10483
>
105-
<a
106-
href={`#${patch.date}`}
107-
className="d-flex flex-items-center flex-justify-between"
108-
>
109-
{patch.friendlyDate}
110-
</a>
111-
</li>
112-
)
113-
})}
114-
</ul>
115-
</details>
84+
{patch.release}
85+
<span className="color-fg-muted text-mono text-small text-normal">
86+
{dayjs(patch.date).format('MMMM DD, YYYY')}
87+
</span>
88+
</a>
89+
</li>
90+
)
91+
})}
92+
</ul>
11693
</li>
11794
)
11895
}

components/release-notes/GHESReleaseNotes.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ export function GHESReleaseNotes({ context }: Props) {
9292
>
9393
{release.version}
9494
<span className="color-fg-muted text-small text-normal mr-1">
95-
{release.patches.length} releases
95+
{release.patches.length}{' '}
96+
{release.patches.length === 1 ? 'release' : 'releases'}
9697
</span>
9798
</Link>
9899
</li>

components/release-notes/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export type ReleaseNotePatch = {
2222
patchVersion: string
2323
version: string
2424
downloadVersion: string
25+
release: string
2526
intro: string
2627
date: string
2728
friendlyDate: string
@@ -39,8 +40,6 @@ export type GHAEReleaseNotesContextT = {
3940

4041
export type GHESReleaseNotesContextT = {
4142
latestPatch: string
42-
prevRelease?: string
43-
nextRelease?: string
4443
latestRelease: string
4544
currentVersion: CurrentVersion
4645
releaseNotes: Array<ReleaseNotePatch>

components/ui/MiniTocs/MiniTocs.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { Heading, NavList } from '@primer/react'
22
import cx from 'classnames'
33

44
import { MiniTocItem } from 'components/context/ArticleContext'
5-
import { Link } from 'components/Link'
65
import { useTranslation } from 'components/hooks/useTranslation'
76

87
import styles from './Minitocs.module.scss'
@@ -46,7 +45,7 @@ export function MiniTocs({ pageTitle, miniTocItems }: MiniTocsPropsT) {
4645
return (
4746
<>
4847
<Heading as="h2" id="in-this-article" className="mb-1 ml-3" sx={{ fontSize: 1 }}>
49-
<Link href="#in-this-article">{t('miniToc')}</Link>
48+
{t('miniToc')}
5049
</Heading>
5150

5251
<NavList className="my-2" key={pageTitle}>

content/account-and-profile/managing-subscriptions-and-notifications-on-github/managing-subscriptions-for-activity-on-github/managing-your-subscriptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ When you unwatch a repository, you unsubscribe from future updates from that rep
7272
- Ignore all notifications for a repository
7373
- If enabled, customize the types of event you receive notifications for ({% data reusables.notifications-v2.custom-notification-types %})
7474

75-
{%- ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5819 %}
75+
{%- ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %}
7676
1. Optionally, to unsubscribe from all repositories owned by a given user or organization, select the **Unwatch all** dropdown and click the organization whose repositories you'd like to unsubscribe from. The button to unwatch all repositories is only available if you are watching all activity or custom notifications on over 10 repositories.
7777

7878
![Screenshot of the Unwatch All button.](/assets/images/help/notifications-v2/unsubscribe-from-all-repos.png)

0 commit comments

Comments
 (0)