Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/tier-check/checks/spec-tracking.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { Octokit } from '@octokit/rest';
import { SpecTrackingResult } from '../types';

// Lockstep SDKs publish in the hours before the spec release is tagged;
// a release up to this long before it counts as the release for that spec.
const LEAD_MS = 24 * 60 * 60 * 1000;

export async function checkSpecTracking(
octokit: Octokit,
owner: string,
Expand Down Expand Up @@ -38,7 +42,7 @@ export async function checkSpecTracking(
// Reverse so oldest-first, then find the FIRST SDK release after the spec
const oldestFirst = [...nonDraftSdkReleases].reverse();
const firstSdkAfterSpec = oldestFirst.find(
(r) => new Date(r.published_at!) >= specDate
(r) => new Date(r.published_at!).getTime() >= specDate.getTime() - LEAD_MS
);

if (!firstSdkAfterSpec) {
Expand Down
Loading