diff --git a/README.md b/README.md index fce3e606..a5221212 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,9 @@ A GitHub Action which is run periodically at your convenience which generates an Assuming your username is `my-github-user`, you can embed your metrics in your personal repository's readme like below : ```markdown ![GitHub metrics](https://github.com/my-github-user/my-github-user/blob/master/github-metrics.svg) -# Or with a redirection : -[![GitHub metrics](https://github.com/my-github-user/my-github-user/blob/master/github-metrics.svg)](https://github.com/my-github-user/my-github-user) ``` + +Or with HTML : ```html My GitHub metrics ``` @@ -25,6 +25,16 @@ Assuming your username is `my-github-user`, you can embed your metrics in your p
💬 How to setup ? +#### 0. Prepare your personal repository + +If you don't know yet or haven't done it yet, create a repository with the same name as your GitHub username. + +![Personal repository](https://github.com/lowlighter/metrics/blob/master/docs/imgs/personal_repo.png) + +The `README.md` of this repository will be displayed on your GitHub user profile like below ! + +![GitHub Profile](https://github.com/lowlighter/metrics/blob/master/docs/imgs/github_profile.png) + #### 1. Create a GitHub token In your account settings, go to `Developer settings` and select `Personal access tokens` to create a new token. @@ -113,8 +123,6 @@ For conveniency, you can use the shared instance available at [metrics.lecoq.io] Assuming your username is `my-github-user`, you can embed your metrics in your personal repository's readme like below : ```markdown ![GitHub metrics](https://metrics.lecoq.io/my-github-user) -# Or with a redirection : -[![GitHub metrics](https://metrics.lecoq.io/my-github-user)](https://github.com/my-github-user/my-github-user) ```
@@ -326,7 +334,7 @@ These can provide more informations into your generated metrics, but it could al The *pagespeed* plugin allows you to add your website performances. -![Pagespeed plugin](https://github.com/lowlighter/metrics/blob/master/docs/imgs/plugin_pagespeed.jpg) +![Pagespeed plugin](https://github.com/lowlighter/metrics/blob/master/docs/imgs/plugin_pagespeed.png) These are computed through [Google's pagespeed API](https://developers.google.com/speed/docs/insights/v5/get-started), which returns the same results as [web.dev](https://web.dev). @@ -354,7 +362,7 @@ Add the following to your workflow : The *lines* plugin allows you to add the number of lines of code you added and removed across your repositories. -![Lines plugin](https://github.com/lowlighter/metrics/blob/master/docs/imgs/plugin_lines.jpg) +![Lines plugin](https://github.com/lowlighter/metrics/blob/master/docs/imgs/plugin_lines.png) It will consume an additional GitHub request per repository. @@ -376,7 +384,7 @@ Add the following to your workflow : The *traffic* plugin allows you to add the number of pages views across your repositories. -![Traffic plugin](https://github.com/lowlighter/metrics/blob/master/docs/imgs/plugin_traffic.jpg) +![Traffic plugin](https://github.com/lowlighter/metrics/blob/master/docs/imgs/plugin_traffic.png) It will consume an additional GitHub request per repository. diff --git a/action/dist/index.js b/action/dist/index.js index 910b40e5..44480171 100644 --- a/action/dist/index.js +++ b/action/dist/index.js @@ -28,6 +28,7 @@ __webpack_require__.r(__webpack_exports__); //Initialization console.log(`GitHub metrics as SVG image`) console.log(`========================================================`) + process.on("unhandledRejection", error => { throw error }) //Load svg template, style and query const template = ` diff --git a/action/index.mjs b/action/index.mjs index 027d9c45..b0771e96 100644 --- a/action/index.mjs +++ b/action/index.mjs @@ -13,6 +13,7 @@ //Initialization console.log(`GitHub metrics as SVG image`) console.log(`========================================================`) + process.on("unhandledRejection", error => { throw error }) //Load svg template, style and query const template = `<#include template.svg>`, style = `<#include style.css>`, query = `<#include query.graphql>` diff --git a/docs/imgs/github_profile.png b/docs/imgs/github_profile.png new file mode 100644 index 00000000..1093fce5 Binary files /dev/null and b/docs/imgs/github_profile.png differ diff --git a/docs/imgs/personal_repo.png b/docs/imgs/personal_repo.png new file mode 100644 index 00000000..4a18ae2c Binary files /dev/null and b/docs/imgs/personal_repo.png differ diff --git a/docs/imgs/plugin_lines.jpg b/docs/imgs/plugin_lines.jpg deleted file mode 100644 index f792ae60..00000000 Binary files a/docs/imgs/plugin_lines.jpg and /dev/null differ diff --git a/docs/imgs/plugin_lines.png b/docs/imgs/plugin_lines.png new file mode 100644 index 00000000..46119bc0 Binary files /dev/null and b/docs/imgs/plugin_lines.png differ diff --git a/docs/imgs/plugin_pagespeed.jpg b/docs/imgs/plugin_pagespeed.jpg deleted file mode 100644 index f5722483..00000000 Binary files a/docs/imgs/plugin_pagespeed.jpg and /dev/null differ diff --git a/docs/imgs/plugin_pagespeed.png b/docs/imgs/plugin_pagespeed.png new file mode 100644 index 00000000..e93b43c2 Binary files /dev/null and b/docs/imgs/plugin_pagespeed.png differ diff --git a/docs/imgs/plugin_traffic.jpg b/docs/imgs/plugin_traffic.jpg deleted file mode 100644 index bd05eeb7..00000000 Binary files a/docs/imgs/plugin_traffic.jpg and /dev/null differ diff --git a/docs/imgs/plugin_traffic.png b/docs/imgs/plugin_traffic.png new file mode 100644 index 00000000..a8b3e31d Binary files /dev/null and b/docs/imgs/plugin_traffic.png differ