Skip to content

Latest commit

 

History

History
135 lines (130 loc) · 3.93 KB

README.md

File metadata and controls

135 lines (130 loc) · 3.93 KB

♐ Code snippet of the day

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.

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

➡️ Available options

TypeDescription

plugin_code

Enable code plugin

type: boolean
default: no

plugin_code_lines

Display limit for code snippets

type: number
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

Lets you hide private activity when using a repo scope token

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

plugin_code_skipped

Skipped repositories

⏩ Inherits repositories_skipped
type: array (comma-separated)

plugin_code_languages

Restrict display to specific 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