add webhook gitea
This commit is contained in:
parent
bdd91a3685
commit
bcd36779e4
|
|
@ -213,16 +213,16 @@ router.post("/api/gitea-webhook", ( req, res ) => {
|
||||||
// }
|
// }
|
||||||
console.log("New event ---> ", req.body);
|
console.log("New event ---> ", req.body);
|
||||||
|
|
||||||
// exec(
|
exec(
|
||||||
// Env.get("URL_FILE_SHELL"),
|
"/home/giteaHook.sh",
|
||||||
// (error, stdout, stderr) => {
|
(error, stdout, stderr) => {
|
||||||
// if (error) {
|
if (error) {
|
||||||
// console.error(`Error executing command: ${error}`);
|
console.log(`Error executing command: ${error}`);
|
||||||
// return;
|
res.status(500).send("PULL ERROR")
|
||||||
// }
|
}
|
||||||
|
res.status(200).send({mess: "PULL SUCCESS!", data: stdout})
|
||||||
// console.log(`Command output:\n${stdout}`);
|
console.log(`Command output:\n${stdout}`);
|
||||||
// }
|
}
|
||||||
// );
|
);
|
||||||
});
|
});
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue