Skip to content

Commit b7f48ea

Browse files
sarahspeterbemattpollard
authored
Support GHAE internal-only semantic versioning (github#29178)
Co-authored-by: Peter Bengtsson <[email protected]> Co-authored-by: Matt Pollard <[email protected]>
1 parent eeda4f2 commit b7f48ea

File tree

298 files changed

+890
-863
lines changed

Some content is hidden

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

298 files changed

+890
-863
lines changed

components/context/ProductLandingContext.tsx

+2-2
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

+2-2
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

+9-6
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

+20-43
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

+2-1
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

+1-2
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>

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

+1-1
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)

content/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Email notifications from {% data variables.product.product_location %} contain t
141141
- There are updates in repositories or team discussions you're watching or in a conversation you're participating in. For more information, see "[About participating and watching notifications](#about-participating-and-watching-notifications)."
142142
- You gain access to a new repository or you've joined a new team. For more information, see "[Automatic watching](#automatic-watching)."
143143
- There are new {% data variables.product.prodname_dependabot_alerts %} in your repository. For more information, see "[{% data variables.product.prodname_dependabot_alerts %} notification options](#dependabot-alerts-notification-options)." {% ifversion fpt or ghec %}
144-
- There are workflow runs updates on repositories set up with {% data variables.product.prodname_actions %}. For more information, see "[{% data variables.product.prodname_actions %} notification options](#github-actions-notification-options)."{% endif %}{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5668 %}
144+
- There are workflow runs updates on repositories set up with {% data variables.product.prodname_actions %}. For more information, see "[{% data variables.product.prodname_actions %} notification options](#github-actions-notification-options)."{% endif %}{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %}
145145
- There are new deploy keys added to repositories that belong to organizations that you're an owner of. For more information, see "[Organization alerts notification options](#organization-alerts-notification-options)."{% endif %}
146146

147147
## Automatic watching
@@ -206,7 +206,7 @@ Choose how you want to receive workflow run updates for repositories that you ar
206206

207207
{% endif %}
208208

209-
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5668 %}
209+
{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %}
210210
## Organization alerts notification options
211211

212212
If you're an organization owner, you'll receive email notifications by default when organization members add new deploy keys to repositories within the organization. You can unsubscribe from these notifications. On the notification settings page, under "Organization alerts", unselect **Email**.

content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ If you're a member of an {% data variables.product.prodname_emu_enterprise %}, y
3838
1. Ask for the username of the person you're inviting as a collaborator.{% ifversion fpt or ghec %} If they don't have a username yet, they can sign up for {% data variables.product.prodname_dotcom %} For more information, see "[Signing up for a new {% data variables.product.prodname_dotcom %} account](/articles/signing-up-for-a-new-github-account)".{% endif %}
3939
{% data reusables.repositories.navigate-to-repo %}
4040
{% data reusables.repositories.sidebar-settings %}
41-
{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658%}
41+
{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4%}
4242
{% data reusables.repositories.click-collaborators-teams %}
4343
1. Click **Invite a collaborator**.
4444
!["Invite a collaborator" button](/assets/images/help/repository/invite-a-collaborator-button.png)

content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ While forks of private repositories are deleted when a collaborator is removed,
3030

3131
{% data reusables.repositories.navigate-to-repo %}
3232
{% data reusables.repositories.sidebar-settings %}
33-
{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %}
33+
{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %}
3434
{% data reusables.repositories.click-collaborators-teams %}
3535
4. To the right of the collaborator you want to remove, click {% octicon "trash" aria-label="The trash icon" %}.
3636
![Button to remove collaborator](/assets/images/help/repository/collaborator-remove.png)

content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ topics:
2121
shortTitle: Remove yourself
2222
---
2323
{% data reusables.user-settings.access_settings %}
24-
{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-5658 %}
24+
{% ifversion fpt or ghec or ghes > 3.4 or ghae > 3.4 %}
2525
2. In the "Code, planning, and automation" section of the sidebar, click **{% octicon "repo" aria-label="The repo icon" %} Repositories**.
2626
{% else %}
2727
2. In the left sidebar, click **Repositories**.

content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-your-tab-size-rendering-preference.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Managing your tab size rendering preference
33
intro: You can manage the number of spaces a tab is equal to for your personal account.
44
versions:
55
fpt: '*'
6-
ghae: issue-5083
6+
ghae: '>= 3.4'
77
ghes: '>=3.4'
88
ghec: '*'
99
topics:

content/actions/creating-actions/creating-a-javascript-action.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ Once you complete this project, you should understand how to build your own Java
3737

3838
Before you begin, you'll need to download Node.js and create a public {% data variables.product.prodname_dotcom %} repository.
3939

40-
1. Download and install Node.js {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}16.x{% else %}12.x{% endif %}, which includes npm.
40+
1. Download and install Node.js {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}16.x{% else %}12.x{% endif %}, which includes npm.
4141

42-
{% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}https://nodejs.org/en/download/{% else %}https://nodejs.org/en/download/releases/{% endif %}
42+
{% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}https://nodejs.org/en/download/{% else %}https://nodejs.org/en/download/releases/{% endif %}
4343

4444
1. Create a new public repository on {% data variables.product.product_location %} and call it "hello-world-javascript-action". For more information, see "[Create a new repository](/articles/creating-a-new-repository)."
4545

