diff --git a/source/plugins/activity/index.mjs b/source/plugins/activity/index.mjs index 47565a0a..cd2f6859 100644 --- a/source/plugins/activity/index.mjs +++ b/source/plugins/activity/index.mjs @@ -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.(?.*)/)?.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}} } } -