docs(plugins/licenses, plugins/stars): update to new doc format [skip ci]

This commit is contained in:
lowlighter
2022-01-15 18:30:44 -05:00
parent 9f5b5a6785
commit 0336d19c28
8 changed files with 109 additions and 74 deletions

View File

@@ -47,30 +47,30 @@ Generate metrics that can be embedded everywhere, including your GitHub profile
<th><a href="source/plugins/stars/README.md">🌟 Recently starred repositories</a></th>
</tr>
<tr>
<td align="center">
<details open><summary>With icons</summary><img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.topics.icons.svg" alt=""></img></details>
<details open><summary>With labels</summary><img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.topics.svg" alt=""></img></details>
<img width="900" height="1" alt="">
</td>
<td align="center">
<img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.stars.svg">
<details open><summary>With icons</summary>
<img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.topics.icons.svg">
</details>
<details open><summary>With labels</summary>
<img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.topics.svg">
</details>
<img width="900" height="1" alt="">
</td>
<td align="center">
<img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.stars.svg" alt=""></img>
<img width="900" height="1" alt="">
</td>
</tr>
<tr>
<th><a href="source/plugins/licenses/README.md">📜 Repository licenses</a></th>
<th><a href="source/plugins/habits/README.md">💡 Coding habits</a></th>
</tr>
<tr>
<td align="center">
<details open><summary>Permissions, limitations and conditions</summary>
<img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.licenses.svg">
</details>
<details open><summary>Licenses overview</summary>
<img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.licenses.ratio.svg">
</details>
<img width="900" height="1" alt="">
</td>
<td align="center">
<details open><summary>Permissions, limitations and conditions</summary><img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.licenses.svg" alt=""></img></details>
<details open><summary>Licenses overview</summary><img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.licenses.ratio.svg" alt=""></img></details>
<img width="900" height="1" alt="">
</td>
<td align="center">
<details open><summary>Recent activity charts</summary>
<img alt="" width="400" src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.habits.charts.svg">

6
settings.example.json generated
View File

