Skip to content

Commit 93246f8

Browse files
committed
fix: pr deployments + remove public gits
1 parent e9723d3 commit 93246f8

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

apps/api/src/routes/api/v1/applications/handlers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ export async function deployApplication(request: FastifyRequest<DeployApplicatio
451451
data: {
452452
id: buildId,
453453
applicationId: id,
454+
sourceBranch: branch,
454455
branch: application.branch,
455456
pullmergeRequestId,
456457
forceRebuild,

apps/api/src/routes/api/v1/sources/handlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export async function listSources(request: FastifyRequest) {
99
try {
1010
const teamId = request.user?.teamId;
1111
const sources = await prisma.gitSource.findMany({
12-
where: { teams: { some: { id: teamId === '0' ? undefined : teamId } } },
12+
where: { teams: { some: { id: teamId === '0' ? undefined : teamId } }, githubApp: { gitSource: { forPublic: false } } },
1313
include: { teams: true, githubApp: true, gitlabApp: true }
1414
});
1515
return {

apps/api/src/routes/webhooks/github/handlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ export async function gitHubEvents(request: FastifyRequest<GitHubEvents>): Promi
146146
message: 'Queued. Thank you!'
147147
};
148148
} else if (githubEvent === 'pull_request') {
149-
const pullmergeRequestId = body.number;
149+
const pullmergeRequestId = body.number.toString();
150150
const pullmergeRequestAction = body.action;
151151
const sourceBranch = body.pull_request.head.ref.includes('/') ? body.pull_request.head.ref.split('/')[2] : body.pull_request.head.ref;
152152
if (!allowedActions.includes(pullmergeRequestAction)) {

apps/ui/src/routes/applications/[id]/_Secret.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,12 @@
5757
message: 'Secret added.',
5858
type: 'success'
5959
});
60-
}
61-
addToast({
60+
} else {
61+
addToast({
6262
message: 'Secret updated.',
6363
type: 'success'
6464
});
65+
}
6566
dispatch('refresh');
6667
} catch (error) {
6768
console.log(error);

0 commit comments

Comments
 (0)