ウェブフックの管理

GitLabはwebhook管理のためのRakeタスクを提供しています。

Webhookによるローカルネットワークへのリクエストは、管理者によって許可またはブロックすることができます。

すべてのプロジェクトに webhook を追加します。

すべてのプロジェクトにwebhookを追加するには、以下を実行します:

# 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 を追加するには、以下を実行します:

# 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 を削除するには、以下を実行します:

# 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 を削除するには、以下を実行します:

# 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 を一覧表示するには、以下を実行します:

# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:list

# source installations
bundle exec rake gitlab:web_hook:list RAILS_ENV=production

名前空間内のプロジェクトの webhook を一覧表示します。

指定した名前空間内のプロジェクトのすべての webhook を一覧表示するには、以下を実行します:

# 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