Skip to content

Commit

Permalink
Only consider added lines in activity graph
Browse files Browse the repository at this point in the history
  • Loading branch information
lowlighter committed May 26, 2021
1 parent a1600a7 commit dc271db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/plugins/habits/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit dc271db

Please sign in to comment.