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
399eb9f1
Commit
399eb9f1
authored
Sep 10, 2019
by
Balasankar "Balu" C
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set branches_to_be_notified only if not already set
Signed-off-by:
Balasankar "Balu" C
<
balasankar@gitlab.com
>
parent
7f4638a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
app/models/project_services/chat_notification_service.rb
app/models/project_services/chat_notification_service.rb
+2
-2
app/models/project_services/pipelines_email_service.rb
app/models/project_services/pipelines_email_service.rb
+2
-2
No files found.
app/models/project_services/chat_notification_service.rb
View file @
399eb9f1
...
...
@@ -29,7 +29,7 @@ class ChatNotificationService < Service
self
.
properties
=
{}
self
.
notify_only_broken_pipelines
=
true
self
.
branches_to_be_notified
=
"default"
elsif
!
self
.
notify_only_default_branch
.
nil?
&&
self
.
branches_to_be_notified
.
nil?
elsif
!
self
.
notify_only_default_branch
.
nil?
# In older versions, there was only a boolean property named
# `notify_only_default_branch`. Now we have a string property named
# `branches_to_be_notified`. Instead of doing a background migration, we
...
...
@@ -37,7 +37,7 @@ class ChatNotificationService < Service
# users hasn't specified one already. When users edit the service and
# selects a value for this new property, it will override everything.
self
.
branches_to_be_notified
=
notify_only_default_branch?
?
"default"
:
"all"
self
.
branches_to_be_notified
||
=
notify_only_default_branch?
?
"default"
:
"all"
end
end
...
...
app/models/project_services/pipelines_email_service.rb
View file @
399eb9f1
...
...
@@ -12,7 +12,7 @@ class PipelinesEmailService < Service
self
.
properties
=
{}
self
.
notify_only_broken_pipelines
=
true
self
.
branches_to_be_notified
=
"default"
elsif
!
self
.
notify_only_default_branch
.
nil?
&&
self
.
branches_to_be_notified
.
nil?
elsif
!
self
.
notify_only_default_branch
.
nil?
# In older versions, there was only a boolean property named
# `notify_only_default_branch`. Now we have a string property named
# `branches_to_be_notified`. Instead of doing a background migration, we
...
...
@@ -20,7 +20,7 @@ class PipelinesEmailService < Service
# users hasn't specified one already. When users edit the service and
# selects a value for this new property, it will override everything.
self
.
branches_to_be_notified
=
notify_only_default_branch?
?
"default"
:
"all"
self
.
branches_to_be_notified
||
=
notify_only_default_branch?
?
"default"
:
"all"
end
end
...
...
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