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
482fc553
Commit
482fc553
authored
Jan 25, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix validation error on services
parent
4376be84
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
4 deletions
+6
-4
app/models/project_services/emails_on_push_service.rb
app/models/project_services/emails_on_push_service.rb
+1
-1
app/models/project_services/irker_service.rb
app/models/project_services/irker_service.rb
+1
-1
app/models/project_services/pipelines_email_service.rb
app/models/project_services/pipelines_email_service.rb
+1
-1
app/models/service.rb
app/models/service.rb
+2
-0
spec/lib/gitlab/import_export/project.json
spec/lib/gitlab/import_export/project.json
+1
-1
No files found.
app/models/project_services/emails_on_push_service.rb
View file @
482fc553
...
...
@@ -2,7 +2,7 @@ class EmailsOnPushService < Service
boolean_accessor
:send_from_committer_email
boolean_accessor
:disable_diffs
prop_accessor
:recipients
validates
:recipients
,
presence:
true
,
if: :activated?
validates
:recipients
,
presence:
true
,
if: :activated?
,
unless: :importing?
def
title
'Emails on push'
...
...
app/models/project_services/irker_service.rb
View file @
482fc553
...
...
@@ -4,7 +4,7 @@ class IrkerService < Service
prop_accessor
:server_host
,
:server_port
,
:default_irc_uri
prop_accessor
:recipients
,
:channels
boolean_accessor
:colorize_messages
validates
:recipients
,
presence:
true
,
if: :activated?
validates
:recipients
,
presence:
true
,
if: :activated?
,
unless: :importing?
before_validation
:get_channels
...
...
app/models/project_services/pipelines_email_service.rb
View file @
482fc553
class
PipelinesEmailService
<
Service
prop_accessor
:recipients
boolean_accessor
:notify_only_broken_pipelines
validates
:recipients
,
presence:
true
,
if: :activated?
validates
:recipients
,
presence:
true
,
if: :activated?
,
unless: :importing?
def
initialize_properties
self
.
properties
||=
{
notify_only_broken_pipelines:
true
}
...
...
app/models/service.rb
View file @
482fc553
...
...
@@ -2,6 +2,8 @@
# and implement a set of methods
class
Service
<
ActiveRecord
::
Base
include
Sortable
include
Importable
serialize
:properties
,
JSON
# rubocop:disable Cop/ActiveRecordSerialize
default_value_for
:active
,
false
...
...
spec/lib/gitlab/import_export/project.json
View file @
482fc553
...
...
@@ -7096,7 +7096,7 @@
"project_id"
:
5
,
"created_at"
:
"2016-06-14T15:01:51.232Z"
,
"updated_at"
:
"2016-06-14T15:01:51.232Z"
,
"active"
:
fals
e
,
"active"
:
tru
e
,
"properties"
:
{
},
...
...
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