From af99ea467878057a83e2193ecb0d567da32554eb Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 22 Mar 2022 09:35:24 +0100 Subject: [PATCH] Add debug for GH importer --- package.json | 2 +- src/lib/importers/github.ts | 1 + src/lib/queues/builder.ts | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3e849fa1f..148c4b441 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "coolify", "description": "An open-source & self-hostable Heroku / Netlify alternative.", - "version": "2.0.31", + "version": "2.0.32", "license": "AGPL-3.0", "scripts": { "dev": "docker-compose -f docker-compose-dev.yaml up -d && NODE_ENV=development svelte-kit dev --host 0.0.0.0", diff --git a/src/lib/importers/github.ts b/src/lib/importers/github.ts index 608b6bd36..e9bea3d42 100644 --- a/src/lib/importers/github.ts +++ b/src/lib/importers/github.ts @@ -45,6 +45,7 @@ export default async function ({ const { stdout: commit } = await asyncExecShell(`cd ${workdir}/ && git rev-parse HEAD`); return commit.replace('\n', ''); } catch (error) { + console.log({ error }); return ErrorHandler(error); } } diff --git a/src/lib/queues/builder.ts b/src/lib/queues/builder.ts index f0617d328..0152cc9f2 100644 --- a/src/lib/queues/builder.ts +++ b/src/lib/queues/builder.ts @@ -113,6 +113,9 @@ export default async function (job) { deployKeyId: gitSource.gitlabApp?.deployKeyId || null, privateSshKey: decrypt(gitSource.gitlabApp?.privateSshKey) || null }); + if (!commit) { + throw new Error('No commit found?'); + } let tag = commit.slice(0, 7); if (pullmergeRequestId) { tag = `${commit.slice(0, 7)}-${pullmergeRequestId}`;