Skip to content

Commit

Permalink
Fix download-build script (#25493)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
acdlite authored Oct 16, 2022
1 parent 780eacd commit 3ba788f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/release/shared-commands/get-build-id-for-commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function getBuildIdForCommit(sha, allowBrokenCI = false) {
const retryLimit = Date.now() + RETRY_TIMEOUT;
retry: while (true) {
const statusesResponse = await fetch(
`https://api.github.com/repos/facebook/react/commits/${sha}/status`
`https://api.github.com/repos/facebook/react/commits/${sha}/status?per_page=100`
);

if (!statusesResponse.ok) {
Expand Down

0 comments on commit 3ba788f

Please sign in to comment.