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
c9dfe978
Commit
c9dfe978
authored
Aug 03, 2020
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix grammar in Danger roulette timezone details
parent
dc6fa046
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
lib/gitlab/danger/teammate.rb
lib/gitlab/danger/teammate.rb
+1
-1
spec/lib/gitlab/danger/teammate_spec.rb
spec/lib/gitlab/danger/teammate_spec.rb
+3
-3
No files found.
lib/gitlab/danger/teammate.rb
View file @
c9dfe978
...
...
@@ -82,7 +82,7 @@ module Gitlab
diff
=
floored_offset_hours
-
author
.
floored_offset_hours
return
"same timezone as `@
#{
author
.
username
}
`"
if
diff
.
zero?
ahead_or_behind
=
diff
<
0
?
'behind'
:
'ahead'
ahead_or_behind
=
diff
<
0
?
'behind'
:
'ahead
of
'
pluralized_hours
=
pluralize
(
diff
.
abs
,
'hour'
,
'hours'
)
"
#{
pluralized_hours
}
#{
ahead_or_behind
}
`@
#{
author
.
username
}
`"
...
...
spec/lib/gitlab/danger/teammate_spec.rb
View file @
c9dfe978
...
...
@@ -192,12 +192,12 @@ RSpec.describe Gitlab::Danger::Teammate do
context
'when author is given'
do
where
(
:tz_offset_hours
,
:author_offset
,
:diff_text
)
do
-
12
|
-
10
|
"2 hours behind `@mario`"
-
10
|
-
12
|
"2 hours ahead `@mario`"
-
10
|
-
12
|
"2 hours ahead
of
`@mario`"
-
10
|
2
|
"12 hours behind `@mario`"
2
|
4
|
"2 hours behind `@mario`"
4
|
2
|
"2 hours ahead `@mario`"
4
|
2
|
"2 hours ahead
of
`@mario`"
2
|
3
|
"1 hour behind `@mario`"
3
|
2
|
"1 hour ahead `@mario`"
3
|
2
|
"1 hour ahead
of
`@mario`"
2
|
2
|
"same timezone as `@mario`"
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