Skip to content

Commit

Permalink
fix(Octokit): bottleneck incompatible with redis v4
Browse files Browse the repository at this point in the history
  • Loading branch information
ijsKoud committed Jun 20, 2023
1 parent f647acd commit a6713ea
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion packages/octokit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsc --build",
"build:watch": "tsc --watch > /dev/null",
"build-watch": "tsc --watch > /dev/null",
"lint": "TIMING=1 eslint"
},
"dependencies": {
Expand Down
3 changes: 0 additions & 3 deletions packages/octokit/src/Octokit.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { createAppAuth } from "@octokit/auth-app";
import { Octokit as CoreOctokit } from "@octokit/core";
import { throttling } from "@octokit/plugin-throttling";
import Bottleneck from "bottleneck";
import type { createClient } from "redis";

const ExtendableOctokit = CoreOctokit.plugin(throttling) as typeof CoreOctokit;
Expand Down Expand Up @@ -40,7 +39,6 @@ export class Octokit extends ExtendableOctokit {

public constructor(options: OctokitOptions) {
const userAgent = "@ijsblokje/octokit (https://github.com/ijsKoud/ijsblokje)";
const bottleneck = new Bottleneck.RedisConnection({ client: options.redis });

super({
userAgent,
Expand All @@ -50,7 +48,6 @@ export class Octokit extends ExtendableOctokit {
enabled: true,
onRateLimit: Octokit.onRateLimit.bind(Octokit),
onSecondaryRateLimit: Octokit.onSecondaryRateLimit.bind(Octokit),
connection: bottleneck,
id: options.appId.toString()
}
});
Expand Down

0 comments on commit a6713ea

Please sign in to comment.