Skip to content

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.

fix: pr deployments + remove public gits

Andras Bacsai93246f80c415
diff --git a/apps/api/src/routes/api/v1/applications/handlers.ts b/apps/api/src/routes/api/v1/applications/handlers.ts
index 26b0d2bb94..cb0bf38fee 100644
--- a/apps/api/src/routes/api/v1/applications/handlers.ts
+++ b/apps/api/src/routes/api/v1/applications/handlers.ts
@@ -451,6 +451,7 @@ export async function deployApplication(request: FastifyRequest<DeployApplicatio
data: {
id: buildId,
applicationId: id,
+ sourceBranch: branch,
branch: application.branch,
pullmergeRequestId,
forceRebuild,
diff --git a/apps/api/src/routes/api/v1/sources/handlers.ts b/apps/api/src/routes/api/v1/sources/handlers.ts
index 8a1c19987c..f363b6ff97 100644
--- a/apps/api/src/routes/api/v1/sources/handlers.ts
+++ b/apps/api/src/routes/api/v1/sources/handlers.ts
@@ -9,7 +9,7 @@ export async function listSources(request: FastifyRequest) {
try {
const teamId = request.user?.teamId;
const sources = await prisma.gitSource.findMany({
- where: { teams: { some: { id: teamId === '0' ? undefined : teamId } } },
+ where: { teams: { some: { id: teamId === '0' ? undefined : teamId } }, githubApp: { gitSource: { forPublic: false } } },
include: { teams: true, githubApp: true, gitlabApp: true }
});
return {
diff --git a/apps/api/src/routes/webhooks/github/handlers.ts b/apps/api/src/routes/webhooks/github/handlers.ts
index 275a72979a..106311c5c1 100644
--- a/apps/api/src/routes/webhooks/github/handlers.ts
+++ b/apps/api/src/routes/webhooks/github/handlers.ts
@@ -146,7 +146,7 @@ export async function gitHubEvents(request: FastifyRequest<GitHubEvents>): Promi
message: 'Queued. Thank you!'
};
} else if (githubEvent === 'pull_request') {
- const pullmergeRequestId = body.number;
+ const pullmergeRequestId = body.number.toString();
const pullmergeRequestAction = body.action;
const sourceBranch = body.pull_request.head.ref.includes('/') ? body.pull_request.head.ref.split('/')[2] : body.pull_request.head.ref;
if (!allowedActions.includes(pullmergeRequestAction)) {
diff --git a/apps/ui/src/routes/applications/[id]/_Secret.svelte b/apps/ui/src/routes/applications/[id]/_Secret.svelte
index 12d69db193..780dea7261 100644
--- a/apps/ui/src/routes/applications/[id]/_Secret.svelte
+++ b/apps/ui/src/routes/applications/[id]/_Secret.svelte
@@ -57,11 +57,12 @@
message: 'Secret added.',
type: 'success'
});
- }
- addToast({
+ } else {
+ addToast({
message: 'Secret updated.',
type: 'success'
});
+ }
dispatch('refresh');
} catch (error) {
console.log(error);