1
0
mirror of synced 2026-01-31 09:01:33 -05:00

Merge pull request #7432 from github/repo-sync

repo sync
This commit is contained in:
Octomerger Bot
2021-06-17 01:44:18 +10:00
committed by GitHub

View File

@@ -17,8 +17,9 @@ module.exports = async function releaseNotesContext (req, res, next) {
const [requestedPlan, requestedRelease] = req.context.currentVersion.split('@')
const releaseNotesPerPlan = req.context.site.data['release-notes'][requestedPlan]
// 404 if no release notes can be found
// 404 if no release notes can be found or the requested release is not valid
if (!releaseNotesPerPlan) return next()
if (!all.includes(requestedRelease)) return next()
// Release notes handling differs if version has numbered releases (like GHES) or not (like GHAE)
const hasNumberedReleases = !(requestedRelease === 'latest')