mirror of
https://github.com/cupcakearmy/coolify.git
synced 2024-10-23 00:24:15 +02:00
fix: pr deployments + remove public gits
This commit is contained in:
parent
e9723d3f22
commit
93246f80c4
@ -451,6 +451,7 @@ export async function deployApplication(request: FastifyRequest<DeployApplicatio
|
|||||||
data: {
|
data: {
|
||||||
id: buildId,
|
id: buildId,
|
||||||
applicationId: id,
|
applicationId: id,
|
||||||
|
sourceBranch: branch,
|
||||||
branch: application.branch,
|
branch: application.branch,
|
||||||
pullmergeRequestId,
|
pullmergeRequestId,
|
||||||
forceRebuild,
|
forceRebuild,
|
||||||
|
@ -9,7 +9,7 @@ export async function listSources(request: FastifyRequest) {
|
|||||||
try {
|
try {
|
||||||
const teamId = request.user?.teamId;
|
const teamId = request.user?.teamId;
|
||||||
const sources = await prisma.gitSource.findMany({
|
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 }
|
include: { teams: true, githubApp: true, gitlabApp: true }
|
||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
|
@ -146,7 +146,7 @@ export async function gitHubEvents(request: FastifyRequest<GitHubEvents>): Promi
|
|||||||
message: 'Queued. Thank you!'
|
message: 'Queued. Thank you!'
|
||||||
};
|
};
|
||||||
} else if (githubEvent === 'pull_request') {
|
} else if (githubEvent === 'pull_request') {
|
||||||
const pullmergeRequestId = body.number;
|
const pullmergeRequestId = body.number.toString();
|
||||||
const pullmergeRequestAction = body.action;
|
const pullmergeRequestAction = body.action;
|
||||||
const sourceBranch = body.pull_request.head.ref.includes('/') ? body.pull_request.head.ref.split('/')[2] : body.pull_request.head.ref;
|
const sourceBranch = body.pull_request.head.ref.includes('/') ? body.pull_request.head.ref.split('/')[2] : body.pull_request.head.ref;
|
||||||
if (!allowedActions.includes(pullmergeRequestAction)) {
|
if (!allowedActions.includes(pullmergeRequestAction)) {
|
||||||
|
@ -57,11 +57,12 @@
|
|||||||
message: 'Secret added.',
|
message: 'Secret added.',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
addToast({
|
addToast({
|
||||||
message: 'Secret updated.',
|
message: 'Secret updated.',
|
||||||
type: 'success'
|
type: 'success'
|
||||||
});
|
});
|
||||||
|
}
|
||||||
dispatch('refresh');
|
dispatch('refresh');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
Loading…
Reference in New Issue
Block a user