feat: Use current user as commit author
This commit is contained in:
1 parent
1765c9c652
commit
8f3a6ed9f3
2 files changed
+13
-2
No files matched your search
@@ -1,7 +1,15 @@
|
||||
'use strict'
|
||||
|
||||
/* global appdata, appconfig */
|
||||
|
||||
const _ = require('lodash')
|
||||
|
||||
module.exports = {
|
||||
sanitizeCommitUser (user) {
|
||||
|
||||
let wlist = new RegExp('(?!([^a-zA-Z0-9-_.\',& ]|' + appdata.regex.cjk.source + '))', 'g')
|
||||
return {
|
||||
name: _.chain(user.name).replace(wlist, '').trim().value(),
|
||||
email: appconfig.git.showUserEmail ? user.email : appconfig.git.serverEmail
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user