Skip to content

Latest commit

 

History

History
204 lines (192 loc) · 6.32 KB

README.md

File metadata and controls

204 lines (192 loc) · 6.32 KB
← Back to plugins index

💡 Coding habits and activity

This plugin displays coding habits based on recent activity, such as active hours and languages recently used.

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

Supported features
→ Full specification
📗 Classic template
👤 Users 👥 Organizations
🔑 (scopeless) read:org (optional) read:user (optional) read:packages (optional) repo (optional)
Recent activity charts
Midly interesting facts

➡️ Available options

OptionDescription

plugin_habits

Enable habits plugin

type: boolean
default: no

plugin_habits_from

Events to use

A higher number will increase stats accuracy

type: number (1 ≤ 𝑥 ≤ 1000)
default: 200

plugin_habits_days

Event maximum age

type: number (1 ≤ 𝑥 ≤ 30)
default: 14

plugin_habits_facts

Midly interesting facts

It includes indentation type, average number of characters per line of code, and most active time and day

type: boolean
default: yes

plugin_habits_charts

Charts

It includes commit activity per hour of day and commit activity per day of week Recent language activity may also displayed (it requires extras features to be enabled for web instances) for historical reasons

🌐 Web instances must configure settings.json:
  • metrics.api.github.overuse
  • metrics.run.tempdir
  • metrics.run.git
type: boolean
default: no

plugin_habits_charts_type

Charts display type

  • classic: <div> based charts, simple and lightweight
  • chartist: <svg> based charts, smooth
🌐 Web instances must configure settings.json:
  • metrics.npm.optional.chartist
type: string
default: classic
allowed values:
  • classic
  • chartist

plugin_habits_trim

Trim unused hours on charts

type: boolean
default: no

plugin_habits_languages_limit

Display limit (languages)

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

plugin_habits_languages_threshold

Display threshold (percentage)

✨ On master/main
type: string
default: 0%

🌐 Configure used timezone

By default, dates use Greenwich meridian (GMT/UTC).

Configure config_timezone (see supported timezone) to avoid time offsets.

Example: configuring timezone

- uses: lowlighter/metrics@latest
  with:
    config_timezone: Europe/Paris

ℹ️ Examples workflows

name: Midly interesting facts
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.habits.facts.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  plugin_habits: yes
  plugin_habits_facts: yes
  plugin_habits_charts: no
  config_timezone: Europe/Paris
name: Recent activity charts
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.habits.charts.svg
  token: ${{ secrets.METRICS_TOKEN }}
  base: ""
  plugin_habits: yes
  plugin_habits_facts: no
  plugin_habits_charts: yes
  config_timezone: Europe/Paris