Skip to content

Commit 74d02fe

Browse files
committed
Checking W3C group homepages
1 parent c42c7d6 commit 74d02fe

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/2026.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,18 +327,19 @@ async function compute(group, template, deliverables, charter) {
327327
status('Checking W3C group homepages...');
328328
const groups = await w3cgroups();
329329
checkGroups.forEach(a => {
330-
const name = a.textContent.trim();
330+
const name = a.textContent.replace(/ \([A-Z]+\)/g, '').trim();
331331
const href = a.href;
332332
let match = groups.find(g => g.name === name);
333333
if (!match) {
334334
// try to be more flexible
335335
match = groups.find(g => g["_links"]["homepage"] === href);
336336
}
337337
if (match && match["_links"]["homepage"]) {
338-
a.href = match["_links"]["homepage"].href;
338+
a.href = `https://www.w3.org/groups/${match.identifier}/`;
339339
a.textContent = match.name;
340340
} else {
341-
// the group might have been closed or changed name
341+
// the group might have been closed or changed name?
342+
console.warn(`Could not verify W3C group for coordination: [${name}](${href})`);
342343
a.classList.add('todo');
343344
}
344345
});
@@ -545,6 +546,9 @@ async function w3cgroups() {
545546
yield v;
546547
}
547548
for await (const group of listGroups()) {
549+
if (group._links?.self?.href) {
550+
group.identifier = group._links.self.href.replace(`${config.w3cAPI}/groups/`, '');
551+
}
548552
groups.push(group);
549553
}
550554
return groups;

0 commit comments

Comments
 (0)