Skip to content

Commit 7ba697a

Browse files
committed
Fix comment and clear time component
1 parent 74374a3 commit 7ba697a

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

pr-checks/update-ghes-versions.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ export function determineSupportedRange(
129129
apiCompatibilityData: ApiCompatibility,
130130
releases: EnterpriseReleases,
131131
): ApiCompatibility {
132+
// We only care about the UTC date component.
133+
today.setUTCHours(0, 0, 0, 0);
134+
132135
// Our goal is to identify the oldest and newest GHES release we should support.
133136
// We begin with `oldestSupportRelease = undefined` so that we determine the
134137
// minimum from scratch and don't stick to `apiCompatibilityData.minimumVersion`
@@ -160,9 +163,9 @@ export function determineSupportedRange(
160163
continue;
161164
}
162165

163-
// If the GHES release is newer than the current, newest release we support,
164-
// check whether at least two weeks have passed since the feature freeze date
165-
// so we don't set `newestSupportedRelease` too early.
166+
// Set `newestSupportedRelease` to a GHES release if it has a greater version
167+
// than the current `newestSupportedRelease` and the feature freeze has
168+
// already happened or will be in the next two weeks.
166169
if (semver.compare(releaseVersion, newestSupportedRelease) > 0) {
167170
const featureFreezeDate = new Date(releaseData.feature_freeze);
168171
if (featureFreezeDate < addWeeks(today, 2)) {

0 commit comments

Comments
 (0)