From 5e5be68f67c04be2cf11087a0887b874d453a97c Mon Sep 17 00:00:00 2001 From: austinsuyoyo Date: Thu, 11 Feb 2021 14:32:01 +0800 Subject: [PATCH] Fix: It didnt show messasge when commit --- gitea-rocketchat.hooks.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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);