Version 2.1

- No plugins are enabled by default
- Logs from setup can be hidden
- Number of repositories to inspect can be configured (default to 100)
- Default events for habits plugin is now 100
- Number of events for habits can be overriden in query
- Server app improvments
- Test improvements
- Better test
This commit is contained in:
lowlighter
2020-10-23 13:56:15 +02:00
parent 543c6f8f98
commit 2cf152d7d1
16 changed files with 311 additions and 200 deletions

View File

@@ -1,5 +1,5 @@
//Setup
export default function ({login, data, computed, pending, q}, {enabled = true} = {}) {
export default function ({login, data, computed, pending, q}, {enabled = false} = {}) {
//Check if plugin is enabled and requirements are met
if (!enabled)
return computed.plugins.followup = null

View File

@@ -1,5 +1,5 @@
//Setup
export default function ({login, rest, computed, pending, q}, {enabled = false, from = 50} = {}) {
export default function ({login, rest, computed, pending, q}, {enabled = false, from = 100} = {}) {
//Check if plugin is enabled and requirements are met
if (!enabled)
return computed.plugins.habits = null
@@ -8,6 +8,12 @@
console.debug(`metrics/compute/${login}/plugins > habits`)
computed.svg.height += 70
//Parameter override
if (typeof q["habits.from"] === "number") {
from = Math.max(0, Math.min(from, q["habits.from"]))
console.debug(`metrics/compute/${login}/plugins > habits > events = ${from}`)
}
//Plugin execution
pending.push(new Promise(async solve => {
try {

View File

@@ -1,5 +1,5 @@
//Setup
export default function ({login, data, computed, pending, q}, {enabled = true} = {}) {
export default function ({login, data, computed, pending, q}, {enabled = false} = {}) {
//Check if plugin is enabled and requirements are met
if (!enabled)
return computed.plugins.languages = null