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
Jérome Perrin
gitlab-ce
Commits
7dbf114f
Commit
7dbf114f
authored
7 years ago
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the correct project visibility in system hooks
parent
6d7384f5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
app/services/system_hooks_service.rb
app/services/system_hooks_service.rb
+1
-1
changelogs/unreleased/bvl-fix-system-hook-project-visibility.yml
...ogs/unreleased/bvl-fix-system-hook-project-visibility.yml
+5
-0
spec/services/system_hooks_service_spec.rb
spec/services/system_hooks_service_spec.rb
+6
-0
No files found.
app/services/system_hooks_service.rb
View file @
7dbf114f
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
changelogs/unreleased/bvl-fix-system-hook-project-visibility.yml
0 → 100644
View file @
7dbf114f
---
title
:
Use the correct visibility attribute for projects in system hooks
merge_request
:
15065
author
:
type
:
fixed
This diff is collapsed.
Click to expand it.
spec/services/system_hooks_service_spec.rb
View file @
7dbf114f
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
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