Skip to content

Commit 76650e4

Browse files
committed
add GHAE to the "next" version exception so we do not throw an error
1 parent 25c3225 commit 76650e4

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

lib/check-if-next-version-only.js

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
import { next, latest } from './enterprise-server-releases.js'
22
import versionSatisfiesRange from './version-satisfies-range.js'
33

4-
// Special handling for frontmatter that evalues to the next GHES release number or a hardcoded `next`:
5-
// we don't want to return it as an applicable version or it will become a permalink,
6-
// but we also don't want to throw an error if no other versions are found.
4+
// Special handling for frontmatter that evalues to the next GHES release number,
5+
// GHAE `issue-\d{4}` or a hardcoded `next`. We don't want to return any of these
6+
// as an applicable version or it will become a permalink, but we also don't want
7+
// to throw an error if no other versions are found.
78
export default function checkIfNextVersionOnly(value) {
89
if (value === '*') return false
910

10-
const ghesNextVersionOnly =
11+
const ghesNextVersion =
1112
versionSatisfiesRange(next, value) && !versionSatisfiesRange(latest, value)
1213

13-
return ghesNextVersionOnly || value === 'next'
14+
const ghaeUpcomingVersion = value.includes('issue-')
15+
16+
return ghesNextVersion || ghaeUpcomingVersion || value === 'next'
1417
}

0 commit comments

Comments
 (0)