From 618d9821dae113a1a010daae3d53cd3547bb588a Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Sun, 16 Jan 2022 08:49:39 -0500 Subject: [PATCH] doc(plugins/habits): update --- source/plugins/habits/README.md | 81 ++++++++++++++++++------------ source/plugins/habits/metadata.yml | 41 ++++++++------- 2 files changed, 71 insertions(+), 51 deletions(-) diff --git a/source/plugins/habits/README.md b/source/plugins/habits/README.md index 7621b286..997c94c4 100644 --- a/source/plugins/habits/README.md +++ b/source/plugins/habits/README.md @@ -1,31 +1,29 @@ -### 💡 Coding habits - -The coding *habits* plugin display metrics based on your recent activity, such as active hours or languages recently used. - + - + + + + + + + + + + + + + + +
-
Recent activity charts - -
-
Midly interesting facts - -
- -

💡 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) repo (optional)
+
Recent activity charts
+
Midly interesting facts
+ +
+ -Using more events will improve accuracy of these metrics, although it'll increase the number of GitHub requests used. - -Active hours and days are computed through your commit history, while indent style is deduced from your recent diffs. -Recent languages activity is also computed from your recent diffs, using [github/linguist](https://github.com/github/linguist). - -Use a full `repo` scope token to access **private** events. - -By default, dates use Greenwich meridian (GMT/UTC). Be sure to set your timezone (see [here](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) for a list of supported timezones) for accurate metrics. - -> đŸ”Ŗ On web instances, *recent languages activity* is an extra feature and must be enabled globally in `settings.json` - -#### âžĄī¸ Available options +## âžĄī¸ Available options @@ -34,7 +32,7 @@ By default, dates use Greenwich meridian (GMT/UTC). Be sure to set your timezone - @@ -44,7 +42,8 @@ By default, dates use Greenwich meridian (GMT/UTC). Be sure to set your timezone - @@ -57,7 +56,7 @@ By default, dates use Greenwich meridian (GMT/UTC). Be sure to set your timezone - @@ -70,7 +69,8 @@ By default, dates use Greenwich meridian (GMT/UTC). Be sure to set your timezone - @@ -80,7 +80,9 @@ By default, dates use Greenwich meridian (GMT/UTC). Be sure to set your timezone - @@ -91,7 +93,7 @@ By default, dates use Greenwich meridian (GMT/UTC). Be sure to set your timezone - @@ -102,9 +104,20 @@ By default, dates use Greenwich meridian (GMT/UTC). Be sure to set your timezone
plugin_habits

Display coding habits metrics

+

Enable habits plugin

plugin_habits_from

Number of events to use

+

Events to use

+

A higher number will increase stats accuracy

plugin_habits_days

Maximum event age

+

Event maximum age

plugin_habits_facts

Display coding habits collected facts based on recent activity

+

Toggle midly interesting facts display

+

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

plugin_habits_charts

Display coding habits charts based on recent activity

+

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

plugin_habits_trim

Trim unused hours on daily chart

+

Trim unused hours on charts

-*[→ Full specification](metadata.yml)* +## 🌐 Configure used timezone -#### â„šī¸ Examples workflows +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 @@ -134,3 +147,5 @@ with: ``` + + diff --git a/source/plugins/habits/metadata.yml b/source/plugins/habits/metadata.yml index 8c09c6ae..e3d9de74 100644 --- a/source/plugins/habits/metadata.yml +++ b/source/plugins/habits/metadata.yml @@ -1,5 +1,9 @@ name: "💡 Coding habits" category: github +description: This plugin display coding habits based on your recent activity, such as active hours and languages recently used. +examples: + +recent activity charts: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.habits.charts.svg + +midly interesting facts: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.habits.facts.svg index: 5 supports: - user @@ -8,46 +12,47 @@ scopes: - public_access inputs: - # Enable or disable plugin plugin_habits: - description: Display coding habits metrics + description: Enable habits plugin type: boolean default: no - # Number of events to use to computes habits - # Using more will result in more accurate metrics, but you may hit GitHub rate-limit more easily plugin_habits_from: - description: Number of events to use + description: | + Events to use + + A higher number will increase stats accuracy type: number default: 200 min: 1 max: 1000 - # Filter used events to compute habits by age plugin_habits_days: - description: Maximum event age + description: Event maximum age type: number default: 14 min: 1 max: 30 - # Display tidbits about your most active hours/days, indents used (spaces/tabs), etc. - # This is deduced from your recent activity plugin_habits_facts: - description: Display coding habits collected facts based on recent activity + description: | + 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 - # Display charts of most active time of the day and most active day of the week - # Also display languages recently used (this is not the same as plugin_languages, as the latter is an all-time stats) plugin_habits_charts: - description: Display coding habits charts based on recent activity - type: boolean - default: no extras: yes + description: | + Toggle charts display - # Trim unused hours on daily chart - plugin_habits_trim: - description: Trim unused hours on daily chart + 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 + type: boolean + default: no + + plugin_habits_trim: + description: Trim unused hours on charts type: boolean default: no