← 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.

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](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)) to avoid time offsets. *Example: configuring timezone* ```yaml - uses: lowlighter/metrics@latest with: config_timezone: Europe/Paris ``` ## â„šī¸ Examples workflows ```yaml 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 ``` ```yaml 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 ```