Web instances: Add flags to enable unsafe extra features (#438)
This commit is contained in:
@@ -21,6 +21,8 @@ Use a full `repo` scope token to access **private** events.
|
||||
|
||||
By default, dates use Greenwich meridian (GMT/UTC). Be sure to set your timezone (see [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for a list of supported timezones) for accurate metrics.
|
||||
|
||||
> 🔣 On web instances, *recent languages activity* is an extra feature and must be enabled globally in `settings.json`
|
||||
|
||||
#### ℹ️ Examples workflows
|
||||
|
||||
[➡️ Available options for this plugin](metadata.yml)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { recent as recent_analyzer } from "./../languages/analyzers.mjs"
|
||||
|
||||
//Setup
|
||||
export default async function({login, data, rest, imports, q, account}, {enabled = false, ...defaults} = {}) {
|
||||
export default async function({login, data, rest, imports, q, account}, {enabled = false, extras = false, ...defaults} = {}) {
|
||||
//Plugin execution
|
||||
try {
|
||||
//Check if plugin is enabled and requirements are met
|
||||
@@ -97,7 +97,7 @@ export default async function({login, data, rest, imports, q, account}, {enabled
|
||||
}
|
||||
|
||||
//Linguist
|
||||
if (charts) {
|
||||
if ((extras)&&(charts)) {
|
||||
//Check if linguist exists
|
||||
console.debug(`metrics/compute/${login}/plugins > habits > searching recently used languages using linguist`)
|
||||
if (patches.length) {
|
||||
@@ -109,7 +109,6 @@ export default async function({login, data, rest, imports, q, account}, {enabled
|
||||
}
|
||||
else
|
||||
console.debug(`metrics/compute/${login}/plugins > habits > linguist not available`)
|
||||
|
||||
}
|
||||
|
||||
//Results
|
||||
|
||||
Reference in New Issue
Block a user