如何创建 GitLab 网络钩子? [英] How do I create a GitLab webhook?

查看:21
本文介绍了如何创建 GitLab 网络钩子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读到 GitLab 能够通过网络挂钩"向其他服务器发送消息,但我找不到 在哪里可以创建一个.

I've read that GitLab is capable of sending messages to other servers via "web hooks" but I can't find where one would create one.

有人能指出正确的方向吗?

Can someone point me in the right direction?

推荐答案

我在官方文档和 Stack Overflow 上找到的所有关于寻找 web hooks 的答案都是不正确的.管理区>hooks 页面不包含 web 挂钩.它包含 system 钩子,当您创建/删除项目和用户时触发.这不是你想要的.

All the answers I've found in official documentation and on Stack Overflow for finding web hooks are incorrect. The admin area > hooks page does NOT contain web hooks. It contains system hooks, which fire when you create/delete projects and users and things like that. This is not what you want.

要查找您的网络挂钩,请转到 特定项目 >设置>web hooks(在 GitLab 6.1.0 的侧边栏上) 页面.这些将在相关项目的接收后触发.您可以使用 RequestBin 之类的服务来查看有效负载的外观,并确保您出于调试目的正确地触发了它们.

To find your web hooks, go to the specific project > settings > web hooks (on sidebar in GitLab 6.1.0) page. These will fire on post-receive for the project in question. You can use a service like RequestBin to see what the payload looks like and to ensure you're firing these off correctly for debugging purposes.

这篇关于如何创建 GitLab 网络钩子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