gitlab-org--gitlab-foss/doc/raketasks/web_hooks.md

56 lines
1.5 KiB
Markdown
Raw Normal View History

# Webhooks administration **(CORE ONLY)**
2014-05-27 12:12:15 +00:00
2016-03-10 19:48:29 +00:00
## Add a webhook for **ALL** projects:
```sh
# 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
```
2016-03-10 19:48:29 +00:00
## Add a webhook for projects in a given **NAMESPACE**:
```sh
# 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
```
2016-03-10 19:48:29 +00:00
## Remove a webhook from **ALL** projects using:
```sh
# 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
```
2016-03-10 19:48:29 +00:00
## Remove a webhook from projects in a given **NAMESPACE**:
```sh
# 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
```
2016-03-10 19:48:29 +00:00
## List **ALL** webhooks:
```sh
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:list
# source installations
bundle exec rake gitlab:web_hook:list RAILS_ENV=production
```
2016-03-10 19:48:29 +00:00
## List the webhooks from projects in a given **NAMESPACE**:
```sh
# omnibus-gitlab
sudo gitlab-rake gitlab:web_hook:list NAMESPACE=acme
# source installations
bundle exec rake gitlab:web_hook:list NAMESPACE=acme RAILS_ENV=production
```