@@ -39,13 +39,13 @@
"enabled": false, "//": "Enable languages plugin"
},
"topics":{
"enabled": false, "//": "Enable topics plugin"
"enabled": false, "//": "Display starred topics"
},
"stars":{
"enabled": false, "//": "Display recently starred repositories"
"enabled": false, "//": "Enable stars plugin"
},
"licenses":{
"enabled": false, "//": "Display licenses informations"
"enabled": false, "//": "Enable licenses plugin"
},
"habits":{
"enabled": false, "//": "Display coding habits metrics"

View File

@@ -43,6 +43,10 @@
<tr>
<td nowrap="nowrap"><code>plugin_isocalendar_duration</code></td>
<td rowspan="2"><p>Time window</p>
<ul>
<li><code>half-year</code>: 180 days</li>
<li><code>full-year</code>: 1 year</li>
</ul>
<img width="900" height="1" alt=""></td>
</tr>
<tr>

View File

@@ -17,7 +17,10 @@ inputs:
default: no
plugin_isocalendar_duration:
description: Time window
description: |
Time window
- `half-year`: 180 days
- `full-year`: 1 year
type: string
default: half-year
values:

View File

@@ -1,30 +1,50 @@
### 📜 Repository licenses
<!--header-->
<table>
<tr><th colspan="2"><h3>📜 Repository licenses</h3></th></tr>
<tr><td colspan="2" align="center"><p>This plugin display repository license informations like permissions, limitations and conditions along with additional stats about dependencies.</p>
</td></tr>
<tr>
<th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th>
<td><a href="/source/templates/repository"><code>📘 Repository template</code></a></td>
</tr>
<tr>
<td><code>📓 Repositories</code></td>
</tr>
<tr>
<td><code>🔑 (scopeless)</code> <code>read:org (optional)</code> <code>read:user (optional)</code> <code>repo (optional)</code></td>
</tr>
<tr>
<td colspan="2" align="center">
<details open><summary>Permissions, limitations and conditions</summary><img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.licenses.svg" alt=""></img></details>
<details open><summary>Licenses overview</summary><img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.licenses.ratio.svg" alt=""></img></details>
<img width="900" height="1" alt="">
</td>
</tr>
</table>
<!--/header-->
## 🔎 Licenses analysis
Use to `plugin_licenses_setup` command to setup project dependencies.
*Example: setup a NodeJS project using `npm ci`*
```yml
- name: Licenses and permissions
with:
repo: metrics
plugin_licenses: yes
plugin_licenses_setup: npm ci
```
Dependencies will be analyzed by [GitHub licensed](https://github.com/github/licensed) and compared against GitHub known licenses.
> ⚠️ This is **NOT** legal advice, use at your own risk
> 🔣 On web instances, this plugin is an extra feature and must be enabled globally in `settings.json`
> 💣 Note that this plugin allows raw commands injection and is **NOT** advised to be enabled on them
> 💣 This plugin **SHOULD NOT** be enabled on web instances, since it allows raw command injection.
> This could result in compromised server!
The *licenses* plugin lets you display license informations like permissions, limitations and conditions along with additional metrics about dependencies.
<table>
<td align="center">
<details open><summary>Permissions, limitations and conditions</summary>
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.licenses.svg">
</details>
<details open><summary>Licenses overview</summary>
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.licenses.ratio.svg">
</details>
<img width="900" height="1" alt="">
</td>
</table>
Project must be setup with dependencies using `plugin_licenses_setup` option (for example, `npm ci` for a NodeJS project).
Dependencies will be analyzed with [github/licensed](https://github.com/github/licensed) and compared against GitHub known licenses.
#### ➡️ Available options
## ➡️ Available options
<!--options-->
<table>
@@ -33,7 +53,7 @@ Dependencies will be analyzed with [github/licensed](https://github.com/github/l
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_licenses</code></td>
<td rowspan="2"><p>Display licenses informations</p>
<td rowspan="2"><p>Enable licenses plugin</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -44,7 +64,7 @@ Dependencies will be analyzed with [github/licensed](https://github.com/github/l
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_licenses_setup</code></td>
<td rowspan="2"><p>Command to setup target repository</p>
<td rowspan="2"><p>Setup command</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -63,7 +83,7 @@ Dependencies will be analyzed with [github/licensed](https://github.com/github/l
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_licenses_legal</code></td>
<td rowspan="2"><p>Display legal informations about used licenses</p>
<td rowspan="2"><p>Display permissions, limitations and conditions about used licenses</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -74,9 +94,7 @@ Dependencies will be analyzed with [github/licensed](https://github.com/github/l
</table>
<!--/options-->
*[→ Full specification](metadata.yml)*
#### Examples workflows
## Examples workflows
<!--examples-->
```yaml

View File

@@ -1,5 +1,9 @@
name: "📜 Repository licenses"
category: github
description: This plugin display repository license informations like permissions, limitations and conditions along with additional stats about dependencies.
examples:
+permissions, limitations and conditions: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.licenses.svg
+licenses overview: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.licenses.ratio.svg
index: 4
supports:
- repository
@@ -7,30 +11,24 @@ scopes:
- public_access
inputs:
# Enable or disable plugin
plugin_licenses:
description: Display licenses informations
description: Enable licenses plugin
type: boolean
default: no
extras: yes
# Command to use to setup target repository
# It is required to install all dependencies that will be analyzed with github/licensed
plugin_licenses_setup:
description: Command to setup target repository
description: Setup command
type: string
default: ""
example: npm ci
# Display used licenses from both repository license and dependencies licenses ratio
plugin_licenses_ratio:
description: Display used licenses ratio
type: boolean
default: no
# Display permissions, limitations and conditions from both repository license and dependencies licenses
# Note that this is NOT legal advice, use at your own risk
plugin_licenses_legal:
description: Display legal informations about used licenses
description: Display permissions, limitations and conditions about used licenses
type: boolean
default: yes

View File

@@ -1,15 +1,28 @@
### 🌟 Recently starred repositories
The *stars* plugin displays your recently starred repositories.
<!--header-->
<table>
<td align="center">
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.stars.svg">
<img width="900" height="1" alt="">
</td>
<tr><th colspan="2"><h3>🌟 Recently starred repositories</h3></th></tr>
<tr><td colspan="2" align="center"><p>This plugin displays your recently starred repositories.</p>
</td></tr>
<tr>
<th rowspan="3">Supported features<br><sub><a href="metadata.yml">→ Full specification</a></sub></th>
<td><a href="/source/templates/classic"><code>📗 Classic template</code></a></td>
</tr>
<tr>
<td><code>👤 Users</code></td>
</tr>
<tr>
<td><code>🔑 (scopeless)</code> <code>read:org (optional)</code> <code>read:user (optional)</code> <code>repo (optional)</code></td>
</tr>
<tr>
<td colspan="2" align="center">
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.stars.svg" alt=""></img>
<img width="900" height="1" alt="">
</td>
</tr>
</table>
<!--/header-->
#### ➡️ Available options
## ➡️ Available options
<!--options-->
<table>
@@ -18,7 +31,7 @@ The *stars* plugin displays your recently starred repositories.
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_stars</code></td>
<td rowspan="2"><p>Display recently starred repositories</p>
<td rowspan="2"><p>Enable stars plugin</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -28,7 +41,7 @@ The *stars* plugin displays your recently starred repositories.
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_stars_limit</code></td>
<td rowspan="2"><p>Maximum number of stars to display</p>
<td rowspan="2"><p>Display limit</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -42,9 +55,7 @@ The *stars* plugin displays your recently starred repositories.
</table>
<!--/options-->
*[→ Full specification](metadata.yml)*
#### Examples workflows
## Examples workflows
<!--examples-->
```yaml
@@ -58,4 +69,4 @@ with:
plugin_stars_limit: 3
```
<!--/examples-->
<!--/examples-->

View File

@@ -1,5 +1,8 @@
name: "🌟 Recently starred repositories"
category: github
description: This plugin displays your recently starred repositories.
examples:
default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.stars.svg
index: 3
supports:
- user
@@ -7,15 +10,13 @@ scopes:
- public_access
inputs:
# Enable or disable plugin
plugin_stars:
description: Display recently starred repositories
description: Enable stars plugin
type: boolean
default: no
# Number of stars to display
plugin_stars_limit:
description: Maximum number of stars to display
description: Display limit
type: number
default: 4
min: 1