Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/readme/partials/documentation/setup/action.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ There are several *metrics* versions that can be used in workflows:

### 3️.2️ Configure *metrics*

Read [documentation](/README.md#-documentation) for more informations about configuration.
Read [documentation](/README.md#-documentation) for more information about configuration.
It is advised to start with [`🧱 core`](/source/plugins/core/README.md) plugin documentation.

It is also possible to use [metrics.lecoq.io](https://metrics.lecoq.io) to play with configuration options, preview renders and finally copy the auto-generated workflow code.
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: Continuous integration

on:
push:
branches: [master]
branches: [ master ]
workflow_dispatch:

jobs:

# Build, test and analyze
build-test-analyze:
name: Build, test and analyze
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
pull_request:
branches: [ master ]
workflow_call:
workflow_dispatch:

jobs:

Expand All @@ -25,8 +26,6 @@ jobs:
run: npm ci
- name: Check contributions requirements
run: npm run test-contrib
env:
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
- name: Run linter
run: npm run linter

Expand Down
14 changes: 6 additions & 8 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ Before working on something, ensure that it will not duplicate any active open p

It is advised to open a [`💬 discussion`](https://github.com/gh-metrics/metrics/discussions) first to gather feedback about new features.

> ⚠️ To avoid an ever-growing backlog, inactive pull requests will be closed after 3 weeks and locked after 5 weeks.

> 😅 Be positive! Even if your changes don't get merged in [gh-metrics/metrics](https://github.com/gh-metrics/metrics), please don't be too sad, you will always be able to run workflows directly from your fork!

## 🤝 Accepted contributions
Expand Down Expand Up @@ -70,21 +68,21 @@ The following contributions are accepted:
<tr>
<td nowrap="nowrap">🧱 Core</td>
<td>✓</td>
<td></td>
<td></td>
<td>
<ul>
<li>Core changes impact all rendering process and should be avoided unless necessary</li>
<li>New dependencies should be avoided when possible</li>
<li>Core changes impact all rendering process, so extra care is needed</li>
<li>New dependencies should be avoided unless necessary</li>
</ul>
</td>
</tr>
<tr>
<td nowrap="nowrap">🗃️ Repository</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>
<ul>
<li>Workflows, license, readmes, etc. usually don't need to be edited</li>
<li>Workflows, license, readmes, etc. usually don't need to be edited often</li>
</ul>
</td>
</tr>
Expand Down
8 changes: 4 additions & 4 deletions source/app/action/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ function quit(reason) {
//See https://github.blog/2021-04-05-behind-githubs-new-authentication-token-formats
info("GitHub token format", /^github_pat_/.test(token) ? "fine-grained" : /^gh[pousr]_/.test(token) ? "classic" : "legacy or invalid")
if (!token)
throw new Error("You must provide a valid GitHub personal token to gather your metrics (see https://github.com/gh-metrics/metrics/blob/master/.github/readme/partials/documentation/setup/action.md for more informations)")
throw new Error("You must provide a valid GitHub personal token to gather your metrics (see https://github.com/gh-metrics/metrics/blob/master/.github/readme/partials/documentation/setup/action.md for more information)")
if (/^github_pat_/.test(token))
throw new Error("It seems you're trying to use a fine-grained personal access token. These are currently unsupported as GitHub does not support them (yet?) for GraphQL API authentication (see https://docs.github.com/fr/graphql/guides/forming-calls-with-graphql#authenticating-with-graphql for more informations). Use a classic token instead.")
throw new Error("It seems you're trying to use a fine-grained personal access token. These are currently unsupported as GitHub does not support them (yet?) for GraphQL API authentication (see https://docs.github.com/fr/graphql/guides/forming-calls-with-graphql#authenticating-with-graphql for more information). Use a classic token instead.")
conf.settings.token = token
const api = {}
const resources = {}
Expand Down Expand Up @@ -216,7 +216,7 @@ function quit(reason) {
const {headers} = await api.rest.request("HEAD /")
if (!("x-oauth-scopes" in headers)) {
throw new Error(
'GitHub API did not send any "x-oauth-scopes" header back from provided "token". It means that your token may not be valid or you\'re using GITHUB_TOKEN which cannot be used since metrics will fetch data outside of this repository scope. Use a personal access token instead (see https://github.com/gh-metrics/metrics/blob/master/.github/readme/partials/documentation/setup/action.md for more informations).',
'GitHub API did not send any "x-oauth-scopes" header back from provided "token". It means that your token may not be valid or you\'re using GITHUB_TOKEN which cannot be used since metrics will fetch data outside of this repository scope. Use a personal access token instead (see https://github.com/gh-metrics/metrics/blob/master/.github/readme/partials/documentation/setup/action.md for more information).',
)
}
info("Token validity", "seems ok")
Expand Down Expand Up @@ -258,7 +258,7 @@ function quit(reason) {
//Committer
const committer = {}
if ((!dryrun) && (_action !== "none")) {
//Compute committer informations
//Compute committer information
committer.token = _token || token
committer.gist = _action === "gist" ? _gist : null
committer.commit = true
Expand Down
2 changes: 1 addition & 1 deletion source/app/web/statics/embed/app.placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
}
//Placeholder function
globalThis.placeholder = async function(set) {
//Load templates informations
//Load templates information
let {image, style, fonts, partials} = await load(`/.templates/${set.templates.selected}`)
await Promise.all(partials.map(async partial => await load(`/.templates/${set.templates.selected}/partials/${escape(partial)}.ejs`)))
//Trap includes
Expand Down
4 changes: 2 additions & 2 deletions source/plugins/community/splatoon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ Requires <a href="/source/plugins/community/splatoon/README.md#plugin_splatoon_s
<td rowspan="2"><p>Source</p>
<ul>
<li><code>splatnet</code> will fetch data from Splatnet using <a href="https://github.com/spacemeowx2/s3si.ts">spacemeowx2/s3si.ts</a> tool</li>
<li><code>local</code> will assume <code>s3si/export</code> directory already exists and is populated (use this when developping new features for this plugin to save network resources and time)</li>
<li><code>mocks</code> will use <code>s3si/mocks</code> directory (use this when developping new features for this plugin to avoid setting up a NSO token)</li>
<li><code>local</code> will assume <code>s3si/export</code> directory already exists and is populated (use this when developing new features for this plugin to save network resources and time)</li>
<li><code>mocks</code> will use <code>s3si/mocks</code> directory (use this when developing new features for this plugin to avoid setting up a NSO token)</li>
</ul>
<img width="900" height="1" alt=""></td>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions source/plugins/community/splatoon/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ inputs:
Source

- `splatnet` will fetch data from Splatnet using [spacemeowx2/s3si.ts](https://github.com/spacemeowx2/s3si.ts) tool
- `local` will assume `s3si/export` directory already exists and is populated (use this when developping new features for this plugin to save network resources and time)
- `mocks` will use `s3si/mocks` directory (use this when developping new features for this plugin to avoid setting up a NSO token)
- `local` will assume `s3si/export` directory already exists and is populated (use this when developing new features for this plugin to save network resources and time)
- `mocks` will use `s3si/mocks` directory (use this when developing new features for this plugin to avoid setting up a NSO token)
type: string
default: splatnet
values:
Expand Down
2 changes: 1 addition & 1 deletion source/plugins/community/stock/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default async function({login, q, imports, data, account}, {enabled = fal
throw {error: {message: "Company stock symbol is not set"}}
symbol = symbol.toLocaleUpperCase()

//Query API for company informations
//Query API for company information
console.debug(`metrics/compute/${login}/plugins > stock > querying api for company`)
const {data: {quoteType: {shortName: company} = {shortName: symbol}}} = await imports.axios.get("https://yh-finance.p.rapidapi.com/stock/v2/get-profile", {
params: {symbol, region: "US"},
Expand Down
6 changes: 3 additions & 3 deletions source/plugins/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ When doing so, any settings which defaults on user fetched values will not be te
<tr>
<td nowrap="nowrap"><h4><code>repo</code></h4></td>
<td rowspan="2"><p>GitHub repository</p>
<p>This option is only revelant for repositories templates</p>
<p>This option is only relevant for repositories templates</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
Expand Down Expand Up @@ -617,7 +617,7 @@ When doing so, any settings which defaults on user fetched values will not be te
<li><code>data-changed</code>: skip changes if no data changed (e.g. like when only metadata changed)</li>
</ul>
<blockquote>
<p>ℹ️ This option is only revelant when <a href="/source/plugins/core/README.md#config_output"><code>config_output: svg</code></a> is set</p>
<p>ℹ️ This option is only relevant when <a href="/source/plugins/core/README.md#config_output"><code>config_output: svg</code></a> is set</p>
</blockquote>
<img width="900" height="1" alt=""></td>
</tr>
Expand Down Expand Up @@ -650,7 +650,7 @@ When doing so, any settings which defaults on user fetched values will not be te
<tr>
<td nowrap="nowrap"><h4><code>setup_community_templates</code></h4></td>
<td rowspan="2"><p>Community templates to setup</p>
<p>See <a href="https://github.com/gh-metrics/metrics/blob/master/source/templates/community/README.md">community templates guide</a> for more informations</p>
<p>See <a href="https://github.com/gh-metrics/metrics/blob/master/source/templates/community/README.md">community templates guide</a> for more information</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
Expand Down
6 changes: 3 additions & 3 deletions source/plugins/core/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ inputs:
description: |
GitHub repository

This option is only revelant for repositories templates
This option is only relevant for repositories templates
type: string
default: ""
preset: no
Expand Down Expand Up @@ -125,7 +125,7 @@ inputs:
- `always`: always try to push changes
- `data-changed`: skip changes if no data changed (e.g. like when only metadata changed)

> ℹ️ This option is only revelant when [`config_output: svg`](/source/plugins/core/README.md#config_output) is set
> ℹ️ This option is only relevant when [`config_output: svg`](/source/plugins/core/README.md#config_output) is set
type: string
default: always
values:
Expand All @@ -152,7 +152,7 @@ inputs:
description: |
Community templates to setup

See [community templates guide](https://github.com/gh-metrics/metrics/blob/master/source/templates/community/README.md) for more informations
See [community templates guide](https://github.com/gh-metrics/metrics/blob/master/source/templates/community/README.md) for more information
type: array
format: comma-separated
default: ""
Expand Down
2 changes: 1 addition & 1 deletion source/plugins/languages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ It will fetch a specified amount of recent push events and perform linguistic an

> 🌐 Web instances must enable this feature in `settings.json`

## 🥽 Controling which languages are displayed
## 🥽 Controlling which languages are displayed

Several options lets you customize which languages should be displayed.
It is possible to ignore completely languages or those lower than a given threshold, skip repositories, and filter by language categories.
Expand Down
2 changes: 1 addition & 1 deletion source/plugins/languages/analyzer/analyzer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import core from "@actions/core"
export class Analyzer {
/**Constructor */
constructor(login, {account = "bypass", authoring = [], uid = Math.random(), shell, rest = null, context = {mode: "user"}, skipped = [], categories = ["programming", "markup"], timeout = {global: NaN, repositories: NaN}}) {
//User informations
//User information
this.login = login
this.account = account
this.authoring = authoring
Expand Down
2 changes: 1 addition & 1 deletion source/plugins/leetcode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ All product and company names are trademarks™ or registered® trademarks of th
<tr>
<td nowrap="nowrap"><h4><code>plugin_leetcode_ignored_skills</code></h4></td>
<td rowspan="2"><p>Ignored skills</p>
<p>It is possible to ignore entires categories by passing <code>fundamental</code>, <code>intermediate</code> or <code>advanced</code></p>
<p>It is possible to ignore entire categories by passing <code>fundamental</code>, <code>intermediate</code> or <code>advanced</code></p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion source/plugins/leetcode/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ inputs:
description: |
Ignored skills

It is possible to ignore entires categories by passing `fundamental`, `intermediate` or `advanced`
It is possible to ignore entire categories by passing `fundamental`, `intermediate` or `advanced`
type: array
default: ""
example: hash table, string, divide and conquer, fundamental
Expand Down
2 changes: 1 addition & 1 deletion source/plugins/licenses/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<table>
<tr><td colspan="2"><a href="/README.md#-plugins">← Back to plugins index</a></td></tr>
<tr><th colspan="2"><h3>📜 Repository licenses</h3></th></tr>
<tr><td colspan="2" align="center"><p>This plugin display repository license informations like permissions, limitations and conditions along with additional stats about dependencies.</p>
<tr><td colspan="2" align="center"><p>This plugin display repository license information like permissions, limitations and conditions along with additional stats about dependencies.</p>
</td></tr>
<tr><th>⚠️ Disclaimer</th><td><p>This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with <a href="https://github.com">GitHub</a>.
All product and company names are trademarks™ or registered® trademarks of their respective holders.</p>
Expand Down
2 changes: 1 addition & 1 deletion source/plugins/licenses/metadata.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 📜 Repository licenses
category: github
description: |
This plugin display repository license informations like permissions, limitations and conditions along with additional stats about dependencies.
This plugin display repository license information like permissions, limitations and conditions along with additional stats about dependencies.
notes: |
> ⚠️ This is **NOT** legal advice, use at your own risk

Expand Down
2 changes: 1 addition & 1 deletion source/plugins/music/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 recursively
//get all objects that have the given key name, recursively
function get_all_with_key(obj, key) {
const result = []
if (obj instanceof Object) {
Expand Down
4 changes: 2 additions & 2 deletions source/plugins/pagespeed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<tr><td colspan="2"><a href="/README.md#-plugins">← Back to plugins index</a></td></tr>
<tr><th colspan="2"><h3>⏱️ Google PageSpeed</h3></th></tr>
<tr><td colspan="2" align="center"><p>This plugin displays performance statistics of a website.</p>
<p>It uses <a href="https://developers.google.com/speed/docs/insights/v5/get-started">Google&#39;s PageSpeed API</a> (same as <a href="https://web.dev">web.dev</a>), see <a href="https://web.dev/performance-scoring/">performance scoring</a> and <a href="https://googlechrome.github.io/lighthouse/scorecalc/">score calculator</a> for more informations about results.</p>
<p>It uses <a href="https://developers.google.com/speed/docs/insights/v5/get-started">Google&#39;s PageSpeed API</a> (same as <a href="https://web.dev">web.dev</a>), see <a href="https://web.dev/performance-scoring/">performance scoring</a> and <a href="https://googlechrome.github.io/lighthouse/scorecalc/">score calculator</a> for more information about results.</p>
</td></tr>
<tr><th>⚠️ Disclaimer</th><td><p>This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with <a href="https://pagespeed.web.dev/">Google PageSpeed</a>.
All product and company names are trademarks™ or registered® trademarks of their respective holders.</p>
Expand Down Expand Up @@ -51,7 +51,7 @@ All product and company names are trademarks™ or registered® trademarks of th
<td nowrap="nowrap"><h4><code>plugin_pagespeed_token</code></h4></td>
<td rowspan="2"><p>PageSpeed token</p>
<blockquote>
<p>⚠️ While not mandatory, it is strongly advised pass a token to avoid triggering the rate limiter. See <a href="https://developers.google.com/speed/docs/insights/v5/get-started">PageSpeed documentation</a> for more informations.</p>
<p>⚠️ While not mandatory, it is strongly advised pass a token to avoid triggering the rate limiter. See <a href="https://developers.google.com/speed/docs/insights/v5/get-started">PageSpeed documentation</a> for more information.</p>
</blockquote>
<img width="900" height="1" alt=""></td>
</tr>
Expand Down
4 changes: 2 additions & 2 deletions source/plugins/pagespeed/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ category: social
description: |
This plugin displays performance statistics of a website.

It uses [Google's PageSpeed API](https://developers.google.com/speed/docs/insights/v5/get-started) (same as [web.dev](https://web.dev)), see [performance scoring](https://web.dev/performance-scoring/) and [score calculator](https://googlechrome.github.io/lighthouse/scorecalc/) for more informations about results.
It uses [Google's PageSpeed API](https://developers.google.com/speed/docs/insights/v5/get-started) (same as [web.dev](https://web.dev)), see [performance scoring](https://web.dev/performance-scoring/) and [score calculator](https://googlechrome.github.io/lighthouse/scorecalc/) for more information about results.
disclaimer: |
This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with [Google PageSpeed](https://pagespeed.web.dev/).
All product and company names are trademarks™ or registered® trademarks of their respective holders.
Expand All @@ -29,7 +29,7 @@ inputs:
description: |
PageSpeed token

> ⚠️ While not mandatory, it is strongly advised pass a token to avoid triggering the rate limiter. See [PageSpeed documentation](https://developers.google.com/speed/docs/insights/v5/get-started) for more informations.
> ⚠️ While not mandatory, it is strongly advised pass a token to avoid triggering the rate limiter. See [PageSpeed documentation](https://developers.google.com/speed/docs/insights/v5/get-started) for more information.
type: token
default: ""
extras:
Expand Down
2 changes: 1 addition & 1 deletion source/plugins/projects/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ To enable it, open the `≡ Menu` from the project page and opt-in to `Track pro
To create a personal project, select the `Projects` tab from your profile:
![Create a new project](/.github/readme/imgs/plugin_projects_create.png)

Fill informations and set visibility to *public*:
Fill information and set visibility to *public*:
![Configure project](/.github/readme/imgs/plugin_projects_setup.png)

## 📓 Use repositories projects
Expand Down
2 changes: 1 addition & 1 deletion source/plugins/stargazers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ All product and company names are trademarks™ or registered® trademarks of th
## 🗝️ Obtaining a Google Maps API token

Some features like `plugin_stagazers_worldmap` require a Google Geocoding API token.
Follow instructions from their [documentation](https://developers.google.com/maps/documentation/geocoding/get-api-key) for more informations.
Follow instructions from their [documentation](https://developers.google.com/maps/documentation/geocoding/get-api-key) for more information.

> 💳 A billing account is required to get a token. However a recurring [monthly credit](https://developers.google.com/maps/billing-credits#monthly) is offered which means you should not be charged if you don't exceed the free quota.
>
Expand Down
Loading
Loading