Fix update to show whole commit msg
This commit is contained in:
parent
3e718e60ec
commit
0c1357903b
1 changed files with 2 additions and 0 deletions
|
@ -19,6 +19,8 @@ module.exports = {
|
||||||
message.channel.send(sendText).then(function(msg){
|
message.channel.send(sendText).then(function(msg){
|
||||||
cmd = "git log --oneline -n 1";
|
cmd = "git log --oneline -n 1";
|
||||||
exec(cmd, (err, stdout, stderr) =>{
|
exec(cmd, (err, stdout, stderr) =>{
|
||||||
|
let regex = /.{0,7} /
|
||||||
|
let commitMsg = stdout.replace(regex, "")
|
||||||
process.stdout.write(stdout)
|
process.stdout.write(stdout)
|
||||||
msg.edit(`${sendText}\n\nNewest commit:\n${stdout.split(" ")[1]}`)
|
msg.edit(`${sendText}\n\nNewest commit:\n${stdout.split(" ")[1]}`)
|
||||||
if (err) console.log(stderr)
|
if (err) console.log(stderr)
|
||||||
|
|
Loading…
Add table
Reference in a new issue