Condense merge commits (#242)
This commit is contained in:
@@ -106,7 +106,9 @@
|
||||
}
|
||||
//Pushed commits
|
||||
case "PushEvent":{
|
||||
const {size, commits, ref} = payload
|
||||
let {size, commits, ref} = payload
|
||||
if (commits[commits.length-1].message.startsWith("Merge branch "))
|
||||
commits = [commits[commits.length-1]]
|
||||
return {type:"push", actor, timestamp, repo, size, branch:ref.match(/refs.heads.(?<branch>.*)/)?.groups?.branch ?? null, commits:commits.map(({sha, message}) => ({sha:sha.substring(0, 7), message}))}
|
||||
}
|
||||
//Released
|
||||
@@ -141,4 +143,3 @@
|
||||
throw {error:{message:"An error occured", instance:error}}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user