Skip to content

Commit

Permalink
Update contributors of guides and API reference
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-hiller committed Dec 7, 2023
1 parent ae4ea35 commit 43fc20d
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 10 deletions.
21 changes: 13 additions & 8 deletions website/scripts/contributors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ dotenv.config({ path: '.env.local', override: true });
*/
const GITHUB_PERSONAL_ACCESS_TOKEN = process.env.GITHUB_PERSONAL_ACCESS_TOKEN;

const EXCLUDED_COMMITS = ['2cc351f6db7798cf60276225abcbacbc1ea491db'];

/**
* Finds all index files in the given directory.
*
Expand Down Expand Up @@ -89,6 +91,7 @@ async function updateContributors() {
if (response.status === 200) {
// Get commits from response
const commits = (await response.json()) as {
sha: string;
author: { login: string };
}[];

Expand All @@ -97,14 +100,16 @@ async function updateContributors() {

// Count commits of each author
for (const commit of commits) {
const author = commit.author.login;
const contributor = contributors.find(
(contributor) => contributor.author === commit.author.login
);
if (contributor) {
contributor.count++;
} else {
contributors.push({ author, count: 1 });
if (!EXCLUDED_COMMITS.includes(commit.sha)) {
const author = commit.author.login;
const contributor = contributors.find(
(contributor) => contributor.author === commit.author.login
);
if (contributor) {
contributor.count++;
} else {
contributors.push({ author, count: 1 });
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion website/src/routes/api/(schemas)/union/index.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: union
contributors:
- thundermiracle
- fabian-hiller
- thundermiracle
---

# union
Expand Down
2 changes: 2 additions & 0 deletions website/src/routes/api/(validations)/bic/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: bic
contributors:
- ariskemper
---

# bic
Expand Down
1 change: 1 addition & 0 deletions website/src/routes/api/(validations)/imei/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: IMEI
contributors:
- fabian-hiller
- Danielwinkelmann
---

Expand Down
2 changes: 2 additions & 0 deletions website/src/routes/api/(validations)/mac/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: mac
contributors:
- fabian-hiller
---

# mac
Expand Down
2 changes: 2 additions & 0 deletions website/src/routes/api/(validations)/mac48/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: mac48
contributors:
- ariskemper
---

# mac48
Expand Down
2 changes: 2 additions & 0 deletions website/src/routes/api/(validations)/mac64/index.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
title: mac64
contributors:
- ariskemper
---

# mac64
Expand Down
1 change: 1 addition & 0 deletions website/src/routes/api/(validations)/ulid/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: ulid
contributors:
- fabian-hiller
- jmcdo29
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: >-
Even though my API resembles other solutions at first glance, the
implementation and structure of the source code is very different.
contributors:
- nikolailehbrink
- fabian-hiller
- Neon-20
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ description: >-
This page is for you if you are a frameworks or library author and want to
integrate me or if you are looking for projects that support Valibot.
contributors:
- Saeris
- fabian-hiller
- Saeris
- gcornut
- IlyaSemenov
- jmcdo29
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >-
last optional argument to almost any schema function.
contributors:
- fabian-hiller
- ariskemper
- lo1tuma
- MariuzM
- yoshi2no
Expand Down

0 comments on commit 43fc20d

Please sign in to comment.