由于我的免费帐户上 GitHub 上的空间已用完(是的,我正在考虑升级),我正在设置在 Gitorious 上建立新的 git 存储库(另请参阅 GitHub 与 Gitorious)。 GitHub 的一大功能是提交后挂钩,它允许我通知(也很棒)CIA 网络。 ..
但是,我一直无法找到 Gitorious 是否支持此类挂钩...因此,我想询问在 CIA 网络上显示 Gitorious 托管的 git 存储库的提交消息的最佳实践。
更新:使用辅助机制触发 CIA 提交消息的解决方案不是我正在寻找的。
As I am running out of my space on GitHub on my free account (yes, I am considering upgrading), I am setting up new git repositories on Gitorious (see also GitHub vs Gitorious). One great feature of GitHub is the post-commit hooks, that allow me to notify the (also great) CIA network...
However, I have been unable to find if Gitorious supports such hooks... So, I'd like to ask best practices for getting commit messages show up on the CIA network for Gitorious-hosted git repositories.
Update: the solution of using a secondary mechanism to trigger CIA commit messages is not what I am looking for.
发布评论
评论(5)
Gitorious 正在获得 Web hook 支持。它目前在 gitorious.org 上运行,但没有用于将它们添加到存储库的 UI;原因是公开的提交数据的 JSON 表示形式仍然可能会发生一两处变化,因此应该将其配置为 beta 功能。
任何想要编写集成代码(处理 gitorious 的 Web hook 请求)的人,请发送电子邮件至 gitorious.org 的支持人员,我们将为您的存储库设置集成
Gitorious is getting web hook support. It is currently running on gitorious.org, but without a UI for adding them to your repository; the reason for this is that there still may be a change or two to the JSON representation of the commit data exposed, so it should be configured a beta feature.
Anyone feeling up to writing integration code (handling gitorious' web hook requests), please send an email to support at gitorious.org and we'll set up the integration for your repository
KDE 项目在该线程中提出了类似的问题,并提供了一个有趣的替代方案:
The KDE project had a similar question in that thread, with an interesting alternative:
不要直接推送到 Gitorious,而是推送到您已配置的本地存储库(在其 post-receive 挂钩中),以将所有内容推送到您的 Gitorious 存储库并通知 CIA。
Instead of pushing straight to Gitorious, push to a local repository that you've configured (in its post-receive hook) to both push everything to your Gitorious repository and notify CIA.
我当前的解决方法是设置一个本地存储库(称为 CIA)并始终通过一个小型 shell 脚本推送:
在本地 CIA 存储库中,我安装了 http://cia.vc/clients/git/ciabot.bash 向 CIA 发送电子邮件。
My current workaround is to set up a loal repository (called CIA) and always push via a tiny shell script:
In the local CIA repository I installed http://cia.vc/clients/git/ciabot.bash to send emails to the CIA.
Gitorious 支持“Web Hooks”: http://gitorious.org/gitorious/pages/WebHooks
需要付出更多的努力,因为它需要您设置一个 Web 服务器来接收钩子 API 调用。
Gitorious supports "Web Hooks": http://gitorious.org/gitorious/pages/WebHooks
It's a bit more effort, as it requires you to have a web server set up to receive the hook API calls.