Skip to content

Commit

Permalink
Fix workflow for spec monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
dontcallmedom committed Feb 3, 2025
1 parent 1784f95 commit 28eaba9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spec-monitor.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { dirname, resolve } from "path";
import { fileURLToPath } from "url";


import webSpecs from 'web-specs/index.json' with { type: 'json' };
import cgTransitions from './cg-transitions.json' with {type: 'json' };
import cgImplementations from './spec-implementations.json' with {type: 'json' };
Expand All @@ -14,7 +18,7 @@ function log(m) {

const cgShortname = "wicg";
const cgRepoOrg = "WICG";
const webrefPath = process.argv[2];
const webrefPath = resolve(dirname(fileURLToPath(import.meta.url)), process.argv[2]);

const repoData = await (await fetch("https://w3c.github.io/validate-repos/report.json")).json();
const webrefIndex = JSON.parse(await fs.readFile(webrefPath + "/ed/index.json", "utf-8"));
Expand Down Expand Up @@ -78,7 +82,7 @@ for (const repo of repoData.repos.filter(r => r.w3c?.["repo-type"]?.includes("cg
continue;
}

const crawledSpec = webref.results.find(s => s.shortname === spec.shortname);
const crawledSpec = webrefIndex.results.find(s => s.shortname === spec.shortname);
let lastModificationDate;

if (crawledSpec?.date) {
Expand Down

0 comments on commit 28eaba9

Please sign in to comment.