From f981eba01fa6984f315d6480ea05ab604506d326 Mon Sep 17 00:00:00 2001 From: Bauke Date: Wed, 11 Jul 2018 00:53:20 +0200 Subject: [PATCH] Minor changes, changed frequent users to ordered list --- main.js | 3 ++- statistics.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index d69ee93..9639b0f 100644 --- a/main.js +++ b/main.js @@ -171,8 +171,9 @@ function createStatistics() { const topUsers = freqUsers(opened, 3) statistics += 'Top 3 issue creators:\n\n' + let top3 = 1 for (const user in topUsers) { - statistics += `* [${user}](https://gitlab.com/${user}) ` + statistics += `${top3++}. [${user}](https://gitlab.com/${user}) ` statistics += `with [${topUsers[user]} issues created](https://gitlab.com/tildes/tildes/issues?state=all&author_username=${user}).\n` } diff --git a/statistics.js b/statistics.js index 4ad0e76..f6f8c69 100644 --- a/statistics.js +++ b/statistics.js @@ -3,6 +3,7 @@ * @description Returns the average time it takes to close an issue in hours or days. * @param {Array} data Array with paths leading to GitLab Issue .json files * @param {string} time 'hours' or 'days' + * @returns {number} */ function avgTime(data, time) {