@@ -73,7 +73,7 @@ outputs:
7373
time: # id of output
7474
description: 'The time we greeted you'
7575
runs:
76-
using: {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}'node16'{% else %}'node12'{% endif %}
76+
using: {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}'node16'{% else %}'node12'{% endif %}
7777
main: 'index.js'
7878
```
7979

content/actions/creating-actions/metadata-syntax-for-github-actions.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -145,19 +145,19 @@ For more information on how to use context syntax, see "[Contexts](/actions/lear
145145

146146
**Required** Configures the path to the action's code and the runtime used to execute the code.
147147

148-
### Example: Using Node.js {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}v16{% else %}v12{% endif %}
148+
### Example: Using Node.js {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}v16{% else %}v12{% endif %}
149149

150150
```yaml
151151
runs:
152-
using: {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}'node16'{% else %}'node12'{% endif %}
152+
using: {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}'node16'{% else %}'node12'{% endif %}
153153
main: 'main.js'
154154
```
155155

156156
### `runs.using`
157157

158158
**Required** The runtime used to execute the code specified in [`main`](#runsmain).
159159

160-
- Use `node12` for Node.js v12.{% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}
160+
- Use `node12` for Node.js v12.{% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}
161161
- Use `node16` for Node.js v16.{% endif %}
162162

163163
### `runs.main`
@@ -172,7 +172,7 @@ In this example, the `pre:` action runs a script called `setup.js`:
172172

173173
```yaml
174174
runs:
175-
using: {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}'node16'{% else %}'node12'{% endif %}
175+
using: {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}'node16'{% else %}'node12'{% endif %}
176176
pre: 'setup.js'
177177
main: 'index.js'
178178
post: 'cleanup.js'
@@ -199,7 +199,7 @@ In this example, the `post:` action runs a script called `cleanup.js`:
199199

200200
```yaml
201201
runs:
202-
using: {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}'node16'{% else %}'node12'{% endif %}
202+
using: {% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}'node16'{% else %}'node12'{% endif %}
203203
main: 'index.js'
204204
post: 'cleanup.js'
205205
```
@@ -271,7 +271,7 @@ For more information, see "[`github context`](/actions/reference/context-and-exp
271271
**Required** The shell where you want to run the command. You can use any of the shells listed [here](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsshell). Required if `run` is set.
272272
{% endif %}
273273

274-
{% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}
274+
{% ifversion fpt or ghes > 3.3 or ghae > 3.3 or ghec %}
275275
#### `runs.steps[*].if`
276276

277277
**Optional** You can use the `if` conditional to prevent a step from running unless a condition is met. You can use any supported context and expression to create a conditional.
@@ -369,7 +369,7 @@ runs:
369369
```
370370
{% endif %}
371371

372-
{% ifversion ghes > 3.5 or ghae-issue-6573 %}
372+
{% ifversion ghes > 3.5 or ghae > 3.5 %}
373373

374374
#### `runs.steps[*].continue-on-error`
375375

content/actions/deployment/security-hardening-your-deployments/using-openid-connect-with-reusable-workflows.md

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ redirect_from:
77
- /actions/deployment/security-hardening-your-deployments/using-oidc-with-your-reusable-workflows
88
versions:
99
fpt: '*'
10-
ghae: issue-4757
1110
ghec: '*'
1211
ghes: '>=3.5'
1312
type: how_to

content/actions/examples/using-concurrency-expressions-and-a-test-matrix.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ intro: 'How to use advanced {% data variables.product.prodname_actions %} featur
55
versions:
66
fpt: '*'
77
ghes: '>= 3.5'
8-
ghae: issue-4925
8+
ghae: '>= 3.5'
99
ghec: '*'
1010
type: how_to
1111
topics:

content/actions/hosting-your-own-runners/adding-self-hosted-runners.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ You can set up automation to scale the number of self-hosted runners. For more i
4646

4747
You can add self-hosted runners to a single repository. To add a self-hosted runner to a user repository, you must be the repository owner. For an organization repository, you must be an organization owner or have admin access to the repository. For information about how to add a self-hosted runner with the REST API, see "[Self-hosted runners](/rest/reference/actions#self-hosted-runners)."
4848

49-
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5091 %}
49+
{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %}
5050
{% data reusables.repositories.navigate-to-repo %}
5151
{% data reusables.repositories.sidebar-settings %}
5252
{% data reusables.repositories.settings-sidebar-actions-runners %}
@@ -67,7 +67,7 @@ For more information, see "[Monitoring and troubleshooting self-hosted runners](
6767

6868
You can add self-hosted runners at the organization level, where they can be used to process jobs for multiple repositories in an organization. To add a self-hosted runner to an organization, you must be an organization owner. For information about how to add a self-hosted runner with the REST API, see "[Self-hosted runners](/rest/reference/actions#self-hosted-runners)."
6969

70-
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5091 %}
70+
{% ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %}
7171
{% data reusables.organizations.navigate-to-org %}
7272
{% data reusables.organizations.org_settings %}
7373
{% data reusables.organizations.settings-sidebar-actions-runners %}
@@ -93,7 +93,7 @@ For more information, see "[Monitoring and troubleshooting self-hosted runners](
9393
{% ifversion ghec or ghes or ghae %}
9494
New runners are assigned to the default group. You can modify the runner's group after you've registered the runner. For more information, see "[Managing access to self-hosted runners](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#moving-a-self-hosted-runner-to-a-group)."
9595

96-
{% ifversion ghec or ghes > 3.3 or ghae-issue-5091 %}
96+
{% ifversion ghec or ghes > 3.3 or ghae > 3.3 %}
9797

9898
To add a self-hosted runner to an enterprise, you must be an enterprise owner. For information about how to add a self-hosted runner with the REST API, see the enterprise endpoints in the [{% data variables.product.prodname_actions %} REST API](/rest/reference/actions#self-hosted-runners).
9999

0 commit comments

Comments
 (0)