An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
webhook: send 200 for ping and installation wh
Andras Bacsaia97521aba211
diff --git a/apps/api/src/routes/webhooks/github/handlers.ts b/apps/api/src/routes/webhooks/github/handlers.tsindex 215d3ec696..26c400737a 100644--- a/apps/api/src/routes/webhooks/github/handlers.ts+++ b/apps/api/src/routes/webhooks/github/handlers.ts@@ -66,13 +66,19 @@ export async function configureGitHubApp(request, reply) {}export async function gitHubEvents(request: FastifyRequest<GitHubEvents>): Promise<any> {try {- const allowedGithubEvents = ['push', 'pull_request'];+ const allowedGithubEvents = ['push', 'pull_request', 'ping', 'installation'];const allowedActions = ['opened', 'reopened', 'synchronize', 'closed'];const githubEvent = request.headers['x-github-event']?.toString().toLowerCase();const githubSignature = request.headers['x-hub-signature-256']?.toString().toLowerCase();if (!allowedGithubEvents.includes(githubEvent)) {throw { status: 500, message: 'Event not allowed.' }}+ if (githubEvent === 'ping') {+ return { pong: 'cool' }+ }+ if (githubEvent === 'installation') {+ return { status: 'cool' }+ }let projectId, branch;const body = request.bodyif (githubEvent === 'push') {