Skip to content

Latest commit

 

History

History
143 lines (138 loc) · 4.44 KB

README.md

File metadata and controls

143 lines (138 loc) · 4.44 KB
← Back to plugins index

♐ Random code snippet

This plugin displays a random code snippet from recent activity history.

⚠️ Disclaimer

This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with GitHub. All product and company names are trademarks™ or registered® trademarks of their respective holders.

ℹ Additional notes

⚠️ 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.

Supported features
→ Full specification
📗 Classic template
👤 Users 👥 Organizations
🔑 (scopeless) read:org (optional) read:user (optional) read:packages (optional) repo (optional)

➡️ Available options

OptionDescription

plugin_code

Enable code plugin

type: boolean
default: no

plugin_code_lines

Display limit (lines per code snippets)

type: number (1 ≤ 𝑥 ≤ 128)
default: 12

plugin_code_load

Events to load

type: number (100 ≤ 𝑥 ≤ 1000)
default: 400

plugin_code_days

Events maximum age

type: number (0 ≤ 𝑥 ≤ 365)
zero behaviour: disable
default: 3

plugin_code_visibility

Events visibility

Can be used to toggle private activity visibility when using a token with repo scope

type: string
default: public
allowed values:
  • public
  • all

plugin_code_skipped

Skipped repositories

⏩ Inherits repositories_skipped
type: array (newline-separated)

plugin_code_languages

Showcased languages

type: array (comma-separated)

ℹ️ Examples workflows

name: JavaScript or TypeScript snippet of the day
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.code.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  plugin_code: yes
  plugin_code_languages: javascript, typescript
  plugin_code_load: 400