Skip to content

Commit 4d74e8c

Browse files
authored
Merge branch 'main' into nattywombat-redirect-pizza-1
2 parents 8129498 + a616756 commit 4d74e8c

File tree

171 files changed

+812
-503
lines changed

Some content is hidden

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

171 files changed

+812
-503
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ redirect_from:
77
- /actions/deployment/security-hardening-your-deployments/using-oidc-with-your-reusable-workflows
88
versions:
99
fpt: '*'
10-
ghae: issue-4757-and-5856
10+
ghae: issue-4757
1111
ghec: '*'
1212
ghes: '>=3.5'
1313
type: how_to

content/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ versions:
66
ghes: '*'
77
ghae: '*'
88
ghec: '*'
9-
redirect_from:
10-
- /github/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections
9+
redirect_from:
10+
- /github/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections
1111
shortTitle: Collapsed sections
1212
---
1313
## Creating a collapsed section

content/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ versions:
66
ghes: '*'
77
ghae: '*'
88
ghec: '*'
9-
redirect_from:
10-
- /github/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests
9+
redirect_from:
10+
- /github/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests
1111
topics:
1212
- Issues
1313
- Pull requests

data/features/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ versions:
4545

4646
## Schema enforcement
4747

48-
The schema for validating the feature versioning lives in [`tests/helpers/schemas/feature-versions-schema.js`](/tests/helpers/schemas/feature-versions-schema.js) and is exercised by [`tests/linting/lint-files.js`](/tests/linting/lint-files.js).
48+
The schema for validating the feature versioning lives in [`tests/helpers/schemas/feature-versions-schema.js`](/tests/helpers/schemas/feature-versions-schema.js) and is exercised by [`tests/linting/lint-versioning.js`](/tests/linting/lint-versioning.js).
4949

5050
## Script to remove feature tags
5151

data/graphql/ghae/schema.docs-ghae.graphql

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11750,12 +11750,12 @@ The possible roles for enterprise membership.
1175011750
"""
1175111751
enum EnterpriseUserAccountMembershipRole {
1175211752
"""
11753-
The user is a member of the enterprise membership.
11753+
The user is a member of an organization in the enterprise.
1175411754
"""
1175511755
MEMBER
1175611756

1175711757
"""
11758-
The user is an owner of the enterprise membership.
11758+
The user is an owner of an organization in the enterprise.
1175911759
"""
1176011760
OWNER
1176111761
}
@@ -32816,6 +32816,11 @@ type Repository implements Node & ProjectOwner & RepositoryInfo & Starrable & Su
3281632816
"""
3281732817
squashMergeAllowed: Boolean!
3281832818

32819+
"""
32820+
Whether a squash merge commit can use the pull request title as default.
32821+
"""
32822+
squashPrTitleUsedAsDefault: Boolean!
32823+
3281932824
"""
3282032825
The SSH URL to clone this repository
3282132826
"""

