Webhook 管理 Rake 任务
- Tier: 基础版,专业版,旗舰版
- Offering: 私有化部署
极狐GitLab 提供用于 webhook 管理的 Rake 任务。
管理员可以允许或阻止 webhook 对本地网络的请求。
将 webhook 添加到所有项目
要将 webhook 添加到所有项目,请运行:
shell# omnibus-gitlab sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook" # source installations bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" RAILS_ENV=production
将 webhook 添加到某个命名空间中的项目
要将 webhook 添加到特定命名空间中的所有项目,请运行:
shell# omnibus-gitlab sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=<namespace> # source installations bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=<namespace> RAILS_ENV=production
从项目中移除 webhook
要从所有项目中移除 webhook,请运行:
shell# omnibus-gitlab sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook" # source installations bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" RAILS_ENV=production
从某个命名空间中的项目中移除 webhook
要从特定命名空间中的项目中移除 webhook,请运行:
shell# omnibus-gitlab sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=<namespace> # source installations bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=<namespace> RAILS_ENV=production
列出所有 webhook
要列出所有 webhook,请运行:
shell# omnibus-gitlab sudo gitlab-rake gitlab:web_hook:list # source installations bundle exec rake gitlab:web_hook:list RAILS_ENV=production
列出某个命名空间中的项目的 webhooks
要列出特定命名空间中的项目的所有 webhook,请运行:
shell# omnibus-gitlab sudo gitlab-rake gitlab:web_hook:list NAMESPACE=<namespace> # source installations bundle exec rake gitlab:web_hook:list NAMESPACE=<namespace> RAILS_ENV=production