Refactor regex
Now it doesn't rely on commit hash being 7 chars
This commit is contained in:
parent
fe8b2d23ea
commit
31fcb4618d
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ module.exports = {
|
||||||
sendText = sendText + "\nServer.js OR message.js OR ready.js has been updated.\nThis requires the bot to be restarted."
|
sendText = sendText + "\nServer.js OR message.js OR ready.js has been updated.\nThis requires the bot to be restarted."
|
||||||
}
|
}
|
||||||
message.channel.send(sendText).then(function(msg){
|
message.channel.send(sendText).then(function(msg){
|
||||||
let regex = /(.{0,7}\.\..{0,7})/
|
let regex = /([^\s]+)\.\.([^\s]+)/
|
||||||
let commits = stdout.match(regex)[0]
|
let commits = stdout.match(regex)[0]
|
||||||
cmd = `git log --oneline ${commits}`;
|
cmd = `git log --oneline ${commits}`;
|
||||||
exec(cmd, (err, stdout, stderr) =>{
|
exec(cmd, (err, stdout, stderr) =>{
|
||||||
|
|
Loading…
Add table
Reference in a new issue