diff options
author | Duana Saskia <starkcoffee@users.noreply.github.com> | 2018-06-07 09:35:17 +0200 |
---|---|---|
committer | Duana Saskia <starkcoffee@users.noreply.github.com> | 2018-08-13 13:20:58 +0200 |
commit | ece6a1ea6ecffdbde5ff7d663f1ad1eb74f78aa6 (patch) | |
tree | 288e34ff932b6c84e1a1c5ead26cbd8f80ea12f5 /doc | |
parent | 07356866b2ce85f4d724c96f14e129fbe6a56963 (diff) | |
download | gitlab-ce-ece6a1ea6ecffdbde5ff7d663f1ad1eb74f78aa6.tar.gz |
Filter project hooks by branch
Allow specificying a branch filter for a project hook and only trigger
a project hook if either the branch filter is blank or the branch matches.
Only supported for push_events for now.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/projects.md | 3 | ||||
-rw-r--r-- | doc/user/project/integrations/webhooks.md | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/doc/api/projects.md b/doc/api/projects.md index bda4164ee92..372138e72cc 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -1334,6 +1334,7 @@ GET /projects/:id/hooks/:hook_id "url": "http://example.com/hook", "project_id": 3, "push_events": true, + "push_events_branch_filter": "", "issues_events": true, "confidential_issues_events": true, "merge_requests_events": true, @@ -1360,6 +1361,7 @@ POST /projects/:id/hooks | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) | | `url` | string | yes | The hook URL | | `push_events` | boolean | no | Trigger hook on push events | +| `push_events_branch_filter` | string | no | Trigger hook on push events for matching branches only | | `issues_events` | boolean | no | Trigger hook on issues events | | `confidential_issues_events` | boolean | no | Trigger hook on confidential issues events | | `merge_requests_events` | boolean | no | Trigger hook on merge requests events | @@ -1385,6 +1387,7 @@ PUT /projects/:id/hooks/:hook_id | `hook_id` | integer | yes | The ID of the project hook | | `url` | string | yes | The hook URL | | `push_events` | boolean | no | Trigger hook on push events | +| `push_events_branch_filter` | string | no | Trigger hook on push events for matching branches only | | `issues_events` | boolean | no | Trigger hook on issues events | | `confidential_issues_events` | boolean | no | Trigger hook on confidential issues events | | `merge_requests_events` | boolean | no | Trigger hook on merge requests events | diff --git a/doc/user/project/integrations/webhooks.md b/doc/user/project/integrations/webhooks.md index 77fa517b5b1..2e7be878da7 100644 --- a/doc/user/project/integrations/webhooks.md +++ b/doc/user/project/integrations/webhooks.md @@ -65,8 +65,8 @@ Below are described the supported events. Triggered when you push to the repository except when pushing tags. -> **Note:** When more than 20 commits are pushed at once, the `commits` web hook - attribute will only contain the first 20 for performance reasons. Loading +> **Note:** When more than 20 commits are pushed at once, the `commits` web hook + attribute will only contain the first 20 for performance reasons. Loading detailed commit data is expensive. Note that despite only 20 commits being present in the `commits` attribute, the `total_commits_count` attribute will contain the actual total. |