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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
9a29cfd9
Commit
9a29cfd9
authored
Sep 02, 2019
by
Balasankar "Balu" C
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor notification branch selection
Signed-off-by:
Balasankar "Balu" C
<
balasankar@gitlab.com
>
parent
2510a6a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
app/models/project_services/notification_branch_selection.rb
app/models/project_services/notification_branch_selection.rb
+5
-4
No files found.
app/models/project_services/notification_branch_selection.rb
View file @
9a29cfd9
...
...
@@ -20,13 +20,14 @@ module NotificationBranchSelection
is_default_branch
=
ref
==
project
.
default_branch
is_protected_branch
=
project
.
protected_branches
.
exists?
(
name:
ref
)
if
branches_to_be_notified
==
"all"
case
branches_to_be_notified
when
"all"
true
elsif
branches_to_be_notified
==
"default"
when
"default"
is_default_branch
elsif
branches_to_be_notified
==
"protected"
when
"protected"
is_protected_branch
elsif
branches_to_be_notified
==
"default_and_protected"
when
"default_and_protected"
is_default_branch
||
is_protected_branch
else
false
...
...
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