Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
oss
gitlabtime
Commits
99447f22
Commit
99447f22
authored
Aug 04, 2020
by
Thomas Lotze
Browse files
re
#10
: distinguish projects by full path in report, display with namespace
parent
2c1b08be
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/gitlabtime/report.py
View file @
99447f22
...
...
@@ -11,7 +11,8 @@ def report(entries):
totals_by_project
=
defaultdict
(
float
)
totals_by_item
=
defaultdict
(
float
)
for
entry
in
entries
:
project
=
entry
[
'project'
].
name
project
=
entry
[
'project'
]
project
=
(
project
.
path_with_namespace
,
project
)
item
=
entry
[
'item'
]
item
=
([
ProjectIssue
,
ProjectMergeRequest
].
index
(
type
(
item
)),
item
.
iid
,
...
...
@@ -23,8 +24,9 @@ def report(entries):
total
=
sum
(
totals_by_project
.
values
())
for
project
,
times_by_item
in
sorted
(
times
.
items
()):
print
(
'{}: {:.2f}'
.
format
(
project
,
totals_by_project
[
project
]))
for
(
_
,
project
),
times_by_item
in
sorted
(
times
.
items
()):
print
(
'{}: {:.2f}'
.
format
(
project
.
name_with_namespace
,
totals_by_project
[
project
]))
for
(
_
,
_
,
item
),
times_by_author
in
sorted
(
times_by_item
.
items
()):
print
(
'{}{}: {:.2f} ({})'
.
format
(
...
...
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