From ab858585281631f8cd30ec833b64a3cf98f0eead Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 14 Aug 2022 12:04:03 -0400 Subject: [PATCH] fix(docs): lot of misspelling (#1180) [skip ci] --- .../partials/documentation/organizations.md | 2 +- .../partials/documentation/setup/web.md | 2 +- .github/readme/partials/templated/README.md | 2 +- .../partials/templated/plugins.community.md | 6 ++--- .github/readme/partials/templated/plugins.md | 4 ++-- .github/scripts/markdown_example.mjs | 2 +- .github/workflows/examples.yml | 4 ++-- ARCHITECTURE.md | 4 ++-- CODE_OF_CONDUCT.md | 2 +- CONTRIBUTING.md | 6 ++--- README.md | 6 ++--- action.yml | 2 +- source/app/action/index.mjs | 12 +++++----- source/app/metrics/index.mjs | 6 ++--- source/app/metrics/presets.mjs | 2 +- source/app/metrics/utils.mjs | 8 +++---- source/app/web/statics/embed/index.html | 2 +- source/app/web/statics/index.html | 2 +- source/app/web/statics/insights/index.html | 2 +- source/plugins/README.md | 2 +- source/plugins/activity/README.md | 2 +- source/plugins/activity/index.mjs | 2 +- source/plugins/activity/metadata.yml | 2 +- source/plugins/anilist/index.mjs | 2 +- source/plugins/base/README.md | 2 +- source/plugins/base/metadata.yml | 2 +- source/plugins/community/README.md | 6 ++--- source/plugins/community/poopmap/README.md | 2 +- source/plugins/community/stock/index.mjs | 2 +- source/plugins/contributors/README.md | 6 ++--- source/plugins/contributors/index.mjs | 2 +- source/plugins/contributors/metadata.yml | 2 +- source/plugins/core/README.md | 22 +++++++++---------- source/plugins/core/index.mjs | 2 +- source/plugins/core/metadata.yml | 8 +++---- source/plugins/followup/index.mjs | 2 +- source/plugins/habits/README.md | 6 ++--- source/plugins/habits/examples.yml | 2 +- source/plugins/habits/index.mjs | 4 ++-- source/plugins/habits/metadata.yml | 4 ++-- source/plugins/languages/README.md | 4 ++-- source/plugins/languages/analyzers.mjs | 10 ++++----- source/plugins/lines/index.mjs | 4 ++-- source/plugins/music/README.md | 4 ++-- source/plugins/music/index.mjs | 4 ++-- source/plugins/music/metadata.yml | 2 +- source/plugins/pagespeed/README.md | 4 ++-- source/plugins/pagespeed/examples.yml | 4 ++-- source/plugins/people/index.mjs | 2 +- source/plugins/reactions/index.mjs | 2 +- source/plugins/skyline/README.md | 2 +- source/plugins/skyline/metadata.yml | 2 +- source/plugins/wakatime/index.mjs | 6 ++--- source/templates/markdown/README.md | 2 +- tests/cases/habits.plugin.yml | 2 +- tests/cases/pagespeed.plugin.yml | 4 ++-- tests/ci.test.js | 8 +++---- tests/metrics.test.js | 2 +- .../github/graphql/repositories.random.mjs | 2 +- 59 files changed, 115 insertions(+), 115 deletions(-) diff --git a/.github/readme/partials/documentation/organizations.md b/.github/readme/partials/documentation/organizations.md index abcc53e6..3c49742f 100644 --- a/.github/readme/partials/documentation/organizations.md +++ b/.github/readme/partials/documentation/organizations.md @@ -32,7 +32,7 @@ It is possible to host workflows in the `.github` repository of organizations, a ## *️⃣ Organizations memberships for user accounts By default, GitHub only display public memberships. -Membership visibility canbe managed in the `People` tab of your organization. +Membership visibility can be managed in the `People` tab of your organization. ![Publish organization membership](/.github/readme/imgs/setup_public_membership_org.light.png#gh-light-mode-only) ![Publish organization membership](/.github/readme/imgs/setup_public_membership_org.dark.png#gh-dark-mode-only) diff --git a/.github/readme/partials/documentation/setup/web.md b/.github/readme/partials/documentation/setup/web.md index e6c14485..4c6c4f6a 100644 --- a/.github/readme/partials/documentation/setup/web.md +++ b/.github/readme/partials/documentation/setup/web.md @@ -154,7 +154,7 @@ Update profile `README.md` to include rendered image. ### 4️.1️ URL parameters syntax -The GitHub action and the web instance uses the same engine behing the hood. +The GitHub action and the web instance uses the same engine behind the hood. It is actually possible to generate image directly from url without passing by the web ui by knowing how to pass parameters. diff --git a/.github/readme/partials/templated/README.md b/.github/readme/partials/templated/README.md index bc3308e5..e75f478b 100644 --- a/.github/readme/partials/templated/README.md +++ b/.github/readme/partials/templated/README.md @@ -1,4 +1,4 @@ -# 📊 Metrics [](https://www.producthunt.com/posts/github-metrics?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-github-metrics) +# 📊 Metrics [](https://www.producthunt.com/posts/github-metrics?utm_source=badge-featured&utm_medium=badge&utm_source=badge-github-metrics) [![Continuous integration](https://github.com/lowlighter/metrics/actions/workflows/ci.yml/badge.svg)](https://github.com/lowlighter/metrics/actions/workflows/ci.yml) diff --git a/.github/readme/partials/templated/plugins.community.md b/.github/readme/partials/templated/plugins.community.md index 24f76243..5406cad3 100644 --- a/.github/readme/partials/templated/plugins.community.md +++ b/.github/readme/partials/templated/plugins.community.md @@ -34,10 +34,10 @@ Be sure to read [contribution guide](/CONTRIBUTING.md) and [architecture](/ARCHI Please respect the following guidelines: -- A plugin should be independant and should not rely on other plugins +- A plugin should be independent and should not rely on other plugins - [🧱 core](/source/plugins/core/README.md) and [🗃️ base](/source/plugins/base/README.md) output can be reused though - A plugin should never edit its original arguments, as it is shared amongst other plugins and would create unattended side effects -- Use `imports.metadata.plugins.{plugin-name}.inputs()` to automatically typecheck and default user inputs through defined `metadata.yml` +- Use `imports.metadata.plugins.{plugin-name}.inputs()` to automatically type check and default user inputs through defined `metadata.yml` - Plugin options should respect the "lexical field" of existing option to keep consistency - Plugin errors should be handled gracefully by partials with error message - New dependencies should be avoided, consider using existing `imports` @@ -210,7 +210,7 @@ export default async function( { login, //GitHub username q, //Raw user inputs (dot notation without plugin_ prefix, don't use it directly) - imports, //Various utilitaires (axios, puppeteer, fs, etc., see /source/app/metrics/utils.mjs) + imports, //Various utilities (axios, puppeteer, fs, etc., see /source/app/metrics/utils.mjs) data, //Raw data from core/base plugin computed, //Computed data from core/base plugin rest, //Rest authenticated GitHub octokit diff --git a/.github/readme/partials/templated/plugins.md b/.github/readme/partials/templated/plugins.md index 3d478ea3..c9048c61 100644 --- a/.github/readme/partials/templated/plugins.md +++ b/.github/readme/partials/templated/plugins.md @@ -5,7 +5,7 @@ Plugins provide additional content and lets you customize rendered metrics. **📦 Maintained by core team** <% { let previous = null; for (const [plugin, {name, category, deprecation, authors = []}] of Object.entries(plugins).filter(([key, value]) => (value)&&(value.category !== "community")).sort(([an, a], [bn, b]) => a.category === b.category ? an.localeCompare(bn) : 0)) { %> <% if (previous !== category) { previous = category -%> -* **<%= `${category.charAt(0).toLocaleUpperCase()}${category.substring(1)} plugins` %>** +* **<%= `${category === "github" ? "GitHub" : `${category.charAt(0).toLocaleUpperCase()}${category.substring(1)}`} plugins` %>** <% } -%> * [<%- name %> `<%= plugin %>`](/source/plugins/<%= plugin %>/README.md)<%# -%><% if (deprecation) { %> `⚠️ deprecated`<% } %><%# -%> <% }} %> @@ -14,4 +14,4 @@ Plugins provide additional content and lets you customize rendered metrics. * **[Community plugins](/source/plugins/community/README.md)** <% { let previous = null; for (const [plugin, {name, category, authors = []}] of Object.entries(plugins).filter(([key, value]) => (value)&&(value.category === "community")).sort(([an, a], [bn, b]) => a.category === b.category ? an.localeCompare(bn) : 0)) { %><%# -%> * [<%- name %> `<%= plugin %>`](/source/plugins/community/<%= plugin %>/README.md) by <%- authors.map(author => `[@${author}](https://github.com/${author})`).join(" ") %> -<% }} %> \ No newline at end of file +<% }} %> diff --git a/.github/scripts/markdown_example.mjs b/.github/scripts/markdown_example.mjs index 2d4f6444..3074d39e 100644 --- a/.github/scripts/markdown_example.mjs +++ b/.github/scripts/markdown_example.mjs @@ -10,7 +10,7 @@ const browser = await puppeteer.launch({ }) const page = await browser.newPage() -//Select markdown example and take screenshoot +//Select markdown example and take screenshot await page.setViewport({width: 600, height: 600}) await page.goto("https://github.com/lowlighter/metrics/blob/examples/metrics.markdown.md") const clip = await page.evaluate(() => { diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index fd90b5d5..04828d3d 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -354,7 +354,7 @@ jobs: user: lowlighter plugins_errors_fatal: yes if: ${{ success() || failure() }} - - name: 💡 Coding habits and activity - Midly interesting facts + - name: 💡 Coding habits and activity - Mildly interesting facts uses: lowlighter/metrics@master with: filename: metrics.plugin.habits.facts.svg @@ -806,7 +806,7 @@ jobs: user: lowlighter plugins_errors_fatal: yes if: ${{ success() || failure() }} - - name: ⏱️ Google PageSpeed - Succint report + - name: ⏱️ Google PageSpeed - Succinct report uses: lowlighter/metrics@master with: filename: metrics.plugin.pagespeed.svg diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index f65be94d..16b018b9 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -62,7 +62,7 @@ To solve this, metrics now spawns a [puppeteer](https://github.com/puppeteer/pup ![Metrics marker](/.github/readme/imgs/about_metrics_marker.png) -Additional bonus of using pupeeter is that it can take screenshots, making it easy to convert SVGs to PNG output. +Additional bonus of using puppeteer is that it can take screenshots, making it easy to convert SVGs to PNG output. ### 💬 Gathering external data from GitHub APIs and Third-Party services @@ -70,7 +70,7 @@ Additional bonus of using pupeeter is that it can take screenshots, making it ea As for other external services (Twitter, Spotify, PageSpeed, ...), metrics use their respective APIs, usually making https requests through [axios](https://github.com/axios/axios) and by following their documentation. It would be overkill to install entire SDKs for these since plugins rarely uses more than 2/3 calls. -In last resort, pupeeter is seldom used to scrap websites, though its use tends to make things slow and unstable (as it'll break upon HTML structural changes). +In last resort, puppeteer is seldom used to scrap websites, though its use tends to make things slow and unstable (as it'll break upon HTML structural changes). ### 💬 Web instance and GitHub action similarities diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 0890e573..c8c689e6 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -5,7 +5,7 @@ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, +identity and expression, level of experience, education, socioeconomic status, nationality, personal appearance, race, religion, or sexual identity and orientation. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b10c76fe..b7f73aa3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,7 @@ The following contributions are accepted: - + @@ -41,7 +41,7 @@ The following contributions are accepted: @@ -73,7 +73,7 @@ The following contributions are accepted: diff --git a/README.md b/README.md index bf52e917..13b6daf8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 📊 Metrics [](https://www.producthunt.com/posts/github-metrics?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-github-metrics) +# 📊 Metrics [](https://www.producthunt.com/posts/github-metrics?utm_source=badge-featured&utm_medium=badge&utm_source=badge-github-metrics) [![Continuous integration](https://github.com/lowlighter/metrics/actions/workflows/ci.yml/badge.svg)](https://github.com/lowlighter/metrics/actions/workflows/ci.yml) @@ -84,7 +84,7 @@ Generate metrics that can be embedded everywhere, including your GitHub profile @@ -408,7 +408,7 @@ Plugins provide additional content and lets you customize rendered metrics. * **Core plugins** * [🗃️ Base content `base`](/source/plugins/base/README.md) * [🧱 Core `core`](/source/plugins/core/README.md) -* **Github plugins** +* **GitHub plugins** * [🏆 Achievements `achievements`](/source/plugins/achievements/README.md) * [📰 Recent activity `activity`](/source/plugins/activity/README.md) * [📆 Commit calendar `calendar`](/source/plugins/calendar/README.md) diff --git a/action.yml b/action.yml index a6c8d43c..6e0b9b19 100644 --- a/action.yml +++ b/action.yml @@ -436,7 +436,7 @@ inputs: default: plugin_habits_facts: - description: Midly interesting facts + description: Mildly interesting facts default: plugin_habits_charts: diff --git a/source/app/action/index.mjs b/source/app/action/index.mjs index bf5990b2..4008a6bb 100644 --- a/source/app/action/index.mjs +++ b/source/app/action/index.mjs @@ -176,11 +176,11 @@ function quit(reason) { const api = {} const resources = {} api.graphql = octokit.graphql.defaults({headers: {authorization: `token ${token}`}}) - info("Github GraphQL API", "ok") + info("GitHub GraphQL API", "ok") const octoraw = github.getOctokit(token) api.rest = octoraw.rest api.rest.request = octoraw.request - info("Github REST API", "ok") + info("GitHub REST API", "ok") //Apply mocking if needed if (mocked) { Object.assign(api, await mocks(api)) @@ -397,7 +397,7 @@ function quit(reason) { let rendered = await retry(async () => { const {rendered, errors} = await metrics({login: user, q}, {graphql, rest, plugins, conf, die, verify, convert}, {Plugins, Templates}) if (errors.length) { - console.warn(`::group::${errors.length} error(s) occured`) + console.warn(`::group::${errors.length} error(s) occurred`) console.warn(util.inspect(errors, {depth: Infinity, maxStringLength: 256})) console.warn("::endgroup::") } @@ -459,7 +459,7 @@ function quit(reason) { else { //Cache embed svg for markdown outputs if (/markdown/.test(convert)) { - const regex = /(?)/ + const regex = /(?)/ let matched = null while (matched = regex.exec(rendered)?.groups) { //eslint-disable-line no-cond-assign await retry(async () => { @@ -499,7 +499,7 @@ function quit(reason) { } } - //Check editions + //Check changes if ((committer.commit) || (committer.pr)) { const git = sgit() const sha = await git.hashObject(paths.join("/renders", filename)) @@ -690,7 +690,7 @@ function quit(reason) { console.error(error) //Print debug buffer if debug was not enabled (if it is, it's already logged on the fly) if (!DEBUG) { - for (const log of [info.break(), "An error occured, logging debug message :", ...debugged]) + for (const log of [info.break(), "An error occurred, logging debug message :", ...debugged]) console.log(log) } core.setFailed(error.message) diff --git a/source/app/metrics/index.mjs b/source/app/metrics/index.mjs index 218a0dd3..9d5fb53b 100644 --- a/source/app/metrics/index.mjs +++ b/source/app/metrics/index.mjs @@ -68,7 +68,7 @@ export default async function metrics({login, q}, {graphql, rest, plugins, conf, if (errors.length) { console.debug(`metrics/compute/${login} > ${errors.length} errors !`) if (die) - throw new Error("An error occured during rendering, dying") + throw new Error("An error occurred during rendering, dying") else console.debug(util.inspect(errors, {depth: Infinity, maxStringLength: 256})) } @@ -117,7 +117,7 @@ export default async function metrics({login, q}, {graphql, rest, plugins, conf, console.debug(`metrics/compute/${login}/embed > ${name} >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`) if ((!name) || (typeof q !== "object") || (q === null)) { if (die) - throw new Error("An error occured during embed rendering, dying") + throw new Error("An error occurred during embed rendering, dying") return "

⚠️ Failed to execute embed function: invalid arguments

" } console.debug(`metrics/compute/${login} > embed called with`) @@ -142,7 +142,7 @@ export default async function metrics({login, q}, {graphql, rest, plugins, conf, //Compute rendering const {rendered} = await metrics({login, q}, {...arguments[1], convert: ["svg", "png", "jpeg"].includes(q["config.output"]) ? q["config.output"] : null}, arguments[2]) console.debug(`metrics/compute/${login}/embed > ${name} > success >>>>>>>>>>>>>>>>>>>>>>`) - return `` + return `` } //Rendering template source let rendered = source.replace(/\{\{ (?[\s\S]*?) \}\}/g, "{%= $ %}") diff --git a/source/app/metrics/presets.mjs b/source/app/metrics/presets.mjs index f4cdf66e..ce06f4ca 100644 --- a/source/app/metrics/presets.mjs +++ b/source/app/metrics/presets.mjs @@ -63,7 +63,7 @@ export default async function presets(list, {log = true, core = null} = {}) { catch (error) { if (env === "action") console.log(`::warning::skipping preset ${file}: ${error.message}`) - logger(`metrics/presets > an error occured while loading preset ${file} (${error}), ignoring`) + logger(`metrics/presets > an error occurred while loading preset ${file} (${error}), ignoring`) } } return options diff --git a/source/app/metrics/utils.mjs b/source/app/metrics/utils.mjs index 6ad9c247..1888fef0 100644 --- a/source/app/metrics/utils.mjs +++ b/source/app/metrics/utils.mjs @@ -269,7 +269,7 @@ export async function spawn(command, args = [], options = {}, {prefixed = true, }) } -/**Check command existance */ +/**Check command existence */ export async function which(command) { try { console.debug(`metrics/command > checking existence of ${command}`) @@ -282,7 +282,7 @@ export async function which(command) { return false } -/**Code hightlighter */ +/**Code highlighter */ export function highlight(code, lang) { return lang in prism.languages ? prism.highlight(code, prism.languages[lang]) : code } @@ -479,7 +479,7 @@ export const svg = { console.debug("metrics/svg/resize > successfully executed user javascript") } catch (error) { - console.debug(`an error occured while evaluating script: ${error}`) + console.debug(`an error occurred while evaluating script: ${error}`) } } //Disable animations @@ -510,7 +510,7 @@ export const svg = { )) } catch (error) { - console.debug(`metrics/svg/resize > an error occured: ${error}`) + console.debug(`metrics/svg/resize > an error occurred: ${error}`) throw error } //Convert if required diff --git a/source/app/web/statics/embed/index.html b/source/app/web/statics/embed/index.html index 37da8536..7cef3992 100644 --- a/source/app/web/statics/embed/index.html +++ b/source/app/web/statics/embed/index.html @@ -69,7 +69,7 @@ {{ requests.rest.remaining }} REST / {{ requests.graphql.remaining }} GraphQL / {{ requests.search.remaining }} search Metrics are rendered by metrics.lecoq.io in preview mode. - Any backend editions won't be reflected but client-side rendering can still be tested. + Any backend changes won't be reflected but client-side rendering can still be tested.
The following plugins options are not available on this web instance: {{ unusable.join(", ") }} diff --git a/source/app/web/statics/index.html b/source/app/web/statics/index.html index 7be9f3b7..aca5a70c 100644 --- a/source/app/web/statics/index.html +++ b/source/app/web/statics/index.html @@ -76,7 +76,7 @@
Metrics are rendered by metrics.lecoq.io in preview mode.
- Any backend editions won't be reflected but client-side rendering can still be tested. + Any backend changes won't be reflected but client-side rendering can still be tested.
This web instance has run out of GitHub API requests. diff --git a/source/app/web/statics/insights/index.html b/source/app/web/statics/insights/index.html index 30ef4e37..3117a550 100644 --- a/source/app/web/statics/insights/index.html +++ b/source/app/web/statics/insights/index.html @@ -79,7 +79,7 @@
Metrics insights are rendered by metrics.lecoq.io in preview mode.
- Any backend editions won't be reflected but client-side rendering can still be tested. + Any backend changes won't be reflected but client-side rendering can still be tested.
diff --git a/source/plugins/README.md b/source/plugins/README.md index 96b630c0..45358b13 100644 --- a/source/plugins/README.md +++ b/source/plugins/README.md @@ -7,7 +7,7 @@ Plugins provide additional content and lets you customize rendered metrics. * **Core plugins** * [🗃️ Base content `base`](/source/plugins/base/README.md) * [🧱 Core `core`](/source/plugins/core/README.md) -* **Github plugins** +* **GitHub plugins** * [🏆 Achievements `achievements`](/source/plugins/achievements/README.md) * [📰 Recent activity `activity`](/source/plugins/activity/README.md) * [📆 Commit calendar `calendar`](/source/plugins/calendar/README.md) diff --git a/source/plugins/activity/README.md b/source/plugins/activity/README.md index fe5ade47..06458777 100644 --- a/source/plugins/activity/README.md +++ b/source/plugins/activity/README.md @@ -141,7 +141,7 @@ All product and company names are trademarks™ or registered® trademarks of th
  • release: Publication of new releases
  • review: Review of pull requests
  • comment: Comments on commits, issues and pull requests
  • -
  • wiki: Edition of wiki pages
  • +
  • wiki: Changes of wiki pages
  • fork: Forking of repositories
  • star: Starring of repositories
  • public: Repositories made public
  • diff --git a/source/plugins/activity/index.mjs b/source/plugins/activity/index.mjs index 03a209f0..0d166d20 100644 --- a/source/plugins/activity/index.mjs +++ b/source/plugins/activity/index.mjs @@ -73,7 +73,7 @@ export default async function({login, data, rest, q, account, imports}, {enabled const {forkee: {full_name: forked}} = payload return {type: "fork", actor, timestamp, repo, forked} } - //Wiki editions + //Wiki changes case "GollumEvent": { const {pages} = payload return {type: "wiki", actor, timestamp, repo, pages: pages.map(({title}) => title)} diff --git a/source/plugins/activity/metadata.yml b/source/plugins/activity/metadata.yml index de249e60..3f0ca6bb 100644 --- a/source/plugins/activity/metadata.yml +++ b/source/plugins/activity/metadata.yml @@ -94,7 +94,7 @@ inputs: - `release`: Publication of new releases - `review`: Review of pull requests - `comment`: Comments on commits, issues and pull requests - - `wiki`: Edition of wiki pages + - `wiki`: Changes of wiki pages - `fork`: Forking of repositories - `star`: Starring of repositories - `public`: Repositories made public diff --git a/source/plugins/anilist/index.mjs b/source/plugins/anilist/index.mjs index ceb7450d..368a086c 100644 --- a/source/plugins/anilist/index.mjs +++ b/source/plugins/anilist/index.mjs @@ -68,7 +68,7 @@ export default async function({login, data, queries, imports, q, account}, {enab const {data: {data: {User: {favourites: {[type]: {nodes, pageInfo: cursor}}}}}} = await imports.axios.post("https://graphql.anilist.co", {variables: {name: user, page}, query: queries.anilist.favorites({type})}) page++ next = cursor.hasNextPage - list.push(...await Promise.all(nodes.map(media => format({media: {progess: null, score: null, media}, imports})))) + list.push(...await Promise.all(nodes.map(media => format({media: {progress: null, score: null, media}, imports})))) } catch (error) { if (await retry({login, imports, error})) diff --git a/source/plugins/base/README.md b/source/plugins/base/README.md index d2df4b1b..168fafcf 100644 --- a/source/plugins/base/README.md +++ b/source/plugins/base/README.md @@ -179,7 +179,7 @@ Broad affiliations will result in less representative metrics.

    diff --git a/source/plugins/base/metadata.yml b/source/plugins/base/metadata.yml index 5420f478..32724eff 100644 --- a/source/plugins/base/metadata.yml +++ b/source/plugins/base/metadata.yml @@ -127,7 +127,7 @@ inputs: Specify names, surnames, username, email addresses that has been used in the past that can be used to detect commits ownerships in some plugins type: array - format: comma-seperated + format: comma-separated default: .user.login example: lowlighter, lowlighter@users.noreply.github.com global: yes diff --git a/source/plugins/community/README.md b/source/plugins/community/README.md index 11fd8f4e..aa40d6e1 100644 --- a/source/plugins/community/README.md +++ b/source/plugins/community/README.md @@ -53,10 +53,10 @@ Be sure to read [contribution guide](/CONTRIBUTING.md) and [architecture](/ARCHI Please respect the following guidelines: -- A plugin should be independant and should not rely on other plugins +- A plugin should be independent and should not rely on other plugins - [🧱 core](/source/plugins/core/README.md) and [🗃️ base](/source/plugins/base/README.md) output can be reused though - A plugin should never edit its original arguments, as it is shared amongst other plugins and would create unattended side effects -- Use `imports.metadata.plugins.{plugin-name}.inputs()` to automatically typecheck and default user inputs through defined `metadata.yml` +- Use `imports.metadata.plugins.{plugin-name}.inputs()` to automatically type check and default user inputs through defined `metadata.yml` - Plugin options should respect the "lexical field" of existing option to keep consistency - Plugin errors should be handled gracefully by partials with error message - New dependencies should be avoided, consider using existing `imports` @@ -229,7 +229,7 @@ export default async function( { login, //GitHub username q, //Raw user inputs (dot notation without plugin_ prefix, don't use it directly) - imports, //Various utilitaires (axios, puppeteer, fs, etc., see /source/app/metrics/utils.mjs) + imports, //Various utilities (axios, puppeteer, fs, etc., see /source/app/metrics/utils.mjs) data, //Raw data from core/base plugin computed, //Computed data from core/base plugin rest, //Rest authenticated GitHub octokit diff --git a/source/plugins/community/poopmap/README.md b/source/plugins/community/poopmap/README.md index f60223e1..c6dc7143 100644 --- a/source/plugins/community/poopmap/README.md +++ b/source/plugins/community/poopmap/README.md @@ -92,7 +92,7 @@ Tap "Copy to Clipboard" It should result in something like `Haha, check out the places I've pooped on Poop Map https://api.poopmap.net/map?token=xxxxxxxxxx` copied. -Extract the `token` query paramater from the link and use it in `plugin_poopmap_token`. +Extract the `token` query parameter from the link and use it in `plugin_poopmap_token`. This token will not expire and it will be able to access only public details. ## ℹ️ Examples workflows diff --git a/source/plugins/community/stock/index.mjs b/source/plugins/community/stock/index.mjs index 1394917a..0e19d2fd 100644 --- a/source/plugins/community/stock/index.mjs +++ b/source/plugins/community/stock/index.mjs @@ -21,7 +21,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal headers: {"x-rapidapi-key": token}, }) - //Query API for sotck charts + //Query API for stock charts console.debug(`metrics/compute/${login}/plugins > stock > querying api for stock`) const {data: {chart: {result: [{meta, timestamp, indicators: {quote: [{close}]}}]}}} = await imports.axios.get("https://yh-finance.p.rapidapi.com/stock/v2/get-chart", { params: {interval, symbol, range: duration, region: "US"}, diff --git a/source/plugins/contributors/README.md b/source/plugins/contributors/README.md index 2e791872..eb108cc0 100644 --- a/source/plugins/contributors/README.md +++ b/source/plugins/contributors/README.md @@ -107,7 +107,7 @@ All product and company names are trademarks™ or registered® trademarks of th @@ -130,9 +130,9 @@ Pass a JSON object mapping category with fileglobs

    ## 🗂️ Setting up contribution categories -Pass a JSON object to `plugin_contributors_categories` with categories names as keys and arrays of fileglobs as values to configure contributions categories. +Pass a JSON object to `plugin_contributors_categories` with categories names as keys and arrays of file globs as values to configure contributions categories. -Each modified file by a contributor matching a fileglob will add them in said category. +Each modified file by a contributor matching a file glob will add them in said category. > 💡 File matching respect keys order diff --git a/source/plugins/contributors/index.mjs b/source/plugins/contributors/index.mjs index 0a54789d..e4d4bbd3 100644 --- a/source/plugins/contributors/index.mjs +++ b/source/plugins/contributors/index.mjs @@ -109,7 +109,7 @@ export default async function({login, q, imports, data, rest, graphql, queries, } catch (error) { console.debug(error) - console.debug(`metrics/compute/${login}/plugins > contributors > an error occured while processing ${repository}`) + console.debug(`metrics/compute/${login}/plugins > contributors > an error occurred while processing ${repository}`) } finally { //Cleaning diff --git a/source/plugins/contributors/metadata.yml b/source/plugins/contributors/metadata.yml index ba153027..8c1bf0ff 100644 --- a/source/plugins/contributors/metadata.yml +++ b/source/plugins/contributors/metadata.yml @@ -70,7 +70,7 @@ inputs: Contribution categories This option requires [`plugin_contributors_sections`](/source/plugins/contributors/README.md#plugin_contributors_sections) to have `categories` in it to be effective. - Pass a JSON object mapping category with fileglobs + Pass a JSON object mapping category with file globs type: json default: | { diff --git a/source/plugins/core/README.md b/source/plugins/core/README.md index 3544b850..3b5dd751 100644 --- a/source/plugins/core/README.md +++ b/source/plugins/core/README.md @@ -55,7 +55,7 @@ Content can be manually ordered using `config_order` option. > 💡 Omitted sections will be appended at the end using default order > ℹ️ The handles to use for each plugin and sections is based on the [`partials/_.json`](/source/templates/classic/partials/_.json) of the template. -> It may not necessarly be the plugin id (e.g. `base.header`, `base.activity+community`, `base.repositories`, etc.). +> It may not necessarily be the plugin id (e.g. `base.header`, `base.activity+community`, `base.repositories`, etc.). ## 🪛 Using presets @@ -74,7 +74,7 @@ Options resolution is done in the following order: config_presets: https://raw.githubusercontent.com/lowlighter/metrics/presets/lunar-red/preset.yaml ``` -Some presets are hosted on this repository on the [`@presets`](https://github.com/lowlighter/metrics/tree/presets) branch and can be used directly by using using their identifier prefixed by an arobase (`@`). +Some presets are hosted on this repository on the [`@presets`](https://github.com/lowlighter/metrics/tree/presets) branch and can be used directly by using their identifier prefixed by an arobase (`@`). *Example: using a pre-defined configuration preset* ```yaml @@ -122,7 +122,7 @@ Additional JavaScript can be injected using `extras_js` option. ``` > ℹ️ JavaScript is executed in puppeteer context during the rendering phase, **not** in *metrics* context. -> It will be possible to access `document` and all other features accessibles like if the SVG was opened in a browser page +> It will be possible to access `document` and all other features accessible like if the SVG was opened in a browser page > 💡 If you make an heavy use of this option, creating a [community templates](/source/templates/community/README.md) may be a better alternative @@ -304,7 +304,7 @@ metrics: ### Manual handling -Use `config_ouput: none` to perform custom processing with outputs. +Use `config_output: none` to perform custom processing with outputs. They will be available under `/metrics_renders/{filename}` in the runner. *Example: generate outputs and manually push them* @@ -336,7 +336,7 @@ metrics: ## ♻️ Retrying automatically failed rendering and output action -Rendering is subject to external factors and can fail ocassionaly. +Rendering is subject to external factors and can fail occasionally. Use `retries` and `retries_delay` options to automatically retry rendering. *Example: retry render up to 3 times (wait 5 minutes between each fail)* @@ -347,7 +347,7 @@ Use `retries` and `retries_delay` options to automatically retry rendering. retries_delay: 300 ``` -Output action is also subject to GitHub API rate-limiting and overall health status and can fail ocassionaly. +Output action is also subject to GitHub API rate-limiting and overall health status and can fail occasionally. Use `retries_output_action` and `retries_delay_output_action` options to automatically retry output action. > 💡 As output action is a separate step from rendering, render step won't be called again @@ -362,7 +362,7 @@ Use `retries_output_action` and `retries_delay_output_action` options to automat ## 🗜️ Optimize SVG output -To reduce filesize and decrease loading time, *metrics* offers several optimization options, such as purging unused CSS and style minification, XML pretty-pretting (which also reduce diffs between changes) and general SVG optimation (still experimental). +To reduce filesize and decrease loading time, *metrics* offers several optimization options, such as purging unused CSS and style minification, XML pretty-printing (which also reduce diffs between changes) and general SVG optimization (still experimental). > 💡 This option is enabled by default! @@ -525,9 +525,9 @@ When doing so, any settings which defaults on user fetched values will not be te
  • none: just create file in /metrics_renders directory of action runner
  • commit: push output to committer_branch
  • pull-request: push output to a new branch and open a pull request to committer_branch
  • -
  • pull-request-merge: same as pull-request and additionaly merge pull request
  • -
  • pull-request-squash: same as pull-request and additionaly squash and merge pull request
  • -
  • pull-request-rebase: same as pull-request and additionaly rebase and merge pull request
  • +
  • pull-request-merge: same as pull-request and additionally merge pull request
  • +
  • pull-request-squash: same as pull-request and additionally squash and merge pull request
  • +
  • pull-request-rebase: same as pull-request and additionally rebase and merge pull request
  • gist: push output to committer_gist
  • @@ -752,7 +752,7 @@ Size must be a supported icon size (12, 16 or 24).
    diff --git a/source/plugins/core/index.mjs b/source/plugins/core/index.mjs index bb4c0d74..a86201b1 100644 --- a/source/plugins/core/index.mjs +++ b/source/plugins/core/index.mjs @@ -146,7 +146,7 @@ export default async function({login, q}, {conf, data, rest, graphql, plugins, q } if (dflags.includes("--halloween")) { console.debug(`metrics/compute/${login} > applying dflag --halloween`) - //Haloween color replacer + //Halloween color replacer const halloween = content => content .replace(/--color-calendar-graph/g, "--color-calendar-halloween-graph") diff --git a/source/plugins/core/metadata.yml b/source/plugins/core/metadata.yml index fcaa3286..42315594 100644 --- a/source/plugins/core/metadata.yml +++ b/source/plugins/core/metadata.yml @@ -100,9 +100,9 @@ inputs: - `none`: just create file in `/metrics_renders` directory of action runner - `commit`: push output to `committer_branch` - `pull-request`: push output to a new branch and open a pull request to `committer_branch` - - `pull-request-merge`: same as `pull-request` and additionaly merge pull request - - `pull-request-squash`: same as `pull-request` and additionaly squash and merge pull request - - `pull-request-rebase`: same as `pull-request` and additionaly rebase and merge pull request + - `pull-request-merge`: same as `pull-request` and additionally merge pull request + - `pull-request-squash`: same as `pull-request` and additionally squash and merge pull request + - `pull-request-rebase`: same as `pull-request` and additionally rebase and merge pull request - `gist`: push output to `committer_gist` > 💡 When using `pull-request`, you will need to set the last job with a `pull-request-*` action instead, else it won't be merged @@ -291,7 +291,7 @@ inputs: description: | Base64-encoded images - Enable this option to make self-contained ouput (i.e. with no external links) + Enable this option to make self-contained output (i.e. with no external links) type: boolean default: yes global: yes diff --git a/source/plugins/followup/index.mjs b/source/plugins/followup/index.mjs index 26c80fab..306cfd98 100644 --- a/source/plugins/followup/index.mjs +++ b/source/plugins/followup/index.mjs @@ -82,7 +82,7 @@ export default async function({login, data, computed, imports, q, graphql, queri } catch (error) { console.debug(error) - console.debug(`metrics/compute/${login}/plugins > followup > an error occured while processing ${owner}/${repo}, skipping...`) + console.debug(`metrics/compute/${login}/plugins > followup > an error occurred while processing ${owner}/${repo}, skipping...`) } } } diff --git a/source/plugins/habits/README.md b/source/plugins/habits/README.md index d632a17d..d8ea9f15 100644 --- a/source/plugins/habits/README.md +++ b/source/plugins/habits/README.md @@ -20,7 +20,7 @@ All product and company names are trademarks™ or registered® trademarks of th @@ -73,7 +73,7 @@ All product and company names are trademarks™ or registered® trademarks of th - @@ -174,7 +174,7 @@ Configure `config_timezone` (see [supported timezone](https://en.wikipedia.org/w ```yaml -name: Midly interesting facts +name: Mildly interesting facts uses: lowlighter/metrics@latest with: filename: metrics.plugin.habits.facts.svg diff --git a/source/plugins/habits/examples.yml b/source/plugins/habits/examples.yml index 6f1514ec..945391b1 100644 --- a/source/plugins/habits/examples.yml +++ b/source/plugins/habits/examples.yml @@ -1,4 +1,4 @@ -- name: Midly interesting facts +- name: Mildly interesting facts uses: lowlighter/metrics@latest with: filename: metrics.plugin.habits.facts.svg diff --git a/source/plugins/habits/index.mjs b/source/plugins/habits/index.mjs index 34cc9577..a331f14e 100644 --- a/source/plugins/habits/index.mjs +++ b/source/plugins/habits/index.mjs @@ -64,7 +64,7 @@ export default async function({login, data, rest, imports, q, account}, {enabled habits.commits.days[day] = (habits.commits.days[day] ?? 0) + 1 habits.commits.days.max = Math.max(...Object.values(habits.commits.days)) //Compute day with most commits - habits.commits.day = days.length ? ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][Object.entries(habits.commits.days).sort(([_an, a], [_bn, b]) => b - a).map(([day, _occurence]) => day)[0]] ?? NaN : NaN + habits.commits.day = days.length ? ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"][Object.entries(habits.commits.days).sort(([_an, a], [_bn, b]) => b - a).map(([day, _occurrence]) => day)[0]] ?? NaN : NaN } //Commit hour @@ -76,7 +76,7 @@ export default async function({login, data, rest, imports, q, account}, {enabled habits.commits.hours[hour] = (habits.commits.hours[hour] ?? 0) + 1 habits.commits.hours.max = Math.max(...Object.values(habits.commits.hours)) //Compute hour with most commits - habits.commits.hour = hours.length ? `${Object.entries(habits.commits.hours).sort(([_an, a], [_bn, b]) => b - a).map(([hour, _occurence]) => hour)[0]}`.padStart(2, "0") : NaN + habits.commits.hour = hours.length ? `${Object.entries(habits.commits.hours).sort(([_an, a], [_bn, b]) => b - a).map(([hour, _occurrence]) => hour)[0]}`.padStart(2, "0") : NaN } //Indent style diff --git a/source/plugins/habits/metadata.yml b/source/plugins/habits/metadata.yml index ab57c21f..cfe31137 100644 --- a/source/plugins/habits/metadata.yml +++ b/source/plugins/habits/metadata.yml @@ -4,7 +4,7 @@ description: | This plugin displays coding habits based on 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 + +mildly interesting facts: https://github.com/lowlighter/metrics/blob/examples/metrics.plugin.habits.facts.svg index: 7 supports: - user @@ -39,7 +39,7 @@ inputs: plugin_habits_facts: description: | - Midly interesting facts + Mildly interesting facts It includes indentation type, average number of characters per line of code, and most active time and day type: boolean diff --git a/source/plugins/languages/README.md b/source/plugins/languages/README.md index 23c32e7b..34cf9c60 100644 --- a/source/plugins/languages/README.md +++ b/source/plugins/languages/README.md @@ -239,7 +239,7 @@ It will be automatically hidden if empty.

    The default algorithm use the top languages provided of each repository you contributed to. When working in collaborative projects with a lot of people, these numbers may be less representative of your actual work. -The `plugin_languages_indepth` option lets you use a more advanced algorithm for more accurates statistics. +The `plugin_languages_indepth` option lets you use a more advanced algorithm for more accurate statistics. Under the hood, it will clone your repositories, run [linguist-js](https://github.com/Nixinova/Linguist) (a JavaScript port of [GitHub linguist](https://github.com/github/linguist)) and iterate over patches matching your `commits_authoring` setting. Since git lets you use any email and username for commits, *metrics* may not be able to detect a commit ownership if it isn't the same as your GitHub personal data. By default, it will use your GitHub username, but you can configure additional matching usernames and email addresses using `commits_authoring` option. @@ -326,7 +326,7 @@ It is possible to use custom colors using `plugin_languages_colors` option. The following syntaxes are supported: - A predefined set from [colorsets.json](colorsets.json) *(support limited to 8 languages max)* - `${language}:${color}` to change the color of a language *(case insensitive)* -- `${n}:${color}` to change the color of the the n-th language +- `${n}:${color}` to change the color of the n-th language Both hexadecimal and [named color](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value) are supported. diff --git a/source/plugins/languages/analyzers.mjs b/source/plugins/languages/analyzers.mjs index aa8c29f4..5c420998 100644 --- a/source/plugins/languages/analyzers.mjs +++ b/source/plugins/languages/analyzers.mjs @@ -32,7 +32,7 @@ export async function indepth({login, data, imports, repositories, gpg}, {skippe } } catch (error) { - console.debug(`metrics/compute/${login}/plugins > languages > indepth > an error occured while importing gpg ${id}, skipping...`) + console.debug(`metrics/compute/${login}/plugins > languages > indepth > an error occurred while importing gpg ${id}, skipping...`) } finally { //Cleaning @@ -73,7 +73,7 @@ export async function indepth({login, data, imports, repositories, gpg}, {skippe await analyze(arguments[0], {results, path, categories}) } catch (error) { - console.debug(`metrics/compute/${login}/plugins > languages > indepth > an error occured while processing ${repo}, skipping...`) + console.debug(`metrics/compute/${login}/plugins > languages > indepth > an error occurred while processing ${repo}, skipping...`) } finally { //Cleaning @@ -184,7 +184,7 @@ export async function recent({login, data, imports, rest, account}, {skipped = [ } } catch { - console.debug(`metrics/compute/${login}/plugins > languages > an error occured while processing recently used languages`) + console.debug(`metrics/compute/${login}/plugins > languages > an error occurred while processing recently used languages`) } finally { //Cleaning @@ -269,7 +269,7 @@ async function analyze({login, imports, data}, {results, path, categories = ["pr } } catch (error) { - console.debug(`metrics/compute/${login}/plugins > languages > indepth > an error occured while processing line (${error.message}), skipping...`) + console.debug(`metrics/compute/${login}/plugins > languages > indepth > an error occurred while processing line (${error.message}), skipping...`) } }, }) @@ -279,7 +279,7 @@ async function analyze({login, imports, data}, {results, path, categories = ["pr } } catch { - console.debug(`metrics/compute/${login}/plugins > languages > indepth > an error occured on page ${page}, skipping...`) + console.debug(`metrics/compute/${login}/plugins > languages > indepth > an error occurred on page ${page}, skipping...`) results.missed.commits += per_page } } diff --git a/source/plugins/lines/index.mjs b/source/plugins/lines/index.mjs index 5b9934ff..77f24f6c 100644 --- a/source/plugins/lines/index.mjs +++ b/source/plugins/lines/index.mjs @@ -33,7 +33,7 @@ export default async function({login, data, imports, rest, q, account}, {enabled //Check if data are available if (!Array.isArray(stats)) return - //Compute editions + //Compute changes repos[handle] = {added: 0, deleted: 0, changed: 0} const contributors = stats.filter(({author}) => context.mode === "repository" ? true : author?.login?.toLocaleLowerCase() === login.toLocaleLowerCase()) for (const contributor of contributors) { @@ -42,7 +42,7 @@ export default async function({login, data, imports, rest, q, account}, {enabled added += a deleted += d changed += c - //Compute editions per week + //Compute changes per week const date = new Date(w * 1000).toISOString().substring(0, 10) if (!weeks[date]) weeks[date] = {added: 0, deleted: 0, changed: 0} diff --git a/source/plugins/music/README.md b/source/plugins/music/README.md index 8233a045..35b8963c 100644 --- a/source/plugins/music/README.md +++ b/source/plugins/music/README.md @@ -106,7 +106,7 @@ All product and company names are trademarks™ or registered® trademarks of th
  • recent: display recently listened tracks
  • top: display top listened artists/tracks
  • -

    If plugin_music_playlist is specifed, the default value is playlist, else it is recent

    +

    If plugin_music_playlist is specified, the default value is playlist, else it is recent

    @@ -262,7 +262,7 @@ Extract the source link from the code pasted in your clipboard: *(Not available)* -> 😥 Unfortunately I wasn't able to find a workaround to avoid paying the $99 fee for the developer program, even using workarounds like *smart playlists*, *shortcuts* and other stuff. However if you really want this feature, you could [sponsor me](github.com/sponsors/lowlighter) and I could eventually invest in a developper account with enough money, implement it and also eventually offer service on the shared instance +> 😥 Unfortunately I wasn't able to find a workaround to avoid paying the $99 fee for the developer program, even using workarounds like *smart playlists*, *shortcuts* and other stuff. However if you really want this feature, you could [sponsor me](github.com/sponsors/lowlighter) and I could eventually invest in a developer account with enough money, implement it and also eventually offer service on the shared instance ### 🔗 Get an embed playlist url for `plugin_music_playlist` diff --git a/source/plugins/music/index.mjs b/source/plugins/music/index.mjs index 015ab175..1ac147f7 100644 --- a/source/plugins/music/index.mjs +++ b/source/plugins/music/index.mjs @@ -50,7 +50,7 @@ export default async function({login, imports, data, q, account}, {enabled = fal let {provider, mode, playlist, limit, user, "played.at": played_at, "time.range": time_range, "top.type": top_type, token: _token} = imports.metadata.plugins.music.inputs({data, account, q}) if ((sandbox) && (_token)) { token = _token - console.debug(`metrics/compute/${login}/plugins > music > overriden token value through user inputs as sandbox mode is enabled`) + console.debug(`metrics/compute/${login}/plugins > music > overridden token value through user inputs as sandbox mode is enabled`) } if (!imports.metadata.plugins.music.extras("token", {extras, error: false})) token = "" @@ -502,7 +502,7 @@ export default async function({login, imports, data, q, account}, {enabled = fal } } -//get all objects that have the given key name with recursivity +//get all objects that have the given key name with recursively function get_all_with_key(obj, key) { const result = [] if (obj instanceof Object) { diff --git a/source/plugins/music/metadata.yml b/source/plugins/music/metadata.yml index 69854f57..17a17cc4 100644 --- a/source/plugins/music/metadata.yml +++ b/source/plugins/music/metadata.yml @@ -72,7 +72,7 @@ inputs: - `recent`: display recently listened tracks - `top`: display top listened artists/tracks - If [`plugin_music_playlist`](/source/plugins/music/README.md#plugin_music_playlist) is specifed, the default value is `playlist`, else it is `recent` + If [`plugin_music_playlist`](/source/plugins/music/README.md#plugin_music_playlist) is specified, the default value is `playlist`, else it is `recent` type: string default: "" values: diff --git a/source/plugins/pagespeed/README.md b/source/plugins/pagespeed/README.md index 1cd23b96..ef1e08aa 100644 --- a/source/plugins/pagespeed/README.md +++ b/source/plugins/pagespeed/README.md @@ -121,7 +121,7 @@ All product and company names are trademarks™ or registered® trademarks of th ```yaml -name: Succint report +name: Succinct report uses: lowlighter/metrics@latest with: filename: metrics.plugin.pagespeed.svg @@ -159,7 +159,7 @@ with: ``` ```yaml -name: Succint report with PWA +name: Succinct report with PWA uses: lowlighter/metrics@latest with: filename: metrics.plugin.pagespeed.svg diff --git a/source/plugins/pagespeed/examples.yml b/source/plugins/pagespeed/examples.yml index a1353f3d..37a38316 100644 --- a/source/plugins/pagespeed/examples.yml +++ b/source/plugins/pagespeed/examples.yml @@ -1,4 +1,4 @@ -- name: Succint report +- name: Succinct report uses: lowlighter/metrics@latest with: filename: metrics.plugin.pagespeed.svg @@ -30,7 +30,7 @@ plugin_pagespeed_token: ${{ secrets.PAGESPEED_TOKEN }} plugin_pagespeed_url: https://lecoq.io -- name: Succint report with PWA +- name: Succinct report with PWA uses: lowlighter/metrics@latest with: filename: metrics.plugin.pagespeed.svg diff --git a/source/plugins/people/index.mjs b/source/plugins/people/index.mjs index 94c989a6..7ae4c9c3 100644 --- a/source/plugins/people/index.mjs +++ b/source/plugins/people/index.mjs @@ -79,7 +79,7 @@ export default async function({login, data, graphql, rest, q, queries, imports, console.debug(`metrics/compute/${login}/plugins > people > keeping only ${limit} ${type}`) result[type].splice(limit) } - //Hide real avator with identicons if enabled + //Hide real avatar with identicons if enabled if (identicons) { console.debug(`metrics/compute/${login}/plugins > people > using identicons`) result[type].map(user => user.avatarUrl = `https://github.com/identicons/${user.login}.png`) diff --git a/source/plugins/reactions/index.mjs b/source/plugins/reactions/index.mjs index 64b6eabf..a62df3cf 100644 --- a/source/plugins/reactions/index.mjs +++ b/source/plugins/reactions/index.mjs @@ -38,7 +38,7 @@ export default async function({login, q, imports, data, graphql, queries, accoun } catch (error) { console.debug(error) - console.debug(`metrics/compute/${login}/plugins > reactions > an error occured while retrieving ${type}`) + console.debug(`metrics/compute/${login}/plugins > reactions > an error occurred while retrieving ${type}`) } } console.debug(`metrics/compute/${login}/plugins > reactions > fetched ${comments.length} comments`) diff --git a/source/plugins/skyline/README.md b/source/plugins/skyline/README.md index e5bc9f3e..4cfffafa 100644 --- a/source/plugins/skyline/README.md +++ b/source/plugins/skyline/README.md @@ -110,7 +110,7 @@ Using this mode significantly increase file size as each frame is encoded separa
    SectionEditionsChanges Additions Notes
      -
    • Templates editions are allowed with new features additions (but must remain consistent with current visuals)
    • +
    • Template changes are allowed with new features additions (but must remain consistent with current visuals)
    • New templates should use 📕 Community templates instead
      -
    • Core editions impact all rendering process and should be avoided unless necessary
    • +
    • Core changes impact all rendering process and should be avoided unless necessary
    • New dependencies should be avoided when possible
    Recent activity charts
    -
    Midly interesting facts
    +
    Mildly interesting facts
    ⏭️ Global option
    ⏯️ Cannot be preset
    type: array -(comma-seperated) +(comma-separated)
    default: → User login

    plugin_contributors_categories

    Contribution categories

    This option requires plugin_contributors_sections to have categories in it to be effective. -Pass a JSON object mapping category with fileglobs

    +Pass a JSON object mapping category with file globs

    config_base64

    Base64-encoded images

    -

    Enable this option to make self-contained ouput (i.e. with no external links)

    +

    Enable this option to make self-contained output (i.e. with no external links)

    Recent activity charts
    -
    Midly interesting facts
    +
    Mildly interesting facts

    plugin_habits_facts

    Midly interesting facts

    +

    Mildly interesting facts

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

    plugin_skyline_settings

    Advanced settings

    -

    Can be configured to use alternate skyline websites different from skyline.github.com, such as honzaap's GitHub City.

    +

    Can be configured to use alternate skyline websites different from skyline.github.com, such as honzaap's GitHub City.

    • url: Target URL (mandatory)
    • ready: Readiness condition (A JS function that returns a boolean)
    • diff --git a/source/plugins/skyline/metadata.yml b/source/plugins/skyline/metadata.yml index 1c38fbed..31158d76 100644 --- a/source/plugins/skyline/metadata.yml +++ b/source/plugins/skyline/metadata.yml @@ -64,7 +64,7 @@ inputs: description: | Advanced settings - Can be configured to use alternate skyline websites different from [skyline.github.com](https://skyline.github.com), such as [honzaap's GitHub City](https://github.com/honzaap/GitHubCity). + Can be configured to use alternate skyline websites different from [skyline.github.com](https://skyline.github.com), such as [honzaap's GitHub City](https://github.com/honzaap/GithubCity). - `url`: Target URL (mandatory) - `ready`: Readiness condition (A JS function that returns a boolean) diff --git a/source/plugins/wakatime/index.mjs b/source/plugins/wakatime/index.mjs index 98b0d7bd..2700dced 100644 --- a/source/plugins/wakatime/index.mjs +++ b/source/plugins/wakatime/index.mjs @@ -12,7 +12,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal if (!limit) limit = void limit - const showOnlyGithubPublicRepos = repositoriesVisibility === "public" + const showOnlyGitHubPublicRepos = repositoriesVisibility === "public" const range = { "7": "last_7_days", @@ -26,7 +26,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal const {data: {data: stats}} = await imports.axios.get(`${url}/api/v1/users/${user}/stats/${range}?api_key=${token}`) const projectStats = stats.projects?.map(({name, percent, total_seconds: total}) => ({name, percent: percent / 100, total})).sort((a, b) => b.percent - a.percent) - const projects = showOnlyGithubPublicRepos ? await pickOnlyGithubPublicRepos({limit, login, axios: imports.axios, projects: projectStats}) : projectStats?.slice(0, limit) + const projects = showOnlyGitHubPublicRepos ? await pickOnlyGitHubPublicRepos({limit, login, axios: imports.axios, projects: projectStats}) : projectStats?.slice(0, limit) const result = { sections, @@ -50,7 +50,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal } } -async function pickOnlyGithubPublicRepos({projects, axios, login, limit}) { +async function pickOnlyGitHubPublicRepos({projects, axios, login, limit}) { const result = [] for await (const project of projects) { diff --git a/source/templates/markdown/README.md b/source/templates/markdown/README.md index e2e5fab2..ac565ece 100644 --- a/source/templates/markdown/README.md +++ b/source/templates/markdown/README.md @@ -32,7 +32,7 @@ Since the resulting output is a markdown file, it is possible to do additional f The templating engine is [EJS](https://github.com/mde/ejs) and can be used to interpolate any data retrieved by metrics. * `<%=` and `%>` are used to display escaped output - * `{{` and `}}` is also supported as syntaxic sugar + * `{{` and `}}` is also supported as syntactic sugar * `<%-` and `%>` are used to display raw output * `<%` and `%>` are used to execute JavaScript, and can also contains control statements such as conditionals and loops diff --git a/tests/cases/habits.plugin.yml b/tests/cases/habits.plugin.yml index d106be66..924e9ad6 100644 --- a/tests/cases/habits.plugin.yml +++ b/tests/cases/habits.plugin.yml @@ -1,4 +1,4 @@ -- name: 💡 Coding habits and activity - Midly interesting facts +- name: 💡 Coding habits and activity - Mildly interesting facts uses: lowlighter/metrics@latest with: token: MOCKED_TOKEN diff --git a/tests/cases/pagespeed.plugin.yml b/tests/cases/pagespeed.plugin.yml index 19bf279b..19e9528d 100644 --- a/tests/cases/pagespeed.plugin.yml +++ b/tests/cases/pagespeed.plugin.yml @@ -1,4 +1,4 @@ -- name: ⏱️ Google PageSpeed - Succint report +- name: ⏱️ Google PageSpeed - Succinct report uses: lowlighter/metrics@latest with: token: NOT_NEEDED @@ -27,7 +27,7 @@ plugin_pagespeed_url: https://lecoq.io use_mocked_data: 'yes' verify: 'yes' -- name: ⏱️ Google PageSpeed - Succint report with PWA +- name: ⏱️ Google PageSpeed - Succinct report with PWA uses: lowlighter/metrics@latest with: token: NOT_NEEDED diff --git a/tests/ci.test.js b/tests/ci.test.js index a41ae2af..5bce071b 100644 --- a/tests/ci.test.js +++ b/tests/ci.test.js @@ -5,8 +5,8 @@ const git = require("simple-git")(path.join(__dirname, "..")) //Edited files list const diff = async () => (await git.diff(["origin/master...", "--name-status"])).split("\n").map(x => x.trim()).filter(x => /^M\s+/.test(x)).map(x => x.replace(/^M\s+/, "")) -//Files editions -describe("Check files editions (checkout your files if needed)", () => { +//File changes +describe("Check file changes (checkout your files if needed)", () => { describe("Auto-generated files were not modified", () => void test.each([ "README.md", @@ -42,7 +42,7 @@ describe("Check files editions (checkout your files if needed)", () => { } }) -//Templates editions -describe("Check templates editions", () => { +//Template changes +describe("Check template changes", () => { test("Use community templates instead (see https://github.com/lowlighter/metrics/tree/master/source/templates/community)", async () => void expect((await diff()).filter(edited => /^sources[/]templates[/]/.test(edited) && /^source[/]templates[/](?:classic|terminal|markdown|repository|community)[/][\s\S]*$/.test(edited)).length).toBe(0)) }) diff --git a/tests/metrics.test.js b/tests/metrics.test.js index 9f8c3ada..fa149118 100644 --- a/tests/metrics.test.js +++ b/tests/metrics.test.js @@ -8,7 +8,7 @@ const axios = require("axios") const faker = require("@faker-js/faker").faker const ejs = require("ejs") -//Github action +//GitHub action const action = yaml.load(fs.readFileSync(path.join(__dirname, "../action.yml"), "utf8")) action.defaults = Object.fromEntries(Object.entries(action.inputs).map(([key, {default: value}]) => [key, value])) action.input = vars => Object.fromEntries([...Object.entries(action.defaults), ...Object.entries(vars)].map(([key, value]) => [`INPUT_${key.toLocaleUpperCase()}`, value])) diff --git a/tests/mocks/api/github/graphql/repositories.random.mjs b/tests/mocks/api/github/graphql/repositories.random.mjs index 5e9c96b7..091c56ff 100644 --- a/tests/mocks/api/github/graphql/repositories.random.mjs +++ b/tests/mocks/api/github/graphql/repositories.random.mjs @@ -1,6 +1,6 @@ /**Mocked data */ export default function({faker, query, login = faker.internet.userName()}) { - console.debug("metrics/compute/mocks > mocking graphql api result > repositories/randodm") + console.debug("metrics/compute/mocks > mocking graphql api result > repositories/random") return ({ user: { repositories: {