From 4a8f377685dec03cf797feadad4006d4e9ca12a1 Mon Sep 17 00:00:00 2001
From: lowlighter <22963968+lowlighter@users.noreply.github.com>
Date: Sat, 15 Jan 2022 21:19:37 -0500
Subject: [PATCH] doc(plugins/code): update
---
source/plugins/code/README.md | 60 ++++++++++++++++++++------------
source/plugins/code/metadata.yml | 32 +++++++++--------
2 files changed, 56 insertions(+), 36 deletions(-)
diff --git a/source/plugins/code/README.md b/source/plugins/code/README.md
index cfdd5303..fb0868d5 100644
--- a/source/plugins/code/README.md
+++ b/source/plugins/code/README.md
@@ -1,17 +1,33 @@
-### ♐ Code snippet of the day
-
-> ⚠️ When improperly configured, this plugin could display private code. If you work with sensitive data or company code, it is advised to keep this plugin disabled. *Metrics* and its authors cannot be held responsible for any resulting code leaks, use at your own risk.
-
-Display a random code snippet from your recent activity history.
-
+
+
-#### ➡️ Available options
+## ➡️ Available options
@@ -20,7 +36,7 @@ Display a random code snippet from your recent activity history.
plugin_code |
- Display a random code snippet from recent activity
+ | Enable code plugin
![]() |
@@ -30,7 +46,7 @@ Display a random code snippet from your recent activity history.
plugin_code_lines |
- Maximum number of line that a code snippet can contain
+ | Display limit for code snippets
![]() |
@@ -40,7 +56,7 @@ Display a random code snippet from your recent activity history.
plugin_code_load |
- Number of events to load
+ | Events to load
![]() |
@@ -53,7 +69,8 @@ Display a random code snippet from your recent activity history.
plugin_code_visibility |
- Set events visibility
+ | Events visibility
+Lets you hide private activity when using a repo scope token
![]() |
@@ -64,7 +81,7 @@ Display a random code snippet from your recent activity history.
plugin_code_skipped |
- Repositories to skip
+ | Skipped repositories
![]() |
@@ -75,20 +92,19 @@ Display a random code snippet from your recent activity history.
plugin_code_languages |
- Restrict code snippet languages
+ | Restrict display to specific languages
![]() |
- type: array
+ | 🌐 Web instances must configure settings.json
+type: array
(comma-separated)
|
-*[→ Full specification](metadata.yml)*
-
-#### ℹ️ Examples workflows
+## ℹ️ Examples workflows
```yaml
@@ -103,4 +119,4 @@ with:
plugin_code_load: 400
```
-
\ No newline at end of file
+
diff --git a/source/plugins/code/metadata.yml b/source/plugins/code/metadata.yml
index eab43eab..f1485600 100644
--- a/source/plugins/code/metadata.yml
+++ b/source/plugins/code/metadata.yml
@@ -1,5 +1,13 @@
name: "♐ Code snippet of the day"
category: github
+description: |
+ This plugin displays a random code snippet from your recent activity history.
+
+ > ⚠️ When improperly configured, this plugin could display private code.
+ > If you work with sensitive data or company code, it is advised to keep this plugin disabled.
+ > Use at your own risk, *metrics* and its authors cannot be held responsible for any resulting code leaks.
+examples:
+ default: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.code.svg
index: 12
supports:
- user
@@ -8,49 +16,45 @@ scopes:
- public_access
inputs:
- # Enable or disable plugin
plugin_code:
- description: Display a random code snippet from recent activity
+ description: Enable code plugin
type: boolean
default: no
- # Maximum number of lines that a code snippet can contain
plugin_code_lines:
- description: Maximum number of line that a code snippet can contain
+ description: Display limit for code snippets
type: number
default: 12
- # Number of activity events to load
- # A high number will consume more requests
plugin_code_load:
- description: Number of events to load
+ description: Events to load
type: number
default: 100
min: 100
max: 1000
- # Set events visibility (use this to restrict events when using a "repo" token)
plugin_code_visibility:
- description: Set events visibility
+ description: |
+ Events visibility
+
+ Lets you hide private activity when using a `repo` scope token
type: string
default: public
values:
- public
- all
- # List of repositories that will be skipped
plugin_code_skipped:
- description: Repositories to skip
+ description: Skipped repositories
type: array
format: comma-separated
default: ""
example: my-repo-1, my-repo-2, owner/repo-3, ...
inherits: repositories_skipped
- # Restrict code snippet languages
- # These are guessed through linguist
plugin_code_languages:
- description: Restrict code snippet languages
+ extras: yes
+ description: Restrict display to specific languages
type: array
format: comma-separated
default: ""