Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
06358e32
Commit
06358e32
authored
7 years ago
by
Rhys Arkins
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: print schedule text along with error message (#679)
* fix: print schedule text along with error message * update test
parent
26bafe8d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/workers/branch/schedule.js
+2
-2
2 additions, 2 deletions
lib/workers/branch/schedule.js
test/config/__snapshots__/validation.spec.js.snap
+1
-1
1 addition, 1 deletion
test/config/__snapshots__/validation.spec.js.snap
with
3 additions
and
3 deletions
lib/workers/branch/schedule.js
+
2
−
2
View file @
06358e32
...
@@ -29,11 +29,11 @@ function hasValidSchedule(schedule) {
...
@@ -29,11 +29,11 @@ function hasValidSchedule(schedule) {
return
true
;
return
true
;
}
}
if
(
parsedSchedule
.
schedules
.
some
(
s
=>
s
.
m
))
{
if
(
parsedSchedule
.
schedules
.
some
(
s
=>
s
.
m
))
{
message
=
'
Schedule
s
should not specify minutes
'
;
message
=
`
Schedule
"
${
scheduleText
}
"
should not specify minutes
`
;
return
true
;
return
true
;
}
}
if
(
!
parsedSchedule
.
schedules
.
some
(
s
=>
s
.
d
||
s
.
t_a
||
s
.
t_b
))
{
if
(
!
parsedSchedule
.
schedules
.
some
(
s
=>
s
.
d
||
s
.
t_a
||
s
.
t_b
))
{
message
=
'
Schedule has no days of week or time of day
'
;
message
=
`
Schedule
"
${
scheduleText
}
"
has no days of week or time of day
`
;
return
true
;
return
true
;
}
}
// It must be OK
// It must be OK
...
...
This diff is collapsed.
Click to expand it.
test/config/__snapshots__/validation.spec.js.snap
+
1
−
1
View file @
06358e32
...
@@ -8,7 +8,7 @@ Array [
...
@@ -8,7 +8,7 @@ Array [
},
},
Object {
Object {
"depName": "Configuration Error",
"depName": "Configuration Error",
"message": "Invalid schedule: \`Schedule
s
should not specify minutes\`",
"message": "Invalid schedule: \`Schedule
\\"every 15 mins every weekday\\"
should not specify minutes\`",
},
},
Object {
Object {
"depName": "Configuration Error",
"depName": "Configuration Error",
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment