Add repository name and update README.md
This commit is contained in:
38
README.md
38
README.md
@@ -132,7 +132,12 @@ But there's more with [plugins](https://github.com/lowlighter/metrics/tree/maste
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://github.com/lowlighter/metrics#-habits">
|
<a href="https://github.com/lowlighter/metrics#-habits">
|
||||||
<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.habits.svg" alt="" width="400">
|
<img src="https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.habits.facts.svg" alt="" width="400">
|
||||||
|
<details open><summary>With charts version</summary>
|
||||||
|
<a href="https://github.com/lowlighter/metrics#-habits">
|
||||||
|
<img src=" https://github.com/lowlighter/lowlighter/blob/master/metrics.plugin.habits.charts.svg" alt="" width="400">
|
||||||
|
</a>
|
||||||
|
</details>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -664,6 +669,16 @@ Add the following to your workflow :
|
|||||||
plugin_pagespeed_screenshot: yes
|
plugin_pagespeed_screenshot: yes
|
||||||
```
|
```
|
||||||
|
|
||||||
|
It is possible to audit a different website from the one linked to your GitHub account by using `plugin_pagespeed_url` option.
|
||||||
|
|
||||||
|
Add the following to your workflow :
|
||||||
|
```yaml
|
||||||
|
- uses: lowlighter/metrics@latest
|
||||||
|
with:
|
||||||
|
# ... other options
|
||||||
|
plugin_pagespeed_url: https://********
|
||||||
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### 📅 Isometric calendar
|
### 📅 Isometric calendar
|
||||||
@@ -949,6 +964,7 @@ Add the following to your workflow instead :
|
|||||||
# ... other options
|
# ... other options
|
||||||
plugin_topics: yes
|
plugin_topics: yes
|
||||||
plugin_topics_mode: mastered
|
plugin_topics_mode: mastered
|
||||||
|
plugin_topics_limit: 0
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
@@ -1080,6 +1096,16 @@ Add the following to your workflow :
|
|||||||
plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }}
|
plugin_tweets_token: ${{ secrets.TWITTER_TOKEN }}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
It is possible to use a different twitter username from the one linked to your GitHub account by using `plugin_tweets_user` option.
|
||||||
|
|
||||||
|
Add the following to your workflow :
|
||||||
|
```yaml
|
||||||
|
- uses: lowlighter/metrics@latest
|
||||||
|
with:
|
||||||
|
# ... other options
|
||||||
|
plugin_tweets_user: ********
|
||||||
|
```
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>💬 Obtaining a twitter token</summary>
|
<summary>💬 Obtaining a twitter token</summary>
|
||||||
|
|
||||||
@@ -1115,6 +1141,16 @@ Add the following to your workflow :
|
|||||||
plugin_posts_source: ********
|
plugin_posts_source: ********
|
||||||
```
|
```
|
||||||
|
|
||||||
|
It is possible to use a different username from your GitHub account by using `plugin_posts_user` option.
|
||||||
|
|
||||||
|
Add the following to your workflow :
|
||||||
|
```yaml
|
||||||
|
- uses: lowlighter/metrics@latest
|
||||||
|
with:
|
||||||
|
# ... other options
|
||||||
|
plugin_posts_user: ********
|
||||||
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### 💡 Habits
|
### 💡 Habits
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ inputs:
|
|||||||
# This can used to add padding if generated image is cropped or on the contrary, remove empty space
|
# This can used to add padding if generated image is cropped or on the contrary, remove empty space
|
||||||
config_padding:
|
config_padding:
|
||||||
description: Configure bottom padding
|
description: Configure bottom padding
|
||||||
default: 5%
|
default: 6%
|
||||||
|
|
||||||
# Number of repositories to use for metrics
|
# Number of repositories to use for metrics
|
||||||
# A high number increase metrics accuracy, but will consume additional API requests when using plugins
|
# A high number increase metrics accuracy, but will consume additional API requests when using plugins
|
||||||
|
|||||||
@@ -180,7 +180,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Render svg */
|
/** Render svg */
|
||||||
async function svgresize(svg, {padding = "5%", convert} = {}) {
|
async function svgresize(svg, {padding = "6%", convert} = {}) {
|
||||||
//Instantiate browser if needed
|
//Instantiate browser if needed
|
||||||
if (!svgresize.browser) {
|
if (!svgresize.browser) {
|
||||||
svgresize.browser = await puppeteer.launch({headless:true, executablePath:process.env.PUPPETEER_BROWSER_PATH, args:["--no-sandbox", "--disable-extensions", "--disable-setuid-sandbox", "--disable-dev-shm-usage"]})
|
svgresize.browser = await puppeteer.launch({headless:true, executablePath:process.env.PUPPETEER_BROWSER_PATH, args:["--no-sandbox", "--disable-extensions", "--disable-setuid-sandbox", "--disable-dev-shm-usage"]})
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
//Plugin execution
|
//Plugin execution
|
||||||
try {
|
try {
|
||||||
//Check if plugin is enabled and requirements are met
|
//Check if plugin is enabled and requirements are met
|
||||||
if ((!enabled)||(!q.pagespeed)||(!data.user.websiteUrl))
|
if ((!enabled)||(!q.pagespeed)||((!data.user.websiteUrl)&&(!q["pagespeed.url"])))
|
||||||
return null
|
return null
|
||||||
//Parameters override
|
//Parameters override
|
||||||
let {"pagespeed.detailed":detailed = false, "pagespeed.screenshot":screenshot = false, "pagespeed.url":url = data.user.websiteUrl} = q
|
let {"pagespeed.detailed":detailed = false, "pagespeed.screenshot":screenshot = false, "pagespeed.url":url = data.user.websiteUrl} = q
|
||||||
|
|||||||
@@ -22,6 +22,10 @@
|
|||||||
|
|
||||||
<% if (base.header) { %>
|
<% if (base.header) { %>
|
||||||
<section>
|
<section>
|
||||||
|
<h1 class="field">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill="#0366d6" fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path></svg>
|
||||||
|
<span><%= user.name %></span>
|
||||||
|
</h1>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<section>
|
<section>
|
||||||
<div class="field <%= computed.cakeday ? 'cakeday' : '' %>">
|
<div class="field <%= computed.cakeday ? 'cakeday' : '' %>">
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
@@ -56,6 +56,9 @@
|
|||||||
await common(...arguments)
|
await common(...arguments)
|
||||||
await Promise.all(pending)
|
await Promise.all(pending)
|
||||||
|
|
||||||
|
//Set repository name
|
||||||
|
data.user.name = `${data.user.login}/${repo}`
|
||||||
|
|
||||||
//Reformat projects names
|
//Reformat projects names
|
||||||
if (data.plugins.projects)
|
if (data.plugins.projects)
|
||||||
data.plugins.projects.list?.map(project => project.name = project.name.replace(`(${login}/${repo})`, "").trim())
|
data.plugins.projects.list?.map(project => project.name = project.name.replace(`(${login}/${repo})`, "").trim())
|
||||||
|
|||||||
Reference in New Issue
Block a user