Skip to content

Commit 3ba788f

Browse files
authored
Fix download-build script (#25493)
The download-build script works by scraping the CircleCI job number from the GitHub status API. Yes, I know this is super hacky but last I checked this was the least bad of not a lot of options. Because the response is paginated, sometimes the status for the build job exceeds the page size. This increases the page size to 100 so this is less likely to happen. It'd be great to find a better way to download the artifacts. I don't love how brittle this solution is. I think switching to the GitHub Checks API might be worth trying, but last I looked into it, it has other flaws.
1 parent 780eacd commit 3ba788f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/release/shared-commands/get-build-id-for-commit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async function getBuildIdForCommit(sha, allowBrokenCI = false) {
1919
const retryLimit = Date.now() + RETRY_TIMEOUT;
2020
retry: while (true) {
2121
const statusesResponse = await fetch(
22-
`https://api.github.com/repos/facebook/react/commits/${sha}/status`
22+
`https://api.github.com/repos/facebook/react/commits/${sha}/status?per_page=100`
2323
);
2424

2525
if (!statusesResponse.ok) {

0 commit comments

Comments
 (0)