提交 7dbf114f 编写于 作者: B Bob Van Landuyt

Use the correct project visibility in system hooks

上级 6d7384f5
......@@ -83,7 +83,7 @@ class SystemHooksService
project_id: model.id,
owner_name: owner.name,
owner_email: owner.respond_to?(:email) ? owner.email : "",
project_visibility: Project.visibility_levels.key(model.visibility_level_value).downcase
project_visibility: model.visibility.downcase
}
end
......
---
title: Use the correct visibility attribute for projects in system hooks
merge_request: 15065
author:
type: fixed
......@@ -63,6 +63,12 @@ describe SystemHooksService do
:group_id, :user_id, :user_username, :user_name, :user_email, :group_access
)
end
it 'includes the correct project visibility level' do
data = event_data(project, :create)
expect(data[:project_visibility]).to eq('private')
end
end
context 'event names' do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册