Merge branch 'master' of https://github.com/lowlighter/metrics
This commit is contained in:
2
action.yml
generated
2
action.yml
generated
@@ -1008,7 +1008,7 @@ inputs:
|
|||||||
# Username on Wakatime
|
# Username on Wakatime
|
||||||
plugin_wakatime_user:
|
plugin_wakatime_user:
|
||||||
description: Your Wakatime user on the selfhosted Wakapi instance
|
description: Your Wakatime user on the selfhosted Wakapi instance
|
||||||
default: .user.login
|
default: current
|
||||||
|
|
||||||
# ====================================================================================
|
# ====================================================================================
|
||||||
# 💹 Stock prices
|
# 💹 Stock prices
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ async function total({imports}) {
|
|||||||
const page = await browser.newPage()
|
const page = await browser.newPage()
|
||||||
await page.goto("https://github.com/search")
|
await page.goto("https://github.com/search")
|
||||||
const result = await page.evaluate(() => [...document.querySelectorAll("h2")].filter(node => /Search more/.test(node.innerText)).shift()?.innerText.trim().match(/(?<count>\d+)M\s+(?<type>repositories|users|issues)$/)?.groups) ?? null
|
const result = await page.evaluate(() => [...document.querySelectorAll("h2")].filter(node => /Search more/.test(node.innerText)).shift()?.innerText.trim().match(/(?<count>\d+)M\s+(?<type>repositories|users|issues)$/)?.groups) ?? null
|
||||||
console.log(`metrics/compute/plugins > achievements > setup found ${result?.type ?? "(?)"}`)
|
console.debug(`metrics/compute/plugins > achievements > setup found ${result?.type ?? "(?)"}`)
|
||||||
if ((result?.type) && (!total[result.type])) {
|
if ((result?.type) && (!total[result.type])) {
|
||||||
const {count, type} = result
|
const {count, type} = result
|
||||||
total[type] = Number(count) * 10e5
|
total[type] = Number(count) * 10e5
|
||||||
|
|||||||
@@ -68,4 +68,4 @@ inputs:
|
|||||||
plugin_wakatime_user:
|
plugin_wakatime_user:
|
||||||
description: Your Wakatime user on the selfhosted Wakapi instance
|
description: Your Wakatime user on the selfhosted Wakapi instance
|
||||||
type: string
|
type: string
|
||||||
default: .user.login
|
default: current
|
||||||
|
|||||||
Reference in New Issue
Block a user