add webhook gitea
This commit is contained in:
parent
a3b6695f97
commit
89049b1de8
|
|
@ -202,4 +202,29 @@ router.get("/api/dailyLog", (req, res) => {
|
|||
console.log(error);
|
||||
}
|
||||
});
|
||||
|
||||
router.post("/api/gitea-webhook", ( req, res ) => {
|
||||
// Kiểm tra xem đó có phải sự kiện bạn muốn xử lý không
|
||||
// if (request.headers['x-gitlab-event'] === 'push') {
|
||||
// // Lấy dữ liệu sự kiện từ req.body
|
||||
// const eventData = req.body;
|
||||
|
||||
// // Xử lý dữ liệu sự kiện ở đây
|
||||
// console.log('Received push event from GitLab:');
|
||||
// console.log(JSON.stringify(eventData, null, 2));
|
||||
// }
|
||||
console.log("New event ---> ", req);
|
||||
|
||||
// exec(
|
||||
// Env.get("URL_FILE_SHELL"),
|
||||
// (error, stdout, stderr) => {
|
||||
// if (error) {
|
||||
// console.error(`Error executing command: ${error}`);
|
||||
// return;
|
||||
// }
|
||||
|
||||
// console.log(`Command output:\n${stdout}`);
|
||||
// }
|
||||
// );
|
||||
});
|
||||
module.exports = router;
|
||||
|
|
|
|||
Loading…
Reference in New Issue