summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-19 08:56:09 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-12-19 08:56:09 -0800
commit33feaa04285e8c6fbc2d9f7278d21d0ca62382d1 (patch)
tree8c0747ad966c1b0089e83c78bb30a9b57083a248
parentdc4b7cb49a075bdce4a6e55f789b991ee94fb529 (diff)
parent392d79db0eb9d8027353c1bb147a243a7f302bee (diff)
downloadgitlab-ce-33feaa04285e8c6fbc2d9f7278d21d0ca62382d1.tar.gz
Merge pull request #5881 from gendoc/master
More issues and merge request events support in Project web hooks
-rw-r--r--app/observers/issue_observer.rb2
-rw-r--r--app/observers/merge_request_observer.rb2
-rw-r--r--app/views/help/web_hooks.html.haml4
3 files changed, 6 insertions, 2 deletions
diff --git a/app/observers/issue_observer.rb b/app/observers/issue_observer.rb
index b150e39e239..1575cf0f19f 100644
--- a/app/observers/issue_observer.rb
+++ b/app/observers/issue_observer.rb
@@ -13,6 +13,7 @@ class IssueObserver < BaseObserver
def after_reopen(issue, transition)
create_note(issue)
+ execute_hooks(issue)
end
def after_update(issue)
@@ -21,6 +22,7 @@ class IssueObserver < BaseObserver
end
issue.notice_added_references(issue.project, current_user)
+ execute_hooks(issue)
end
protected
diff --git a/app/observers/merge_request_observer.rb b/app/observers/merge_request_observer.rb
index 96492198111..0ac555fce7c 100644
--- a/app/observers/merge_request_observer.rb
+++ b/app/observers/merge_request_observer.rb
@@ -38,12 +38,14 @@ class MergeRequestObserver < ActivityObserver
def after_reopen(merge_request, transition)
create_event(merge_request, Event::REOPENED)
create_note(merge_request)
+ execute_hooks(merge_request)
end
def after_update(merge_request)
notification.reassigned_merge_request(merge_request, current_user) if merge_request.is_being_reassigned?
merge_request.notice_added_references(merge_request.project, current_user)
+ execute_hooks(merge_request)
end
def create_event(record, status)
diff --git a/app/views/help/web_hooks.html.haml b/app/views/help/web_hooks.html.haml
index 66ab7b75bda..7bde7fcc3d0 100644
--- a/app/views/help/web_hooks.html.haml
+++ b/app/views/help/web_hooks.html.haml
@@ -61,7 +61,7 @@
%h4.prepend-top-20 Issues events
%p.light
- Triggered when new issue created or existing issue was closed.
+ Triggered when new issue created or existing issue was updated/closed/reopened.
%br
Request body:
= highlight_js do
@@ -86,7 +86,7 @@
}
%h4.prepend-top-20 Merge request events
%p.light
- Triggered when new merge request created or existing merge request was merged/closed.
+ Triggered when new merge request created or existing merge request was updated/merged/closed.
%br
Request body:
= highlight_js do