feat: fixed eslint and resolved all eslint issues

This commit is contained in:
Akhil Mohan
2024-01-30 22:30:42 +05:30
parent 7c4dd5000f
commit 5855cc660a
147 changed files with 1165 additions and 938 deletions
+5 -3
View File
@@ -1,3 +1,4 @@
import { PushEvent } from "@octokit/webhooks-types";
import { Probot } from "probot";
import SmeeClient from "smee-client";
@@ -22,7 +23,7 @@ export const registerSecretScannerGhApp = async (server: FastifyZodProvider) =>
app.on("push", async (context) => {
const { payload } = context;
await server.services.secretScanning.handleRepoPushEvent(payload as any);
await server.services.secretScanning.handleRepoPushEvent(payload as PushEvent);
});
};
@@ -49,16 +50,17 @@ export const registerSecretScannerGhApp = async (server: FastifyZodProvider) =>
method: "POST",
url: "/",
handler: async (req, res) => {
const eventName = req.headers["x-github-event"] as any;
const eventName = req.headers["x-github-event"];
const signatureSHA256 = req.headers["x-hub-signature-256"] as string;
const id = req.headers["x-github-delivery"] as string;
await probot.webhooks.verifyAndReceive({
id,
// @ts-expect-error type
name: eventName,
payload: req.body as string,
signature: signatureSHA256
});
res.send("ok");
void res.send("ok");
}
});
}