Gitorious 是否有 CIA 提交通知的钩子?

发布于 2024-08-14 11:17:16 字数 566 浏览 6 评论 0 原文

由于我的免费帐户上 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

笑看君怀她人 2024-08-21 11:17:16

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

╰沐子 2024-08-21 11:17:16

KDE 项目在该线程中提出了类似的问题,并提供了一个有趣的替代方案:

它不必在 gitorious.org 机器上运行。至少,不
用于电子邮件/CIA/RSS/任何报告

这就是我们旧的 git-p4 钩子在办公室的工作原理:
p4 机器发出带有修订号的 UDP 数据包。另一台机器捕获它并进行导入。 (该值已被丢弃)

我们也可以这样做:

  • gitorious.org 机器发送一个 UDP 数据包,其中包含
    更改的分支及其新的 SHA-1
  • 另一台机器获取并生成提交日志。
    最坏的情况是由于 UDP 数据包丢失而导致某人被遗忘。

就像我说的,这适用于报告——适用于由
post-receive 钩子。
对于任何需要 pre-receive hook 的东西(实际上是 pre-update,但 Git 中的名称是错误的),它必须在他们的服务器上运行。 p>

The KDE project had a similar question in that thread, with an interesting alternative:

It doesn't have to be running on gitorious.org machines. At least, not
for email/CIA/RSS/whatever reporting

That's how our old git-p4 hook worked in the office:
the p4 machine sent out a UDP packet with the revision number. Another machine caught it and did the import. (the value was discarded)

We could do the same:

  • the gitorious.org machine sends a UDP packet with
    the branches that changed and their new SHA-1.
  • Another machine fetches and produces the commit logs.
    Worst case scenario is that someone is forgotten due to a dropped UDP packet.

Like I said, this works for reporting -- for anything that is run by a
post-receive hook.
For anything requiring a pre-receive hook (actually, pre-update, but the name is wrong in Git), it will have to be run on their servers.

梨涡 2024-08-21 11:17:16

不要直接推送到 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.

烟酉 2024-08-21 11:17:16

我当前的解决方法是设置一个本地存储库(称为 CIA)并始终通过一个小型 shell 脚本推送:

#!/bin/bash
set -e
git push origin master
git push cia master

在本地 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:

#!/bin/bash
set -e
git push origin master
git push cia master

In the local CIA repository I installed http://cia.vc/clients/git/ciabot.bash to send emails to the CIA.

浅沫记忆 2024-08-21 11:17:16

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文