Skip to content

Commit e8e7155

Browse files
authored
Reverse commits listed in a recent activity entry (lowlighter#244)
1 parent e688fe0 commit e8e7155

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/plugins/activity/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
let {size, commits, ref} = payload
110110
if (commits[commits.length-1].message.startsWith("Merge branch "))
111111
commits = [commits[commits.length-1]]
112-
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}))}
112+
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}))}
113113
}
114114
//Released
115115
case "ReleaseEvent":{

0 commit comments

Comments
 (0)