mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: add gitlab and bitbucket webhook support
This commit is contained in:
@@ -66,6 +66,18 @@ export default async function handler(
|
|||||||
res.status(301).json({ message: "Branch Not Match" });
|
res.status(301).json({ message: "Branch Not Match" });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else if (sourceType === "gitlab") {
|
||||||
|
const branchName = extractBranchName(req.headers, req.body);
|
||||||
|
if (!branchName || branchName !== application.gitlabBranch) {
|
||||||
|
res.status(301).json({ message: "Branch Not Match" });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (sourceType === "bitbucket") {
|
||||||
|
const branchName = extractBranchName(req.headers, req.body);
|
||||||
|
if (!branchName || branchName !== application.bitbucketBranch) {
|
||||||
|
res.status(301).json({ message: "Branch Not Match" });
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -226,6 +226,7 @@ export const applicationRouter = createTRPCRouter({
|
|||||||
applicationStatus: "idle",
|
applicationStatus: "idle",
|
||||||
gitlabId: input.gitlabId,
|
gitlabId: input.gitlabId,
|
||||||
gitlabProjectId: input.gitlabProjectId,
|
gitlabProjectId: input.gitlabProjectId,
|
||||||
|
gitlabPathNamespace: input.gitlabPathNamespace,
|
||||||
});
|
});
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -93,8 +93,6 @@ export const cloneGitlabRepository = async (
|
|||||||
const writeStream = createWriteStream(logPath, { flags: "a" });
|
const writeStream = createWriteStream(logPath, { flags: "a" });
|
||||||
const {
|
const {
|
||||||
appName,
|
appName,
|
||||||
gitlabRepository,
|
|
||||||
gitlabOwner,
|
|
||||||
gitlabBranch,
|
gitlabBranch,
|
||||||
gitlabId,
|
gitlabId,
|
||||||
gitlabProvider,
|
gitlabProvider,
|
||||||
|
|||||||
Reference in New Issue
Block a user