GitHub:企业post-receive钩子 [英] GitHub:Enterprise post-receive hook

查看:297
本文介绍了GitHub:企业post-receive钩子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道GitHub:Enterprise中是否有一种机制设置一个通用的post-receive钩子,它将应用于所有的仓库(包括创建仓库后立即包含新的钩子)?



我正在尝试开发一个链接到一个辅助系统,该辅助系统希望得到所有推送到所有存储库的通知,并且需要对每个新存储库进行手动设置只是时间问题我知道这真的很旧,但GitHub Enterprise 2.6刚刚推出了预接收钩子。更多信息可以在这里了解到: https://help.github.com/enterprise/admin/guides/developer-workflow/using-pre-receive-hooks-to-enforce-policy/

这应该回答最初发布的问题,因为这是在实例级别设置的(因此,它只在GitHub Enterprise上)并且适用于所有存储库。


我正在尝试开发一个链接到一个辅助系统,该辅助系统希望获得所有存储库的所有推送通知,并且需要为每个新存储库进行手动设置在它被人遗忘之前,它只是一个时间问题。


至于这篇文章,您可以考虑的另一件事是日志转发在GitHub上。您可以在这里阅读有关日志转发的信息: https://help.github.com/enterprise /管理/用品/日志转发。从版本2.6开始,您还可以控制多个日志转发目标


Does anyone know if there is a mechanism in GitHub:Enterprise to set up a general post-receive hook that will apply to all repositories (including new ones as soon as they are created?)

I am trying to develop a link to a secondary system that will want to get notified of all pushes to all repositories, and requiring manual set-up for each new repository will just be a matter of time before it gets forgotten.

解决方案

I know that this is really old, but GitHub Enterprise 2.6 just came out with pre-receive hooks. More information can be learned here: https://help.github.com/enterprise/admin/guides/developer-workflow/using-pre-receive-hooks-to-enforce-policy/.

This should answer the question originally posted, as this is something that gets set up at an instance level (thus, it is only on GitHub Enterprise) and will work for all repositories.

I am trying to develop a link to a secondary system that will want to get notified of all pushes to all repositories, and requiring manual set-up for each new repository will just be a matter of time before it gets forgotten.

As for this piece, another thing you could look into would be log forwarding on GitHub. You can read about log forwarding here: https://help.github.com/enterprise/admin/articles/log-forwarding. You can also control multiple log forwarding destinations as of version 2.6

这篇关于GitHub:企业post-receive钩子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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