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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
2e5c1c27
Commit
2e5c1c27
authored
Nov 09, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix events presenter after refactoring
parent
c6532ee3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lib/gitlab/cycle_analytics/events.rb
lib/gitlab/cycle_analytics/events.rb
+5
-5
No files found.
lib/gitlab/cycle_analytics/events.rb
View file @
2e5c1c27
...
...
@@ -17,11 +17,11 @@ module Gitlab
event
[
'total_time'
]
=
distance_of_time_in_words
(
event
[
'total_time'
].
to_f
)
commit
=
first_time_reference_commit
(
event
.
delete
(
'commits'
),
event
)
event
[
'title'
]
=
commit
.
title
event
[
'url'
]
=
Gitlab
::
LightUrlBuilder
.
build
(
entity: :commit
_url
,
project:
@project
,
id:
commit
.
id
)
event
[
'url'
]
=
Gitlab
::
LightUrlBuilder
.
build
(
entity: :commit
,
project:
@project
,
id:
commit
.
id
)
event
[
'sha'
]
=
commit
.
short_id
event
[
'author_name'
]
=
commit
.
author
.
name
event
[
'author_profile_url'
]
=
Gitlab
::
LightUrlBuilder
.
build
(
entity: :user
,
id:
commit
.
author
.
username
)
event
[
'author_avatar_url'
]
=
Gitlab
::
LightUrlBuilder
.
build
(
entity: :user_avatar
_url
,
id:
commit
.
author
.
id
)
event
[
'author_avatar_url'
]
=
Gitlab
::
LightUrlBuilder
.
build
(
entity: :user_avatar
,
id:
commit
.
author
.
id
)
end
end
...
...
@@ -56,7 +56,7 @@ module Gitlab
event
[
'total_time'
]
=
distance_of_time_in_words
(
event
[
'total_time'
].
to_f
)
event
[
'created_at'
]
=
interval_in_words
(
event
[
'created_at'
])
event
[
'author_profile_url'
]
=
Gitlab
::
LightUrlBuilder
.
build
(
entity: :user
,
id:
event
[
'author_username'
])
event
[
'author_avatar_url'
]
=
Gitlab
::
LightUrlBuilder
.
build
(
entity: :user_avatar
_url
,
id:
event
[
'author_id'
])
event
[
'author_avatar_url'
]
=
Gitlab
::
LightUrlBuilder
.
build
(
entity: :user_avatar
,
id:
event
[
'author_id'
])
event
.
except!
(
'author_id'
,
'author_username'
)
end
...
...
@@ -66,9 +66,9 @@ module Gitlab
event
[
'name'
]
=
build
.
name
event
[
'url'
]
=
Gitlab
::
LightUrlBuilder
.
build
(
entity: :build
,
project:
@project
,
id:
build
.
id
)
event
[
'branch'
]
=
build
.
ref
event
[
'branch'
]
=
Gitlab
::
LightUrlBuilder
.
build
(
entity: :branch
,
project:
@project
,
id:
build
.
ref
)
event
[
'branch
_url
'
]
=
Gitlab
::
LightUrlBuilder
.
build
(
entity: :branch
,
project:
@project
,
id:
build
.
ref
)
event
[
'sha'
]
=
build
.
short_sha
event
[
'commit'
]
=
Gitlab
::
LightUrlBuilder
.
build
(
entity: :commit
,
project:
@project
,
id:
build
.
sha
)
event
[
'commit
_url
'
]
=
Gitlab
::
LightUrlBuilder
.
build
(
entity: :commit
,
project:
@project
,
id:
build
.
sha
)
event
[
'date'
]
=
build
.
started_at
event
[
'total_time'
]
=
build
.
duration
event
[
'author_name'
]
=
build
.
author
.
try
(
:name
)
...
...
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