Reverse commits listed in a recent activity entry (#244)
This commit is contained in:
@@ -109,7 +109,7 @@
|
|||||||
let {size, commits, ref} = payload
|
let {size, commits, ref} = payload
|
||||||
if (commits[commits.length-1].message.startsWith("Merge branch "))
|
if (commits[commits.length-1].message.startsWith("Merge branch "))
|
||||||
commits = [commits[commits.length-1]]
|
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}))}
|
return {type:"push", actor, timestamp, repo, size, branch:ref.match(/refs.heads.(?<branch>.*)/)?.groups?.branch ?? null, commits:commits.reverse().map(({sha, message}) => ({sha:sha.substring(0, 7), message}))}
|
||||||
}
|
}
|
||||||
//Released
|
//Released
|
||||||
case "ReleaseEvent":{
|
case "ReleaseEvent":{
|
||||||
|
|||||||
Reference in New Issue
Block a user