doc(plugins/people): update

This commit is contained in:
lowlighter
2022-01-16 08:49:52 -05:00
parent 618d9821da
commit a8a8313bf7
2 changed files with 119 additions and 89 deletions

View File

@@ -1,39 +1,29 @@
### 🧑‍🤝‍🧑 People plugin
The *people* plugin can display people you're following or sponsoring, and also users who're following or sponsoring you.
In repository mode, it's possible to display sponsors, stargazers, watchers.
<!--header-->
<table>
<td align="center">
<details open><summary>Related to an user</summary>
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.people.followers.svg">
</details>
<details><summary>Related to a repository</summary>
<img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.people.repository.svg">
</details>
<img width="900" height="1" alt="">
</td>
<tr><th colspan="2"><h3>🧑‍🤝‍🧑 People plugin</h3></th></tr>
<tr><td colspan="2" align="center"><p>This plugin can display relationships with users, such as followers, sponsors, contributors, stargazers, watchers, members, etc.</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> <a href="/source/templates/repository"><code>📘 Repository template</code></a></td>
</tr>
<tr>
<td><code>👤 Users</code> <code>👥 Organizations</code> <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>Related to an user</summary><img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.people.followers.svg" alt=""></img></details>
<details><summary>Related to a repository</summary><img src="https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.people.repository.svg" alt=""></img></details>
<img width="900" height="1" alt="">
</td>
</tr>
</table>
<!--/header-->
The following types are supported:
| Type | Alias | User metrics | Repository metrics |
| --------------- | ------------------------------------ | :----------------: | :----------------: |
| `followers` | | ✔️ | ❌ |
| `following` | `followed` | ✔️ | ❌ |
| `sponsoring` | `sponsored`, `sponsorshipsAsSponsor` | ✔️ | ❌ |
| `sponsors` | `sponsorshipsAsMaintainer` | ✔️ | ✔️ |
| `contributors` | | ❌ | ✔️ |
| `stargazers` | | ❌ | ✔️ |
| `watchers` | | ❌ | ✔️ |
| `thanks` | | ✔️ | ✔️ |
| `members` | | ✔️ (organization) | ❌ |
Sections will be ordered the same as specified in `plugin_people_types`.
`sponsors` for repositories will output the same as the owner's sponsors.
#### ➡️ Available options
## ➡️ Available options
<!--options-->
<table>
@@ -42,7 +32,7 @@ Sections will be ordered the same as specified in `plugin_people_types`.
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_people</code></td>
<td rowspan="2"><p>Display GitHub users from various affiliations</p>
<td rowspan="2"><p>Enable people plugin</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -52,7 +42,7 @@ Sections will be ordered the same as specified in `plugin_people_types`.
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_people_limit</code></td>
<td rowspan="2"><p>Maximum number of user to display</p>
<td rowspan="2"><p>Display limit</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -60,11 +50,23 @@ Sections will be ordered the same as specified in `plugin_people_types`.
<i>(0 ≤
𝑥)</i>
<br>
<b>zero behaviour:</b> disable</br>
<b>default:</b> 24<br></td>
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_people_identicons</code></td>
<td rowspan="2"><p>Toggle identicons display</p>
<p>This can be used to mask user profile pictures for privacy</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
<td nowrap="nowrap"><b>type:</b> <code>boolean</code>
<br>
<b>default:</b> no<br></td>
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_people_size</code></td>
<td rowspan="2"><p>Size of displayed GitHub users&#39; avatars</p>
<td rowspan="2"><p>Profile picture display size</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -77,7 +79,22 @@ Sections will be ordered the same as specified in `plugin_people_types`.
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_people_types</code></td>
<td rowspan="2"><p>Affiliations to display</p>
<td rowspan="2"><p>Displayed sections (order is respected)</p>
<p>User and organization accounts support the following values:</p>
<ul>
<li><code>followers</code></li>
<li><code>following</code>/<code>followed</code></li>
<li><code>sponsoring</code>/<code>sponsored</code></li>
<li><code>sponsors</code></li>
<li><code>members</code> (organization only)</li>
<li><code>thanks</code>(to be configured with <code>plugin_people_thanks</code>)
Repositories support the following values:</li>
<li><code>sponsors</code> (same as owner sponsors)</li>
<li><code>contributors</code></li>
<li><code>stargazers</code></li>
<li><code>watchers</code></li>
<li><code>thanks</code>(to be configured with <code>plugin_people_thanks</code>)</li>
</ul>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -89,7 +106,8 @@ Sections will be ordered the same as specified in `plugin_people_types`.
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_people_thanks</code></td>
<td rowspan="2"><p>GitHub users to personally thanks</p>
<td rowspan="2"><p>Special thanks</p>
<p>This list can be used to thank specific users</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -99,27 +117,20 @@ Sections will be ordered the same as specified in `plugin_people_types`.
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_people_sponsors_custom</code></td>
<td rowspan="2"><p>Custom GitHub sponsors</p>
<td rowspan="2"><p>Custom sponsors</p>
<p>This list can be used to add users from unsupported GitHub sponsors sources.
The option <code>plugin_people_types</code> must contain the <code>sponsors</code> section in order for this setting to be effective</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
<td nowrap="nowrap"><b>type:</b> <code>array</code>
<i>(comma-separated)</i>
<br></td>
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_people_identicons</code></td>
<td rowspan="2"><p>Use identicons instead of avatars</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
<td nowrap="nowrap"><b>type:</b> <code>boolean</code>
<br>
<b>default:</b> no<br></td>
</tr>
<tr>
<td nowrap="nowrap"><code>plugin_people_shuffle</code></td>
<td rowspan="2"><p>Shuffle users</p>
<td rowspan="2"><p>Shuffle data for varied output</p>
<p>This will fetch 10 times more data than <code>plugin_people_limit</code> to ensure output is always different</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
@@ -130,9 +141,7 @@ Sections will be ordered the same as specified in `plugin_people_types`.
</table>
<!--/options-->
*[→ Full specification](metadata.yml)*
#### Examples workflows
## Examples workflows
<!--examples-->
```yaml
@@ -162,4 +171,4 @@ with:
marcreichel
```
<!--/examples-->
<!--/examples-->

