Skip to content

Commit a421dfa

Browse files
committed
Fix merge requests not showing in report
1 parent b288382 commit a421dfa

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

output/base.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -104,20 +104,22 @@ class base {
104104
let projects = {};
105105
let times = [];
106106

107-
this.report.issues.forEach(issue => {
108-
issue.times.forEach(time => {
109-
if (!users[time.user]) users[time.user] = 0;
110-
if (!projects[time.project_namespace]) projects[time.project_namespace] = 0;
107+
['issues', 'mergeRequests'].forEach(type => {
108+
this.report[type].forEach(issue => {
109+
issue.times.forEach(time => {
110+
if (!users[time.user]) users[time.user] = 0;
111+
if (!projects[time.project_namespace]) projects[time.project_namespace] = 0;
111112

112-
users[time.user] += time.seconds;
113-
projects[time.project_namespace] += time.seconds;
113+
users[time.user] += time.seconds;
114+
projects[time.project_namespace] += time.seconds;
114115

115-
spent += time.seconds;
116-
times.push(time);
117-
});
116+
spent += time.seconds;
117+
times.push(time);
118+
});
118119

119-
totalEstimate += parseInt(issue.stats.time_estimate);
120-
totalSpent += parseInt(issue.stats.total_time_spent);
120+
totalEstimate += parseInt(issue.stats.time_estimate);
121+
totalSpent += parseInt(issue.stats.total_time_spent);
122+
});
121123
});
122124

123125
this.times = times;

0 commit comments

Comments
 (0)