diff --git a/gitea-rocketchat.hooks.js b/gitea-rocketchat.hooks.js index b5396e3..9257947 100644 --- a/gitea-rocketchat.hooks.js +++ b/gitea-rocketchat.hooks.js @@ -93,18 +93,12 @@ const giteaEvents = { const repo = request.content.repository; const branch = request.content.ref.split('/').pop(); - if (commits.length > 1) { - var title = "Show all commits"; - } else { - var title = "" - } const attachment = { collapsed: true, - title: title, + title: "Show " + commits.length + " commit", fields: [] }; - for (var i = 0; i < commits.length; i++) { var commit = commits[i]; var shortID = commit.id.substring(0, 7);