diff --git a/README.md b/README.md
index c917a02f..e93a6298 100644
--- a/README.md
+++ b/README.md
@@ -106,6 +106,9 @@ jobs:
# The provided GitHub token will require "repo" permissions
plugin_traffic: no
+ # Enable or disable coding habits metrics
+ plugin_habits: no
+
# Enable debug logs
debug: no
@@ -273,6 +276,17 @@ Open and edit `settings.json` to configure your instance.
//When enabled, pass "?traffic=1" in url to compute total page views in your repositories in last two weeks
//Note that this requires that the passed GitHub API token requires a push access
"enabled":true
+ },
+ //Habits plugin
+ "habits":{
+ //Enable or disable this plugin
+ //When enabled, pass "?habits=1" in url to generate coding habits based on your recent activity
+ //This includes stuff like if you're using tabs or space and the time of the day when you push the most
+ //Note that this requires that the passed GitHub API token requires a push access
+ "enabled":true,
+ //Specify the number of events used to compute coding habits. Capped at 100 by GitHub API
+ //Defaults to 50
+ "from":50,
}
}
}
@@ -485,6 +499,44 @@ And pass `?traffic=1` in url when generating metrics.
+#### 💡 Habits
+
+The *habits* plugin allows you to add deduced coding about based on your recent activity.
+
+
+
+
+💬 About
+
+It will consume an additional GitHub request per event fetched.
+
+##### Setup with GitHub actions
+
+Add the following to your workflow :
+
+```yaml
+- uses: lowlighter/metrics@latest
+ with:
+ # ... other options
+ plugin_habits: yes
+```
+
+##### Setup in your own instance
+
+Add the following to your `settings.json`
+
+```json
+ "plugins":{
+ "habits":{
+ "enabled":true
+ }
+ }
+```
+
+And pass `?habits=1` in url when generating metrics.
+
+
+
### 🗂️ Project structure
* `index.mjs` contains the entry points and the settings instance
diff --git a/action.yml b/action.yml
index 5d66cd6d..45be0c17 100644
--- a/action.yml
+++ b/action.yml
@@ -24,6 +24,8 @@ inputs:
description: Enable repositories lines metrics
plugin_traffic:
description: Enable repositories traffic metrics (due to GitHub API limitations, "token" must have "repo" permissions)
+ plugin_habits:
+ description: Enable coding habits metrics
debug:
description: Enable debug logs
runs:
diff --git a/action/dist/index.js b/action/dist/index.js
index bc36a77b..b3a0c960 100644
--- a/action/dist/index.js
+++ b/action/dist/index.js
@@ -1,4 +1,4 @@
-module.exports=(()=>{var __webpack_modules__={76677:(e,t,r)=>{"use strict";r.r(t);var n=r(85622);var i=r.n(n);var a=r(60270);var o=r(3584);var s=r(32882);var l=r.n(s);var c=r(29483);var u=r.n(c);(async function(){const[e,t,r,n]=[s,c,o,a].map(e=>e&&e.default?e.default:e);try{console.log(`GitHub metrics as SVG image`);console.log(`========================================================`);console.log(`Version | 1.6.0`);process.on("unhandledRejection",e=>{throw e});const a=`