Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
33feaa04
Commit
33feaa04
authored
Dec 19, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5881 from gendoc/master
More issues and merge request events support in Project web hooks
parents
dc4b7cb4
392d79db
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
app/observers/issue_observer.rb
app/observers/issue_observer.rb
+2
-0
app/observers/merge_request_observer.rb
app/observers/merge_request_observer.rb
+2
-0
app/views/help/web_hooks.html.haml
app/views/help/web_hooks.html.haml
+2
-2
No files found.
app/observers/issue_observer.rb
View file @
33feaa04
...
...
@@ -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
...
...
app/observers/merge_request_observer.rb
View file @
33feaa04
...
...
@@ -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
)
...
...
app/views/help/web_hooks.html.haml
View file @
33feaa04
...
...
@@ -61,7 +61,7 @@
%h4
.prepend-top-20
Issues events
%p
.light
Triggered when new issue created or existing issue was
clos
ed.
Triggered when new issue created or existing issue was
updated/closed/reopen
ed.
%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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment