在gitlab上使用了web hooks 监听push发生,接收端是用NodeJS写的一个路由,如下
app.post('/git/hooks' , (req,res) => {
const kind = req.body.object_kind,
name = req.body.user_name,
msg = req.body.commits[0].message;
console.log(kind);
});
测试提交是会接收到,但是不断重复地收到之前测试的push通知
求问大神,应该怎么通知一次就可以了呢
Same question, I also encountered this problem