From e8e715528b27717e9259d73d3d786f8d3acc0b6d Mon Sep 17 00:00:00 2001 From: Nixinova <42429413+Nixinova@users.noreply.github.com> Date: Tue, 20 Apr 2021 08:20:29 +1200 Subject: [PATCH] Reverse commits listed in a recent activity entry (#244) --- source/plugins/activity/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugins/activity/index.mjs b/source/plugins/activity/index.mjs index cd2f6859..f159ecca 100644 --- a/source/plugins/activity/index.mjs +++ b/source/plugins/activity/index.mjs @@ -109,7 +109,7 @@ 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.(?.*)/)?.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.(?.*)/)?.groups?.branch ?? null, commits:commits.reverse().map(({sha, message}) => ({sha:sha.substring(0, 7), message}))} } //Released case "ReleaseEvent":{