Skip to content

Commit 81e0f40

Browse files
adding information about number of commits
1 parent 9194328 commit 81e0f40

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

compile.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
mvn clean compile assembly:single
1+
mvn compile assembly:single

src/main/java/org/clebert/GitParser.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ public void parse(PrintStream output, String from, String to) throws Exception {
190190

191191
output.println("</tr>");
192192

193+
int numberOfCommits = 0;
193194
while (commits.hasNext()) {
194195
for (int i = 0; i < interestingFolder.size(); i++) {
195196
// the method to cleanup a stringbuffer is cpu intensive. sorry for the extra garbage
@@ -199,6 +200,8 @@ public void parse(PrintStream output, String from, String to) throws Exception {
199200

200201
RevCommit commit = commits.next();
201202

203+
numberOfCommits++;
204+
202205
output.print("<tr>");
203206
output.print("<td>" + commitCell(commit) + " </td>");
204207
output.print("<td>" + dateFormat.format(commit.getAuthorIdent().getWhen()) + "</td>");
@@ -296,6 +299,7 @@ public void parse(PrintStream output, String from, String to) throws Exception {
296299

297300
output.println("</table>");
298301

302+
output.println("<br/><h2>" + numberOfCommits + " Commits on this report</h2>");
299303
if (sampleJQL != null && !totalJiras.isEmpty()) {
300304
output.println("<br><h2>");
301305
output.print("<a href='" + sampleJQL + "(");
@@ -314,6 +318,7 @@ public void parse(PrintStream output, String from, String to) throws Exception {
314318
output.println(")'>" + totalJiras.size() + " JIRAS on this Report</a></h2>");
315319
}
316320

321+
317322
output.println("</body></html>");
318323

319324
}

0 commit comments

Comments
 (0)