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);
|
||||
|
||||
// exec(
|
||||
// Env.get("URL_FILE_SHELL"),
|
||||
// (error, stdout, stderr) => {
|
||||
// if (error) {
|
||||
// console.error(`Error executing command: ${error}`);
|
||||
// return;
|
||||
// }
|
||||
|
||||
// console.log(`Command output:\n${stdout}`);
|
||||
// }
|
||||
// );
|
||||
exec(
|
||||
"/home/giteaHook.sh",
|
||||
(error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.log(`Error executing command: ${error}`);
|
||||
res.status(500).send("PULL ERROR")
|
||||
}
|
||||
res.status(200).send({mess: "PULL SUCCESS!", data: stdout})
|
||||
console.log(`Command output:\n${stdout}`);
|
||||
}
|
||||
);
|
||||
});
|
||||
module.exports = router;
|
||||
|
|
|
|||
Loading…
Reference in New Issue