💡 Coding habits

This plugin display coding habits based on your 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
TypeDescription

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

Toggle midly interesting facts display

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

Toggle charts display

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
type: boolean
default: no

plugin_habits_charts_type

Charts display type

  • classic: <div> based charts, simple and lightweight
  • chartist: <svg> based charts, smooth
type: string
default: classic
allowed values:
  • classic
  • chartist

plugin_habits_trim

Trim unused hours on charts

type: boolean
default: no
## 🌐 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 ```