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

@@ -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