Skip to content

Commit b02a371

Browse files
authored
Merge pull request #191 from GetTechAPI/develop
release: publish the /v1/games pointer, triage timeout handling
2 parents 030ef81 + fe7e217 commit b02a371

2 files changed

Lines changed: 5 additions & 15 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,6 @@ jobs:
4848
run: |
4949
mkdir -p _site
5050
cp -r site/dist/. _site/
51-
# Games remain versioned static source data in this repository, but
52-
# publishing nearly one million per-record files exceeds the fixed
53-
# GitHub Pages deployment window. Keep the public homepage artifact
54-
# to the collections it can serve reliably.
55-
rm -rf _site/v1/games
56-
node <<'NODE'
57-
const fs = require("fs");
58-
const path = "_site/v1/index.json";
59-
const manifest = JSON.parse(fs.readFileSync(path, "utf8"));
60-
delete manifest.collections?.games;
61-
fs.writeFileSync(path, JSON.stringify(manifest, null, 2) + "\n");
62-
NODE
6351
touch _site/.nojekyll
6452
6553
- uses: actions/upload-pages-artifact@v3

.github/workflows/pr-metadata.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,17 @@ jobs:
4040
pull_number: issue_number,
4141
per_page: 100,
4242
});
43-
// GitHub refuses the file list for very large PRs (dump refreshes:
44-
// 422 "diff is taking too long to generate"); label from what we got.
43+
// GitHub cannot produce the file list for very large PRs (dump
44+
// refreshes): 422 "diff is taking too long to generate", or a plain
45+
// 504 when it gives up later. Label from whatever arrived.
46+
const NO_FILE_LIST = new Set([422, 502, 503, 504]);
4547
try {
4648
for await (const { data } of fileIterator) {
4749
files.push(...data);
4850
if (files.length >= FILE_SCAN_LIMIT) break;
4951
}
5052
} catch (error) {
51-
if (error.status !== 422) throw error;
53+
if (!NO_FILE_LIST.has(error.status)) throw error;
5254
core.warning(`PR file list unavailable (${error.message}); path labels skipped`);
5355
}
5456
const filesWereCapped = (pr.changed_files || files.length) > files.length;

0 commit comments

Comments
 (0)