@@ -4,9 +4,11 @@ import com.github.doyaaaaaken.kotlincsv.dsl.csvWriter
4
4
import dev.hossain.ascii.Art
5
5
import dev.hossain.githubstats.AuthorReviewStats
6
6
import dev.hossain.githubstats.PrStats
7
+ import dev.hossain.githubstats.ReviewStats
7
8
import dev.hossain.githubstats.ReviewerReviewStats
8
9
import dev.hossain.githubstats.util.FileUtil
9
10
import dev.hossain.githubstats.util.LocalProperties
11
+ import dev.hossain.time.toWorkingHour
10
12
import org.koin.core.component.KoinComponent
11
13
import org.koin.core.component.inject
12
14
import kotlin.time.DurationUnit
@@ -50,6 +52,7 @@ class CsvFormatter : StatsFormatter, KoinComponent {
50
52
" Reviewer" ,
51
53
" PR Number" ,
52
54
" Review time (mins)" ,
55
+ " Initial Response time (mins)" ,
53
56
" Code Review Comments" ,
54
57
" PR Issue Comments" ,
55
58
" PR Review Comments" ,
@@ -65,6 +68,7 @@ class CsvFormatter : StatsFormatter, KoinComponent {
65
68
stat.reviewerId, /* "Reviewer" */
66
69
" PR ${reviewStats.pullRequest.number} " , /* "PR Number" */
67
70
" ${reviewStats.reviewCompletion.toInt(DurationUnit .MINUTES )} " , /* "Review time (mins)" */
71
+ " ${reviewStats.initialResponseTime.toInt(DurationUnit .MINUTES )} " , /* "Initial Response time (mins)" */
68
72
" ${reviewStats.prComments.codeReviewComment} " , /* "Code Review Comments" */
69
73
" ${reviewStats.prComments.issueComment} " , /* "PR Issue Comments" */
70
74
" ${reviewStats.prComments.prReviewComment} " , /* "PR Review Comments" */
@@ -126,7 +130,10 @@ class CsvFormatter : StatsFormatter, KoinComponent {
126
130
listOf (
127
131
" PR#" ,
128
132
" Review Time" ,
133
+ " Review Time (working days)" ,
129
134
" Review Time (mins)" ,
135
+ " Initial Response Time (working days)" ,
136
+ " Initial Response Time (mins)" ,
130
137
" Code Review Comments" ,
131
138
" PR Issue Comments" ,
132
139
" PR Review Comments" ,
@@ -138,11 +145,14 @@ class CsvFormatter : StatsFormatter, KoinComponent {
138
145
" PR URL"
139
146
)
140
147
)
141
- stats.reviewedPrStats.forEach { reviewStats ->
148
+ stats.reviewedPrStats.forEach { reviewStats: ReviewStats ->
142
149
writeRow(
143
150
reviewStats.pullRequest.number,
144
151
reviewStats.reviewCompletion,
152
+ reviewStats.reviewCompletion.toWorkingHour(),
145
153
reviewStats.reviewCompletion.toInt(DurationUnit .MINUTES ),
154
+ reviewStats.initialResponseTime.toWorkingHour(),
155
+ reviewStats.initialResponseTime.toInt(DurationUnit .MINUTES ),
146
156
reviewStats.prComments.codeReviewComment,
147
157
reviewStats.prComments.issueComment,
148
158
reviewStats.prComments.prReviewComment,
0 commit comments