data/graphql/ghec/schema.docs.graphql

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8174,6 +8174,11 @@ enum DependencyGraphEcosystem {
81748174
Ruby gems hosted at RubyGems.org
81758175
"""
81768176
RUBYGEMS
8177+
8178+
"""
8179+
Rust crates
8180+
"""
8181+
RUST
81778182
}
81788183

81798184
"""
@@ -12813,12 +12818,12 @@ The possible roles for enterprise membership.
1281312818
"""
1281412819
enum EnterpriseUserAccountMembershipRole {
1281512820
"""
12816-
The user is a member of the enterprise membership.
12821+
The user is a member of an organization in the enterprise.
1281712822
"""
1281812823
MEMBER
1281912824

1282012825
"""
12821-
The user is an owner of the enterprise membership.
12826+
The user is an owner of an organization in the enterprise.
1282212827
"""
1282312828
OWNER
1282412829
}
@@ -37285,6 +37290,11 @@ type Repository implements Node & PackageOwner & ProjectOwner & RepositoryInfo &
3728537290
"""
3728637291
squashMergeAllowed: Boolean!
3728737292

37293+
"""
37294+
Whether a squash merge commit can use the pull request title as default.
37295+
"""
37296+
squashPrTitleUsedAsDefault: Boolean!
37297+
3728837298
"""
3728937299
The SSH URL to clone this repository
3729037300
"""

data/graphql/schema.docs.graphql

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8174,6 +8174,11 @@ enum DependencyGraphEcosystem {
81748174
Ruby gems hosted at RubyGems.org
81758175
"""
81768176
RUBYGEMS
8177+
8178+
"""
8179+
Rust crates
8180+
"""
8181+
RUST
81778182
}
81788183

81798184
"""
@@ -12813,12 +12818,12 @@ The possible roles for enterprise membership.
1281312818
"""
1281412819
enum EnterpriseUserAccountMembershipRole {
1281512820
"""
12816-
The user is a member of the enterprise membership.
12821+
The user is a member of an organization in the enterprise.
1281712822
"""
1281812823
MEMBER
1281912824

1282012825
"""
12821-
The user is an owner of the enterprise membership.
12826+
The user is an owner of an organization in the enterprise.
1282212827
"""
1282312828
OWNER
1282412829
}
@@ -37285,6 +37290,11 @@ type Repository implements Node & PackageOwner & ProjectOwner & RepositoryInfo &
3728537290
"""
3728637291
squashMergeAllowed: Boolean!
3728737292

37293+
"""
37294+
Whether a squash merge commit can use the pull request title as default.
37295+
"""
37296+
squashPrTitleUsedAsDefault: Boolean!
37297+
3728837298
"""
3728937299
The SSH URL to clone this repository
3729037300
"""

lib/all-versions.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const plans = [
1616
releases: [latestNonNumberedRelease],
1717
latestRelease: latestNonNumberedRelease,
1818
nonEnterpriseDefault: true, // permanent way to refer to this plan if the name changes
19+
hasNumberedReleases: false,
1920
openApiBaseName: 'api.github.com', // used for REST
2021
miscBaseName: 'dotcom', // used for GraphQL and webhooks
2122
},
@@ -25,6 +26,7 @@ const plans = [
2526
shortName: 'ghec',
2627
releases: [latestNonNumberedRelease],
2728
latestRelease: latestNonNumberedRelease,
29+
hasNumberedReleases: false,
2830
openApiBaseName: 'api.github.com',
2931
miscBaseName: 'ghec',
3032
},
@@ -44,8 +46,11 @@ const plans = [
4446
shortName: 'ghae',
4547
releases: [latestNonNumberedRelease],
4648
latestRelease: latestNonNumberedRelease,
49+
hasNumberedReleases: false,
4750
openApiBaseName: 'github.ae',
4851
miscBaseName: 'ghae',
52+
allowedFrontmatterPattern: '^issue-\\d+?$',
53+
allowedInlinePattern: '^ghae-issue-\\d+?$',
4954
},
5055
]
5156

lib/frontmatter.js

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ const layoutNames = [
1414
'release-notes',
1515
false,
1616
]
17-
const semverValidRange = semver.validRange
18-
const semverRange = {
19-
type: 'string',
20-
conform: semverValidRange,
21-
message: 'Must be a valid SemVer range',
22-
}
23-
const versionObjs = Object.values(allVersions)
2417

2518
const guideTypes = ['overview', 'quick_start', 'tutorial', 'how_to', 'reference']
2619
const featureVersions = fs
@@ -246,19 +239,44 @@ const featureVersionsProp = {
246239
},
247240
}
248241

242+
const asteriskPattern = /^\*$/
243+
249244
schema.properties.versions = {
250245
type: ['object', 'string'], // allow a '*' string to indicate all versions
251246
required: true,
252-
properties: versionObjs.reduce((acc, versionObj) => {
253-
acc[versionObj.plan] = semverRange
254-
acc[versionObj.shortName] = semverRange
247+
additionalProperties: false, // don't allow any versions in FM that aren't defined in lib/all-versions
248+
properties: Object.values(allVersions).reduce((acc, versionObj) => {
249+
acc[versionObj.plan] = getValidProps(versionObj)
250+
acc[versionObj.shortName] = getValidProps(versionObj)
255251
return acc
256252
}, featureVersionsProp),
257253
}
258254

259-
// Support 'github-ae': next
260-
schema.properties.versions.properties['github-ae'] = 'next'
261-
schema.properties.versions.properties.ghae = 'next'
255+
function getValidProps(versionObj) {
256+
const valid = { type: 'string' }
257+
258+
// The properties attached to versionObj are defined in lib/all-versions.js.
259+
260+
// If a version has no numbered releases or exception pattern, the only valid value is '*'.
261+
if (!(versionObj.hasNumberedReleases || versionObj.allowedFrontmatterPattern)) {
262+
valid.pattern = asteriskPattern
263+
valid.message = `Must have a value of '*'`
264+
}
265+
266+
// If a version has an exception pattern, both '*' and the exception pattern are valid.
267+
if (versionObj.allowedFrontmatterPattern) {
268+
valid.pattern = new RegExp(`${asteriskPattern.source}|${versionObj.allowedFrontmatterPattern}`)
269+
valid.message = `Must have a value of '*' or 'issue-###', where ### is an integer`
270+
}
271+
272+
// If a version has numbered releases, any semver range is valid. Note '*' is a valid semver range.
273+
if (versionObj.hasNumberedReleases) {
274+
valid.conform = semver.validRange
275+
valid.message = 'Must be a valid SemVer range'
276+
}
277+
278+
return valid
279+
}
262280

263281
function frontmatter(markdown, opts = {}) {
264282
const defaults = {

lib/graphql/static/changelog.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
[
2+
{
3+
"schemaChanges": [
4+
{
5+
"title": "The GraphQL schema includes these changes:",
6+
"changes": [
7+
"Enum value `RUST` was added to enum `DependencyGraphEcosystem`",
8+
"Field `squashPrTitleUsedAsDefault` was added to object type `Repository`"
9+
]
10+
}
11+
],
12+
"previewChanges": [],
13+
"upcomingChanges": [],
14+
"date": "2022-06-10"
15+
},
216
{
317
"schemaChanges": [
418
{

0 commit comments

Comments
 (0)