Skip to content

Commit

Permalink
chore(octokit): upgrade dep
Browse files Browse the repository at this point in the history
  • Loading branch information
kishore03109 committed Jun 25, 2024
1 parent 61553f6 commit e16de47
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 124 deletions.
181 changes: 67 additions & 114 deletions 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
Expand Up @@ -37,7 +37,7 @@
"@aws-sdk/lib-dynamodb": "^3.577.0",
"@growthbook/growthbook": "^0.36.0",
"@octokit/plugin-retry": "^6.0.0",
"@octokit/rest": "^18.12.0",
"@octokit/rest": "^20.1.1",
"@opengovsg/formsg-sdk": "^0.11.0",
"@opengovsg/sgid-client": "^2.0.0",
"@slack/bolt": "^3.18.0",
Expand Down
12 changes: 4 additions & 8 deletions src/monitoring/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import MonitoringError from "@root/errors/MonitoringError"
import LaunchesService from "@root/services/identity/LaunchesService"
import promisifyPapaParse from "@root/utils/papa-parse"

interface MonitoringServiceInterface {
interface MonitoringServiceProps {
launchesService: LaunchesService
}

Expand Down Expand Up @@ -59,13 +59,13 @@ function isKeyCdnResponse(object: unknown): object is KeyCdnZoneAlias[] {
}

export default class MonitoringService {
private readonly launchesService: MonitoringServiceInterface["launchesService"]
private readonly launchesService: MonitoringServiceProps["launchesService"]

private readonly monitoringServiceLogger = parentLogger.child({
module: "monitoringService",
})

constructor({ launchesService }: MonitoringServiceInterface) {
constructor({ launchesService }: MonitoringServiceProps) {
autoBind(this)
this.launchesService = launchesService
}
Expand Down Expand Up @@ -115,11 +115,7 @@ export default class MonitoringService {
*/
getRedirectionDomains() {
const SYSTEM_GITHUB_TOKEN = config.get("github.systemToken")
// seems to be a bug in typing, this is a direct
// copy paste from the octokit documentation
// https://octokit.github.io/rest.js/v20#automatic-retries
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const OctokitRetry = Octokit.plugin(retry as any)
const OctokitRetry = Octokit.plugin(retry)
const octokitWithRetry: Octokit = new OctokitRetry({
auth: SYSTEM_GITHUB_TOKEN,
request: { retries: 5 },
Expand Down
2 changes: 1 addition & 1 deletion src/services/identity/ReposService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { doesDirectoryExist } from "@root/utils/fs-utils"

const SYSTEM_GITHUB_TOKEN = config.get("github.systemToken")
const octokit = new Octokit({ auth: SYSTEM_GITHUB_TOKEN })
const OctokitRetry = Octokit.plugin(retry as any)
const OctokitRetry = Octokit.plugin(retry)
const octokitWithRetry = new OctokitRetry({
auth: SYSTEM_GITHUB_TOKEN,
request: { retries: 5 },
Expand Down

0 comments on commit e16de47

Please sign in to comment.