Skip to content

Commit

Permalink
chore: remove authentication test
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4007 committed Feb 2, 2024
1 parent 01ae79a commit cfb2b99
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
19 changes: 0 additions & 19 deletions src/authentication.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/worker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { EmitterWebhookEventName as WebhookEventName, emitterEventNames } from "@octokit/webhooks";
import { Value } from "@sinclair/typebox/value";
import { authenticateApp } from "./authentication";
import { EventHandler } from "./event-handler";
import { bindHandlers } from "./handlers";
import { Env, envSchema } from "./types/env";
Expand All @@ -12,18 +11,6 @@ export default {
const eventName = getEventName(request);
const signatureSHA256 = getSignature(request);
const id = getId(request);
// Parse the request body to get the webhook event payload
const payload = JSON.parse(await request.text());

// Extract the installationId from the payload
const installationId = payload.installation?.id;

if (!installationId) {
throw new Error("Missing installation ID");
}

// Authenticate the app
await authenticateApp(env, installationId);

const eventHandler = new EventHandler({
webhookSecret: env.WEBHOOK_SECRET,
Expand Down

0 comments on commit cfb2b99

Please sign in to comment.