View File

@@ -1,5 +1,9 @@
name: "🧑‍🤝‍🧑 People plugin"
category: github
description: This plugin can display relationships with users, such as followers, sponsors, contributors, stargazers, watchers, members, etc.
examples:
+related to an user: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.people.followers.svg
related to a repository: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.people.repository.svg
index: 9
supports:
- user
@@ -9,75 +13,92 @@ scopes:
- public_access
inputs:
# Enable or disable plugin
plugin_people:
description: Display GitHub users from various affiliations
description: Enable people plugin
type: boolean
default: no
# Number of users to display per section
plugin_people_limit:
description: Maximum number of user to display
description: Display limit
type: number
default: 24
min: 0
zero: disable
plugin_people_identicons:
description: |
Toggle identicons display
This can be used to mask user profile pictures for privacy
type: boolean
default: no
# Size of displayed user's avatar
plugin_people_size:
description: Size of displayed GitHub users' avatars
description: Profile picture display size
type: number
default: 28
min: 8
max: 64
# List of section to display
# Ordering will be kept
plugin_people_types:
description: Affiliations to display
description: |
Displayed sections (order is respected)
User and organization accounts support the following values:
- `followers`
- `following`/`followed`
- `sponsoring`/`sponsored`
- `sponsors`
- `members` (organization only)
- `thanks`(to be configured with `plugin_people_thanks`)
Repositories support the following values:
- `sponsors` (same as owner sponsors)
- `contributors`
- `stargazers`
- `watchers`
- `thanks`(to be configured with `plugin_people_thanks`)
type: array
format: comma-separated
default: followers, following
example: follower, following, sponsors, sponsoring
values:
- followers # For user metrics
- following # For user metrics
- followed # For user metrics, alias for "following"
- sponsoring # For user metrics
- members # For organization metrics
- sponsored # Alias for "sponsored"
- sponsors # For both user and repository metrics
- contributors # For repository metrics
- stargazers # For repository metrics
- watchers # For repository metrics
- thanks # For both user and repository metrics, see "plugin_people_thanks" below
- followers
- following
- followed
- sponsoring
- members
- sponsored
- sponsors
- contributors
- stargazers
- watchers
- thanks
# When displaying "thanks" section, specified users list will be displayed
# This is useful to craft "Special thanks" badges
plugin_people_thanks:
description: GitHub users to personally thanks
description: |
Special thanks
This list can be used to thank specific users
type: array
format: comma-separated
default: ""
example: octocat, hubot
# Add specified users to GitHub sponsors ("sponsors" must be specified in "plugin_people_types")
# This is useful to list sponsors from unsupported GitHub sponsors sources
plugin_people_sponsors_custom:
description: Custom GitHub sponsors
description: |
Custom sponsors
This list can be used to add users from unsupported GitHub sponsors sources.
The option `plugin_people_types` must contain the `sponsors` section in order for this setting to be effective
type: array
format: comma-separated
default: ""
example: octocat, hubot
# Use GitHub identicons instead of users' avatar (for privacy purposes)
plugin_people_identicons:
description: Use identicons instead of avatars
type: boolean
default: no
# Shuffle users for varied outputs
# If "plugin_people_limit" is set, plugin will fetch up to 10 ten times limit to ensure output is different each time
plugin_people_shuffle:
description: Shuffle users
description: |
Shuffle data for varied output
This will fetch 10 times more data than `plugin_people_limit` to ensure output is always different
type: boolean
default: no