You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix broken cross-package Haddock links on the hosted documentation site. Links to dependency packages (cardano-ledger-*, plutus-*, cardano-base, etc.) were relative paths pointing to directories that don't exist on the site, resulting in 404s. A post-processing script now resolves each cross-package href via a name-suffix heuristic under *.cardano.intersectmbo.org plus a small fallback list of known IOG doc-site roots, and rewrites them to absolute URLs. Hrefs that don't resolve become annotated unclickable spans with tooltips. A follow-up GitHub Actions step opens or comments on a rolling tracking issue when the script reports actionable dead links on master, tagging the PR opener so the breakage lands on someone's board instead of going unnoticed.
// ─── 4. Branch on whether one was found ─────────────────────
180
+
if (issues.length > 0) {
181
+
// Existing open issue → comment on it; don't open a duplicate.
182
+
// Also add the new breaker as an assignee (idempotent — if
183
+
// they're already assigned the API silently no-ops).
184
+
const existing = issues[0];
185
+
await github.rest.issues.createComment({
186
+
owner: context.repo.owner,
187
+
repo: context.repo.repo,
188
+
issue_number: existing.number,
189
+
body: commentBody,
190
+
});
191
+
try {
192
+
await github.rest.issues.addAssignees({
193
+
owner: context.repo.owner,
194
+
repo: context.repo.repo,
195
+
issue_number: existing.number,
196
+
assignees: [author],
197
+
});
198
+
} catch (e) {
199
+
// External contributors aren't repo collaborators, so the API
200
+
// returns 422 here. Log and continue rather than crashing the
201
+
// step — the comment was posted, which is the important part.
202
+
console.log(`Could not assign @${author} to #${existing.number} (likely not a repo collaborator): ${e.message}`);
203
+
}
204
+
console.log(`Appended to existing issue #${existing.number}: ${existing.html_url}`);
205
+
} else {
206
+
// No open issue → create one. The body documents the fix
207
+
// recipe so the assignee doesn't need to find it elsewhere.
208
+
const issueBody = [
209
+
`Tracking issue for post-merge \`Update github pages\` workflow failures on the haddock-links check. The Deploy step skips on failure, so the published docs site stays at its last good revision until this issue is resolved.`,
210
+
``,
211
+
`## How to fix`,
212
+
``,
213
+
`For each package listed under \`=== Actionable — fix these ===\` in the failing run:`,
214
+
``,
215
+
`1. Check the package's source repo for a published Haddocks site (gh-pages, CloudFront, etc.).`,
216
+
`2. If found: append the base URL to \`IOG_DOC_BASES\` in \`scripts/fix-haddock-links.sh\`.`,
217
+
`3. If genuinely unpublished: add the package name to \`KNOWN_UNDOCUMENTED\`.`,
218
+
``,
219
+
`Then re-run the workflow from the Actions tab. Close this issue once the workflow goes green again.`,
220
+
``,
221
+
`---`,
222
+
``,
223
+
commentBody,
224
+
].join('\n');
225
+
// Create the issue without assignees first — passing assignees
226
+
// to issues.create makes the whole call 422 for non-collaborator
227
+
// authors. We assign separately so the issue always lands.
228
+
const created = await github.rest.issues.create({
229
+
owner: context.repo.owner,
230
+
repo: context.repo.repo,
231
+
title: titleText,
232
+
body: issueBody,
233
+
labels: [labelName],
234
+
});
235
+
try {
236
+
await github.rest.issues.addAssignees({
237
+
owner: context.repo.owner,
238
+
repo: context.repo.repo,
239
+
issue_number: created.data.number,
240
+
assignees: [author],
241
+
});
242
+
} catch (e) {
243
+
console.log(`Could not assign @${author} to #${created.data.number} (likely not a repo collaborator): ${e.message}`);
0 commit comments