From dc271dbcf2ea6a057ddd63d1992e2a2b7fc83a0b Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Wed, 26 May 2021 19:00:22 +0200 Subject: [PATCH] Only consider added lines in activity graph --- source/plugins/habits/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugins/habits/index.mjs b/source/plugins/habits/index.mjs index 2416ead2..10e3a373 100644 --- a/source/plugins/habits/index.mjs +++ b/source/plugins/habits/index.mjs @@ -47,7 +47,7 @@ export default async function({login, data, rest, imports, q, account}, {enabled .filter(({status}) => status === "fulfilled") .map(({value}) => value) .flatMap(files => files.map(file => ({name:imports.paths.basename(file.filename), patch:file.patch ?? ""}))) - .map(({name, patch}) => ({name, patch:patch.split("\n").filter(line => /^[-+]/.test(line)).map(line => line.substring(1)).join("\n")})) + .map(({name, patch}) => ({name, patch:patch.split("\n").filter(line => /^[+]/.test(line)).map(line => line.substring(1)).join("\n")})) //Commit day {