Skip to content

Commit

Permalink
🔖 Release v1.17.6 [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
BetaHuhnBot committed Mar 7, 2022
1 parent ea5dfa9 commit 6b0863b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## [v1.17.6] - 2022-03-07

[Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.6) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.5...v1.17.6) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.6) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.6.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.6.tar.gz))

### Dependency updates

- [`36cbece`](https://github.com/betahuhn/repo-file-sync-action/commit/36cbece) Bump @octokit/plugin-throttling from 3.5.2 to 3.6.1

## [v1.17.5] - 2022-02-28

[Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.5) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.4...v1.17.5) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.5) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.5.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.5.tar.gz))
Expand Down
27 changes: 15 additions & 12 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3994,7 +3994,7 @@ function _defineProperty(obj, key, value) {
return obj;
}

const VERSION = "3.5.2";
const VERSION = "3.6.1";

const noop = () => Promise.resolve(); // @ts-ignore

Expand Down Expand Up @@ -4145,21 +4145,21 @@ function throttling(octokit, octokitOptions = {}) {
const state = Object.assign(_objectSpread2({
clustering: connection != null,
triggersNotification,
minimumAbuseRetryAfter: 5,
minimumSecondaryRateRetryAfter: 5,
retryAfterBaseValue: 1000,
retryLimiter: new Bottleneck(),
id
}, groups), // @ts-ignore
octokitOptions.throttle);

if (typeof state.onAbuseLimit !== "function" || typeof state.onRateLimit !== "function") {
if (typeof state.onSecondaryRateLimit !== "function" && typeof state.onAbuseLimit !== "function" || typeof state.onRateLimit !== "function") {
throw new Error(`octokit/plugin-throttling error:
You must pass the onAbuseLimit and onRateLimit error handlers.
You must pass the onSecondaryRateLimit and onRateLimit error handlers.
See https://github.com/octokit/rest.js#throttling

const octokit = new Octokit({
throttle: {
onAbuseLimit: (retryAfter, options) => {/* ... */},
onSecondaryRateLimit: (retryAfter, options) => {/* ... */},
onRateLimit: (retryAfter, options) => {/* ... */}
}
})
Expand All @@ -4169,11 +4169,14 @@ function throttling(octokit, octokitOptions = {}) {
const events = {};
const emitter = new Bottleneck.Events(events); // @ts-ignore

events.on("abuse-limit", state.onAbuseLimit); // @ts-ignore
events.on("secondary-limit", state.onSecondaryRateLimit || function (...args) {
octokit.log.warn("[@octokit/plugin-throttling] `onAbuseLimit()` is deprecated and will be removed in a future release of `@octokit/plugin-throttling`, please use the `onSecondaryRateLimit` handler instead");
return state.onAbuseLimit(...args);
}); // @ts-ignore

events.on("rate-limit", state.onRateLimit); // @ts-ignore

events.on("error", e => console.warn("Error in throttling-plugin limit handler", e)); // @ts-ignore
events.on("error", e => octokit.log.warn("Error in throttling-plugin limit handler", e)); // @ts-ignore

state.retryLimiter.on("failed", async function (error, info) {
const options = info.args[info.args.length - 1];
Expand All @@ -4193,12 +4196,12 @@ function throttling(octokit, octokitOptions = {}) {
retryAfter
} = await async function () {
if (/\bsecondary rate\b/i.test(error.message)) {
// The user has hit the abuse rate limit. (REST and GraphQL)
// https://docs.github.com/en/rest/overview/resources-in-the-rest-api#abuse-rate-limits
// The Retry-After header can sometimes be blank when hitting an abuse limit,
// The user has hit the secondary rate limit. (REST and GraphQL)
// https://docs.github.com/en/rest/overview/resources-in-the-rest-api#secondary-rate-limits
// The Retry-After header can sometimes be blank when hitting a secondary rate limit,
// but is always present after 2-3s, so make sure to set `retryAfter` to at least 5s by default.
const retryAfter = Math.max(~~error.response.headers["retry-after"], state.minimumAbuseRetryAfter);
const wantRetry = await emitter.trigger("abuse-limit", retryAfter, options, octokit);
const retryAfter = Math.max(~~error.response.headers["retry-after"], state.minimumSecondaryRateRetryAfter);
const wantRetry = await emitter.trigger("secondary-limit", retryAfter, options, octokit);
return {
wantRetry,
retryAfter
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "repo-file-sync-action",
"version": "1.17.5",
"version": "1.17.6",
"description": "GitHub Action to keep files like Action workflows or entire directories in sync between multiple repositories.",
"main": "dist/index.js",
"scripts": {
Expand Down

0 comments on commit 6b0863b

Please sign in to comment.