Skip to content

Commit f5d3883

Browse files
authored
Replace all instances of "categorie" with "category" (lowlighter#340)
1 parent 8efbc75 commit f5d3883

File tree

42 files changed

+50
-50
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+50
-50
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion

source/app/metrics/metadata.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default async function metadata({log = true} = {}) {
3030
}
3131
//Reorder keys
3232
const {base, core, ...plugins} = Plugins //eslint-disable-line no-unused-vars
33-
Plugins = Object.fromEntries(Object.entries(Plugins).sort(([_an, a], [_bn, b]) => a.categorie === b.categorie ? (a.index ?? Infinity) - (b.index ?? Infinity) : categories.indexOf(a.categorie) - categories.indexOf(b.categorie)))
33+
Plugins = Object.fromEntries(Object.entries(Plugins).sort(([_an, a], [_bn, b]) => a.category === b.category ? (a.index ?? Infinity) - (b.index ?? Infinity) : categories.indexOf(a.category) - categories.indexOf(b.category)))
3434
logger(`metrics/metadata > loaded [${Object.keys(Plugins).join(", ")}]`)
3535
//Load templates metadata
3636
let Templates = {}
@@ -64,9 +64,9 @@ metadata.plugin = async function({__plugins, name, logger}) {
6464
const raw = `${await fs.promises.readFile(path.join(__plugins, name, "metadata.yml"), "utf-8")}`
6565
const {inputs, ...meta} = yaml.load(raw)
6666

67-
//Categorie
68-
if (!categories.includes(meta.categorie))
69-
meta.categorie = "other"
67+
//category
68+
if (!categories.includes(meta.category))
69+
meta.category = "other"
7070

7171
//Inputs parser
7272
{

source/app/web/instance.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ export default async function({mock, nosettings} = {}) {
8181
const limiter = ratelimit({max:debug ? Number.MAX_SAFE_INTEGER : 60, windowMs:60 * 1000, headers:false})
8282
const metadata = Object.fromEntries(
8383
Object.entries(conf.metadata.plugins)
84-
.map(([key, value]) => [key, Object.fromEntries(Object.entries(value).filter(([key]) => ["name", "icon", "categorie", "web", "supports"].includes(key)))])
84+
.map(([key, value]) => [key, Object.fromEntries(Object.entries(value).filter(([key]) => ["name", "icon", "category", "web", "supports"].includes(key)))])
8585
.map(([key, value]) => [key, key === "core" ? {...value, web:Object.fromEntries(Object.entries(value.web).filter(([key]) => /^config[.]/.test(key)).map(([key, value]) => [key.replace(/^config[.]/, ""), value]))} : value]),
8686
)
87-
const enabled = Object.entries(metadata).filter(([_name, {categorie}]) => categorie !== "core").map(([name]) => ({name, enabled:plugins[name]?.enabled ?? false}))
87+
const enabled = Object.entries(metadata).filter(([_name, {category}]) => category !== "core").map(([name]) => ({name, enabled:plugins[name]?.enabled ?? false}))
8888
const templates = Object.entries(Templates).map(([name]) => ({name, enabled:(conf.settings.templates.enabled.length ? conf.settings.templates.enabled.includes(name) : true) ?? false}))
8989
const actions = {flush:new Map()}
9090
let requests = {limit:0, used:0, remaining:0, reset:NaN}

source/plugins/achievements/metadata.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "🏆 Achievements"
22
cost: ~5 GraphQL request
3-
categorie: github
3+
category: github
44
index: 17
55
supports:
66
- user

source/plugins/activity/metadata.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "📰 Recent activity"
22
cost: 1 REST request per 100 events
3-
categorie: github
3+
category: github
44
index: 16
55
supports:
66
- user

source/plugins/anilist/metadata.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "🌸 Anilist watch list and reading list"
22
cost: N/A
3-
categorie: social
3+
category: social
44
index: 4
55
supports:
66
- user

source/plugins/base/metadata.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "🗃️ Base content"
22
cost: 2 GraphQL requests + 1 GraphQL request per 100 repositories fetched
3-
categorie: core
3+
category: core
44
supports:
55
- user
66
- organization

source/plugins/contributors/metadata.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "🏅 Repository contributors"
22
cost: N/A
3-
categorie: github
3+
category: github
44
index: 5
55
supports:
66
- repository

source/plugins/core/metadata.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "🧱 Core"
22
cost: N/A
3-
categorie: core
3+
category: core
44
supports:
55
- user
66
- organization

source/plugins/followup/metadata.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "🎟️ Follow-up of issues and pull requests"
22
cost: 0 API request (1 GraphQL request if "user" section is enabled)
3-
categorie: github
3+
category: github
44
index: 11
55
supports:
66
- user
@@ -22,4 +22,4 @@ inputs:
2222
default: repositories
2323
values:
2424
- repositories # Overall status of issues and pull requests on your repositories
25-
- user # Overall status of issues and pull requests you have created on GitHub
25+
- user # Overall status of issues and pull requests you have created on GitHub

0 commit comments

Comments
 (0)