Merge pull request #5881 from gendoc/master
More issues and merge request events support in Project web hooks
This commit is contained in:
commit
33feaa0428
3 changed files with 6 additions and 2 deletions
|
@ -13,6 +13,7 @@ class IssueObserver < BaseObserver
|
||||||
|
|
||||||
def after_reopen(issue, transition)
|
def after_reopen(issue, transition)
|
||||||
create_note(issue)
|
create_note(issue)
|
||||||
|
execute_hooks(issue)
|
||||||
end
|
end
|
||||||
|
|
||||||
def after_update(issue)
|
def after_update(issue)
|
||||||
|
@ -21,6 +22,7 @@ class IssueObserver < BaseObserver
|
||||||
end
|
end
|
||||||
|
|
||||||
issue.notice_added_references(issue.project, current_user)
|
issue.notice_added_references(issue.project, current_user)
|
||||||
|
execute_hooks(issue)
|
||||||
end
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
|
@ -38,12 +38,14 @@ class MergeRequestObserver < ActivityObserver
|
||||||
def after_reopen(merge_request, transition)
|
def after_reopen(merge_request, transition)
|
||||||
create_event(merge_request, Event::REOPENED)
|
create_event(merge_request, Event::REOPENED)
|
||||||
create_note(merge_request)
|
create_note(merge_request)
|
||||||
|
execute_hooks(merge_request)
|
||||||
end
|
end
|
||||||
|
|
||||||
def after_update(merge_request)
|
def after_update(merge_request)
|
||||||
notification.reassigned_merge_request(merge_request, current_user) if merge_request.is_being_reassigned?
|
notification.reassigned_merge_request(merge_request, current_user) if merge_request.is_being_reassigned?
|
||||||
|
|
||||||
merge_request.notice_added_references(merge_request.project, current_user)
|
merge_request.notice_added_references(merge_request.project, current_user)
|
||||||
|
execute_hooks(merge_request)
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_event(record, status)
|
def create_event(record, status)
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
|
|
||||||
%h4.prepend-top-20 Issues events
|
%h4.prepend-top-20 Issues events
|
||||||
%p.light
|
%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
|
%br
|
||||||
Request body:
|
Request body:
|
||||||
= highlight_js do
|
= highlight_js do
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
}
|
}
|
||||||
%h4.prepend-top-20 Merge request events
|
%h4.prepend-top-20 Merge request events
|
||||||
%p.light
|
%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
|
%br
|
||||||
Request body:
|
Request body:
|
||||||
= highlight_js do
|
= highlight_js do
|
||||||
|
|
Loading…
Reference in a new issue