New comment on merge request do not trigger web hook
Created by: blackeyedboy
Summary : when a user add a comment to a merge request, the web hook is not triggered for a merge_request event.
Steps to reproduce : open a merge request (the web hook is triggered), add a comment to this merge request (the web hook is NOT triggered).
Expected behavior : trigger the web hook when any user add a comment to a merge_request !
Note that if I add a comment through a POST /projects/:id/merge_request/:merge_request_id/comments
API call, the merge_request web hook is correctly triggered on the comment add !
Possible fixes : I've little or no experience with ruby nor gitlab internal architecture, but maybe just a execute_hooks(merge_request)
with the relevant merge_request
on which the comment has been posted in the app/observers/note_observer.rb ?
I've seen in the app/observers folder history that the observers get removed one by one (mergerequest, keys, emails, issue, etc...), so maybe you are getting to a new way of triggering web hooks that I don't see for now, and my "possible fix" just sucks.
I'm sorry to say I haven't managed to find out how the note.save
in lib/api/merge_requests.rb trigger the web hook.
Checks : GitLab 6.7.3 f88d30fa with tests full ok, see below.
System information
System:
Current User: git
Using RVM: no
Ruby Version: 1.9.3p194
Gem Version: 1.8.23
Bundler Version:1.6.1
Rake Version: 10.1.1
Checking Environment ...
Git configured for git user? ... yes
Checking Environment ... Finished
Checking GitLab Shell ...
GitLab Shell version >= 1.9.1 ? ... OK (1.9.1)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
update hook up-to-date? ... yes
update hooks in repos are links: ...
XXX / Testing Purpose ... ok
Running /home/git/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
/home/git/repositories: OK
/home/git/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.4.14
Send ping to redis server: PONG
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
Database contains orphaned UsersGroups? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
projects have namespace: ...
XXX / Testing Purpose ... yes
Projects have satellites? ...
XXX / Testing Purpose ... yes
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.7.10)
Checking GitLab ... Finished
Just a side note : Gitlab rocks !