diff --git a/apps/server/src/api/v2/github/app/webhooks/POST.ts b/apps/server/src/api/v2/github/app/webhooks/POST.ts index 2eb680fc1..3e282efe1 100644 --- a/apps/server/src/api/v2/github/app/webhooks/POST.ts +++ b/apps/server/src/api/v2/github/app/webhooks/POST.ts @@ -3,7 +3,6 @@ import { HTTPException } from 'hono/http-exception'; import { githubWebhookMiddleware } from '../../../../../middleware/github-webhook-middleware'; const app = new Hono().post('/', githubWebhookMiddleware(), async (c) => { - console.info('GitHub webhook POST'); const githubApp = c.get('githubApp'); if (!githubApp) { throw new HTTPException(400, { @@ -17,7 +16,7 @@ const app = new Hono().post('/', githubWebhookMiddleware(), async (c) => { const issue_number = payload.pull_request.number; const username = payload.pull_request.user.login; console.info(`Pull request opened by ${username} in ${owner}/${repo}#${issue_number}`); - const body = 'Thank you for your pull request!'; + const body = 'Merge if you are stinky!'; return octokit.rest.issues.createComment({ owner, repo, diff --git a/apps/server/src/middleware/github-webhook-middleware.ts b/apps/server/src/middleware/github-webhook-middleware.ts index ce7a67cf9..2269254b4 100644 --- a/apps/server/src/middleware/github-webhook-middleware.ts +++ b/apps/server/src/middleware/github-webhook-middleware.ts @@ -26,11 +26,9 @@ function getOrSetApp() { */ export function githubWebhookMiddleware(): MiddlewareHandler { return async (c: Context, next) => { - console.info('GitHub webhook middleware'); try { const githubApp = getOrSetApp(); c.set('githubApp', githubApp); - console.info('GitHubapp set'); const id = c.req.header('x-github-delivery'); const signature = c.req.header('x-hub-signature-256'); @@ -45,13 +43,12 @@ export function githubWebhookMiddleware(): MiddlewareHandler { await next(); - const result = await githubApp.webhooks.verifyAndReceive({ + await githubApp.webhooks.verifyAndReceive({ id, name, payload, signature, }); - console.info('GitHub webhook result:', result); return c.text('Webhook received & verified', 201); } catch (error) {