| | |
| | | com.gitblit.models.UserModel userModel = user
|
| | |
|
| | | // Indicate we have started the script
|
| | | logger.info("sendmail hook triggered by ${user.username} for ${repository.name}")
|
| | | logger.info("sendmail-html hook triggered by ${user.username} for ${repository.name}")
|
| | |
|
| | | /*
|
| | | * Primitive email notification.
|
| | |
| | | def mountParameters
|
| | | def forwardSlashChar
|
| | | def includeGravatar
|
| | | def shortCommitIdLength
|
| | | def commitCount = 0
|
| | | def commands
|
| | | def writer = new StringWriter();
|
| | |
| | | }
|
| | |
|
| | | def writeCommit(commit) {
|
| | | def abbreviated = repository.newObjectReader().abbreviate(commit.id, 8).name()
|
| | | def abbreviated = repository.newObjectReader().abbreviate(commit.id, shortCommitIdLength).name()
|
| | | def author = commit.authorIdent.name
|
| | | def email = commit.authorIdent.emailAddress
|
| | | def message = commit.shortMessage
|
| | |
| | | mailWriter.url = url
|
| | | mailWriter.mountParameters = gitblit.getBoolean(Keys.web.mountParameters, true)
|
| | | mailWriter.includeGravatar = gitblit.getBoolean(Keys.web.allowGravatar, true)
|
| | | mailWriter.shortCommitIdLength = GitBlit.getInteger(Keys.web.shortCommitIdLength, 8)
|
| | |
|
| | | def content = mailWriter.write()
|
| | |
|