James Moger
2012-11-23 b0d30305ac2ac5da59e9314c411aeac0d777dfe6
Fix to sendmail-html for tags
1 files modified
17 ■■■■ changed files
groovy/sendmail-html.groovy 17 ●●●● patch | view | raw | blame | history
groovy/sendmail-html.groovy
@@ -197,7 +197,11 @@
            builder.span('class':'project') {
                mkp.yield "$type "
                span('class': 'repository', name )
                if (number > 0) {
                mkp.yield " $action ($number commits)"
                } else {
                    mkp.yield " $action"
                }
            }
        }
    }
@@ -234,7 +238,7 @@
    }
    def writeCommitTable(commits) {
    def writeCommitTable(commits, includeChangedPaths=true) {
        // Write commits table
        builder.table('class':"table table-disable-hover") {
            thead {
@@ -250,10 +254,12 @@
                for (commit in commits) {
                    writeCommit(commit)
                    if (includeChangedPaths) {
                    // Write detail on that particular commit
                    tr('class' : 'noborder') {
                        td (colspan: includeGravatar ? 3 : 2)
                        td (colspan:2) { writeStatusTable(commit) }
                        }
                    }
                }
            }
@@ -443,10 +449,15 @@
                        case ReceiveCommand.Type.CREATE:
                            def commits = JGitUtils.getRevLog(repository, command.oldId.name, command.newId.name).reverse()
                            commitCount += commits.size()
                            if (refType == 'Branch') {
                            // new branch
                            // Write header
                            writeBranchTitle(refType, ref, "created", commits.size())
                            writeCommitTable(commits)
                                writeCommitTable(commits, true)
                            } else {
                                // new tag
                                writeBranchTitle(refType, ref, "created", 0)
                                writeCommitTable(commits, false)
                            }
                            break
                        case ReceiveCommand.Type.UPDATE:
                            def commits = JGitUtils.getRevLog(repository, command.oldId.name, command.newId.name).reverse()