mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-01 02:56:08 +01:00
Add full name to account and use it to create commits (#125)
The Git practice is to use the full name when creating commits, not a user name. This commit fixes that by introducing a fullName field to Account and using it when creating commits. For migrating from earlier versions, the user name is used as an initial value for the full name field.
This commit is contained in:
@@ -130,7 +130,7 @@ trait WikiService {
|
||||
try {
|
||||
git.apply.setPatch(new java.io.ByteArrayInputStream(patch.getBytes("UTF-8"))).call
|
||||
git.add.addFilepattern(".").call
|
||||
git.commit.setCommitter(committer.userName, committer.mailAddress).setMessage(pageName match {
|
||||
git.commit.setCommitter(committer.fullName, committer.mailAddress).setMessage(pageName match {
|
||||
case Some(x) => s"Revert ${from} ... ${to} on ${x}"
|
||||
case None => s"Revert ${from} ... ${to}"
|
||||
}).call
|
||||
@@ -175,7 +175,7 @@ trait WikiService {
|
||||
|
||||
// commit and push
|
||||
optionIf(added || deleted){
|
||||
defining(git.commit.setCommitter(committer.userName, committer.mailAddress)
|
||||
defining(git.commit.setCommitter(committer.fullName, committer.mailAddress)
|
||||
.setMessage(if(message.trim.length == 0){
|
||||
if(deleted){
|
||||
s"Rename ${currentPageName} to ${newPageName}"
|
||||
@@ -234,4 +234,4 @@ trait WikiService {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user