Fix workflow

This commit is contained in:
linguist
2020-12-28 21:55:06 +01:00
parent 04f365188d
commit 7a2c6462a2
5 changed files with 22 additions and 20 deletions

View File

@@ -57,7 +57,7 @@ jobs:
template: ${{ matrix.template }}
base: header, activity, community, repositories, metadata
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
- name: ${{ matrix.template }} > Plugin > PageSpeed
uses: lowlighter/metrics@master
@@ -68,7 +68,7 @@ jobs:
template: ${{ matrix.template }}
base: ""
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
plugin_pagespeed: yes
plugin_pagespeed_token: ${{ secrets.PAGESPEED_TOKEN }}
plugin_pagespeed_detailed: yes
@@ -83,7 +83,7 @@ jobs:
template: ${{ matrix.template }}
base: ""
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
plugin_music: yes
plugin_music_playlist: ${{ secrets.MUSIC_PLAYLIST_APPLE }}
@@ -96,7 +96,7 @@ jobs:
template: ${{ matrix.template }}
base: ""
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
plugin_music: yes
plugin_music_playlist: ${{ secrets.MUSIC_PLAYLIST_SPOTIFY }}
@@ -109,7 +109,7 @@ jobs:
template: ${{ matrix.template }}
base: ""
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
plugin_music: yes
plugin_music_provider: spotify
plugin_music_token: ${{ secrets.SPOTIFY_TOKENS }}
@@ -123,7 +123,7 @@ jobs:
template: ${{ matrix.template }}
base: ""
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
plugin_posts: yes
plugin_posts_source: dev.to
@@ -136,7 +136,7 @@ jobs:
template: ${{ matrix.template }}
base: ""
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
plugin_isocalendar: yes
plugin_isocalendar_duration: full-year
@@ -149,7 +149,7 @@ jobs:
template: ${{ matrix.template }}
base: ""
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
plugin_habits: yes
plugin_habits_from: 5
plugin_habits_charts: yes
@@ -163,7 +163,7 @@ jobs:
template: ${{ matrix.template }}
base: ""
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
plugin_languages: yes
- name: ${{ matrix.template }} > Plugin > Follow-up
@@ -175,7 +175,7 @@ jobs:
template: ${{ matrix.template }}
base: ""
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
plugin_followup: yes
- name: ${{ matrix.template }} > Plugin > Lines and Traffic
@@ -187,7 +187,7 @@ jobs:
template: ${{ matrix.template }}
base: ""
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
plugin_lines: yes
plugin_traffic: yes
@@ -200,7 +200,7 @@ jobs:
template: ${{ matrix.template }}
base: ""
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
plugin_gists: yes
- name: ${{ matrix.template }} > Plugin > Topics (starred)
@@ -212,7 +212,7 @@ jobs:
template: ${{ matrix.template }}
base: ""
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
plugin_topics: yes
plugin_topics_mode: starred
plugin_topics_sort: random
@@ -226,7 +226,7 @@ jobs:
template: ${{ matrix.template }}
base: ""
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
plugin_topics: yes
plugin_topics_mode: mastered
plugin_topics_sort: stars
@@ -240,7 +240,7 @@ jobs:
template: ${{ matrix.template }}
base: ""
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
plugin_projects: yes
plugin_projects_repositories: lowlighter/metrics/projects/1
plugin_projects_limit: 2
@@ -254,7 +254,7 @@ jobs:
template: ${{ matrix.template }}
base: ""
plugins_errors_fatal: yes
q: {"repo":"metrics"}
q: '{"repo":"metrics"}'
plugin_tweets: yes
plugin_tweets_limit: 2
plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }}

View File

@@ -278,7 +278,7 @@ inputs:
# If more topics must be displayed, they will be grouped in an ellipsis
plugin_topics_limit:
description: Number of starred topics to display
default: 0
default: ""
# Projects plugin
# Display active projects

File diff suppressed because one or more lines are too long

View File

@@ -6,12 +6,14 @@
if ((!enabled)||(!q.topics))
return null
//Parameters override
let {"topics.sort":sort = "stars", "topics.mode":mode = "starred", "topics.limit":limit = (mode === "mastered" ? 0 : 15)} = q
let {"topics.sort":sort = "stars", "topics.mode":mode = "starred", "topics.limit":limit} = q
//Shuffle
const shuffle = (sort === "random")
//Sort method
sort = {starred:"created", activity:"updated", stars:"stars", random:"created"}[sort] ?? "starred"
//Limit
if (!Number.isFinite(limit))
limit = (mode === "mastered" ? 0 : 15)
limit = Math.max(0, Math.min(20, Number(limit)))
//Mode
mode = ["starred", "mastered"].includes(mode) ? mode : "starred"

View File

@@ -75,7 +75,7 @@
template:"${{ matrix.template }}",
base:"",
plugins_errors_fatal:true,
q:'{"repo":"metrics"}',
q:`'{"repo":"metrics"}'`,
...context
}).map(([key, value]) => `${" ".repeat(5)}${key}: ${
typeof value === "boolean" ? (value ? "yes" : "no") :