代码拉取完成,页面将自动刷新
同步操作将从 Rex/webhook 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
基于 Github/Bitbucket/Gitosc webhook 做了个小工具。
它能够做什么?简单来说,它就是一个让 Github/Bitbucket/Gitosc repo 在某个分支发生 push 行为的时候,自动触发一段脚本。
go run webhook.go xxx.conf
这样就启动 webhook 服务器了。其中 conf 文件格式如下:
{
"bind": ":9876",
"items": [
{
"repo": "https://github.com/qiniu/docs.qiniu.com",
"branch": "master",
"script": "update-qiniu-docs.sh"
},
{
"repo": "https://bitbucket.org/Wuvist/angelbot/",
"branch": "master",
"script": "restart-angelbot.sh"
},
{
"repo": "git@git.oschina.net:test/test.git",
"branch": "master",
"password": "123456",
"script": "test.sh"
}
]}
这个样例是真实的。它设置了 1 个 hook 脚本,在 https://github.com/qiniu/docs.qiniu.com 这个 repo 的 master 有变化时,自动执行 update-qiniu-docs.sh 脚本。
在你的 repo 首页(例如 https://github.com/qiniu/docs.qiniu.com ),点 Settings,再进入 Service Hooks,再进入 WebHook URLs,这里你就可以设置你的 WebHook URL 了,比如 http://example.com:9876/ 。
配置好后,再确定 webhook 已经启动,你就可以尝试向 repo push 一些修改,看看能不能执行相应的脚本了。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。