summaryrefslogtreecommitdiff
path: root/doc/administration/raketasks/web_hooks.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/administration/raketasks/web_hooks.md')
-rw-r--r--doc/administration/raketasks/web_hooks.md45
1 files changed, 45 insertions, 0 deletions
diff --git a/doc/administration/raketasks/web_hooks.md b/doc/administration/raketasks/web_hooks.md
new file mode 100644
index 00000000000..2ebf7c48f4e
--- /dev/null
+++ b/doc/administration/raketasks/web_hooks.md
@@ -0,0 +1,45 @@
+# Webhooks
+
+## Add a webhook for **ALL** projects:
+
+ # 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
+
+## Add a webhook for projects in a given **NAMESPACE**:
+
+ # omnibus-gitlab
+ sudo gitlab-rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=acme
+ # source installations
+ bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=acme RAILS_ENV=production
+
+## Remove a webhook from **ALL** projects using:
+
+ # 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
+
+## Remove a webhook from projects in a given **NAMESPACE**:
+
+ # omnibus-gitlab
+ sudo gitlab-rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=acme
+ # source installations
+ bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=acme RAILS_ENV=production
+
+## List **ALL** webhooks:
+
+ # omnibus-gitlab
+ sudo gitlab-rake gitlab:web_hook:list
+ # source installations
+ bundle exec rake gitlab:web_hook:list RAILS_ENV=production
+
+## List the webhooks from projects in a given **NAMESPACE**:
+
+ # omnibus-gitlab
+ sudo gitlab-rake gitlab:web_hook:list NAMESPACE=/
+ # source installations
+ bundle exec rake gitlab:web_hook:list NAMESPACE=/ RAILS_ENV=production
+
+> Note: `/` is the global namespace.