Skip to content

Commit

Permalink
fix: increase semantic-release retires for GitHub API ratelimit (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
giladgd authored Sep 25, 2024
1 parent 1291b97 commit 4478fbf
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 24 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ jobs:
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > ~/.npmrc
export DRY_RUN_RESULT_FILE_PATH="$(pwd)/semanticReleaseDryRunReleaseResult.json"
git apply --ignore-whitespace ./scripts/patches/@semantic-release+github+11.0.0.patch
npx semantic-release
- name: Set npm package url to GITHUB_OUTPUT
id: set-npm-url
Expand Down
143 changes: 123 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,14 @@
"@nolebase/vitepress-plugin-og-image": "^2.5.0",
"@resvg/resvg-js": "^2.6.2",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/github": "11.0.0",
"@semantic-release/npm": "12.0.1",
"@shikijs/vitepress-twoslash": "^1.18.0",
"@types/async-retry": "^1.4.8",
"@types/bytes": "^3.1.4",
"@types/cross-spawn": "^6.0.2",
"@types/fs-extra": "^11.0.4",
"@types/node": "^22.5.5",
"@types/node": "^22.7.0",
"@types/proper-lockfile": "^4.1.4",
"@types/semver": "^7.5.8",
"@types/validate-npm-package-name": "^4.0.2",
Expand All @@ -159,8 +160,8 @@
"sharp": "^0.33.5",
"tslib": "^2.7.0",
"typedoc": "^0.26.7",
"typedoc-plugin-markdown": "^4.2.7",
"typedoc-plugin-mdn-links": "^3.3.0",
"typedoc-plugin-markdown": "^4.2.8",
"typedoc-plugin-mdn-links": "^3.3.1",
"typedoc-vitepress-theme": "^1.0.1",
"typescript": "^5.6.2",
"vite-node": "^2.1.1",
Expand All @@ -181,7 +182,7 @@
"filenamify": "^6.0.0",
"fs-extra": "^11.2.0",
"ignore": "^5.3.2",
"ipull": "^3.7.2",
"ipull": "^3.7.4",
"is-unicode-supported": "^2.1.0",
"lifecycle-utils": "^1.7.0",
"log-symbols": "^7.0.0",
Expand Down
11 changes: 11 additions & 0 deletions scripts/patches/@semantic-release+github+11.0.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff --git a/node_modules/@semantic-release/github/lib/definitions/retry.js b/node_modules/@semantic-release/github/lib/definitions/retry.js
index 9b5021c..b684e52 100644
--- a/node_modules/@semantic-release/github/lib/definitions/retry.js
+++ b/node_modules/@semantic-release/github/lib/definitions/retry.js
@@ -5,5 +5,5 @@ export const RETRY_CONF = {
// By default, Octokit does not retry on 404s.
// But we want to retry on 404s to account for replication lag.
doNotRetry: [400, 401, 403, 422],
- retries: 3,
+ retries: 25,
};

0 comments on commit 4478fbf

Please sign in to comment.