feat: changed req.auth.userId to permission.id to satisfy type error

This commit is contained in:
Akhil Mohan
2024-01-27 12:38:23 +05:30
parent 20fb99f042
commit fe416556f2
18 changed files with 107 additions and 54 deletions
@@ -1,7 +1,7 @@
import crypto from "node:crypto";
import { ForbiddenError } from "@casl/ability";
import { PushEvent } from "@octokit/webhooks-types";
import { WebhookEventMap } from "@octokit/webhooks-types";
import { ProbotOctokit } from "probot";
import {
@@ -146,7 +146,7 @@ export const secretScanningServiceFactory = ({
return { risk };
};
const handleRepoPushEvent = async (payload: PushEvent) => {
const handleRepoPushEvent = async (payload: WebhookEventMap["push"]) => {
const { commits, repository, installation, pusher } = payload;
if (!commits || !repository || !installation || !pusher) {
return;