Skip to content

Commit 4ccefca

Browse files
committed
Add plugin_habits_from option
1 parent cdb7cc1 commit 4ccefca

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ inputs:
4141
plugin_habits:
4242
description: Enable coding habits metrics
4343
default: no
44+
plugin_habits_from:
45+
description: Number of activity events to base habits on (up to 100)
46+
default: 100
4447
plugin_selfskip:
4548
description: Skip commits flagged with [Skip GitHub Action] from commits count
4649
default: no

action/dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

action/index.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
lines:{enabled:bool(core.getInput("plugin_lines"))},
6969
traffic:{enabled:bool(core.getInput("plugin_traffic"))},
7070
pagespeed:{enabled:bool(core.getInput("plugin_pagespeed"))},
71-
habits:{enabled:bool(core.getInput("plugin_habits"))},
71+
habits:{enabled:bool(core.getInput("plugin_habits")), from:Number(core.getInput("plugin_habits_from")) || 100},
7272
selfskip:{enabled:bool(core.getInput("plugin_selfskip"))},
7373
languages:{enabled:bool(core.getInput("plugin_languages"))},
7474
followup:{enabled:bool(core.getInput("plugin_followup"))},
@@ -81,7 +81,7 @@
8181
}
8282

8383
//Repositories to use
84-
const repositories = Math.max(0, Number(core.getInput("repositories"))) || 100
84+
const repositories = Number(core.getInput("repositories")) || 100
8585
console.log(`Repositories to use | ${repositories}`)
8686
q.repositories = repositories
8787

0 commit comments

Comments
 (0)