Edit file app/services/notification_service.rb
add below code to the end of function new_note
# ignore gitlab service messages starts with _Status changed to closed
return true if note.note =~ /\A_Status changed to closed/
if note.noteable_type.underscore == 'issue'
issue = note.noteable
project = issue.project
issue.project.execute_hooks({
object_kind: 'issue_note',
object_attributes: {
issue: issue.attributes,
repo: project.repository.path_with_namespace,
author: note.author.name,
note: note.note
}
}, :issue_hooks)
end
Edit file app/models/concerns/issuable.rb
Replace function to_hook_data as below
def to_hook_data
{
object_kind: self.class.name.underscore,
object_attributes:
{
issue: self.attributes,
repo: self.project.repository.path_with_namespace,
author: self.author_name
}
}
end
{
id:
title:
assignee_id:
author_id:
project_id:
created_at:
updated_at:
position:
branch_name:
description:
milestone_id:
state:
iid:
}
{
id:
email:
encrypted_password:
reset_password_token:
reset_password_sent_at:
remember_created_at:
sign_in_count:
current_sign_in_at:
last_sign_in_at:
current_sign_in_ip:
last_sign_in_ip:
created_at:
updated_at:
name:
admin:
projects_limit:
skype:
linkedin:
twitter:
authentication_token:
theme_id:
bio:
failed_attempts:
locked_at:
extern_uid:
provider:
username:
can_create_group:
can_create_team:
state: active
color_scheme_id:
notification_level:
password_expires_at:
created_by_id:
avatar:
confirmation_token:
confirmed_at:
confirmation_sent_at:
unconfirmed_email:
hide_no_ssh_key:
}
{
id:
note:
noteable_type:
author_id:
created_at:
updated_at:
project_id:
attachment:
line_code:
commit_id:
noteable_id:
st_diff:
system:
}