Skip to content

chore: Update contributors #1663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2024
Merged
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
5 changes: 0 additions & 5 deletions .changeset/gorgeous-people-smile.md

This file was deleted.

24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v2
node-version: 22
- uses: pnpm/action-setup@v4
with:
version: latest
- run: pnpm i
run_install: true
- run: pnpm run lint
test-node-versions:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 21]
node-version: [18, 20, 22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: latest
- run: pnpm i
run_install: true
- run: pnpm run build
- run: pnpm test
test-macos:
Expand All @@ -45,11 +45,11 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v2
node-version: 22
- uses: pnpm/action-setup@v4
with:
version: latest
- run: pnpm i
run_install: true
- run: pnpm run build
- run: pnpm test
test-windows:
Expand All @@ -58,10 +58,10 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v2
node-version: 22
- uses: pnpm/action-setup@v4
with:
version: latest
- run: pnpm i
run_install: true
- run: pnpm run build
- run: pnpm test
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: pnpm/action-setup@v2
node-version: 22
- uses: pnpm/action-setup@v4
with:
version: latest
- run: pnpm i
run_install: true
- run: pnpm run build
- uses: changesets/action@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion docs/data/contributors.json

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions docs/scripts/update-contributors.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const CONTRIBUTORS_JSON = new URL("../data/contributors.json", import.meta.url);

const contributors = JSON.parse(fs.readFileSync(CONTRIBUTORS_JSON, "utf8"));

const ONE_WEEK = 1000 * 60 * 60 * 24 * 7;
const ONE_MONTH = 1000 * 60 * 60 * 24 * 7 * 30;

async function fetchUserInfo(username) {
const res = await fetch(`https://github.com/${username}`, {
Expand Down Expand Up @@ -147,6 +147,9 @@ const OPENAPI_TS_CONTRIBUTORS = [
"JeanRemiDelteil",
"TzviPM",
"LucaSchwan",
"nzapponi",
"luchsamapparat",
"nmacmunn",
]),
];

Expand Down Expand Up @@ -186,7 +189,7 @@ async function main() {
for (const username of userlist) {
// skip profiles that have been updated within the past week
const { lastFetch } = contributors[repo].find((u) => u.username === username) ?? { lastFetch: 0 };
if (Date.now() - lastFetch < ONE_WEEK) {
if (Date.now() - lastFetch < ONE_MONTH) {
continue;
}

Expand All @@ -200,7 +203,8 @@ async function main() {
lastFetch: new Date().getTime(),
};
upsert(contributors[repo], userData);
console.log(`Updated old contributor data for ${username}`); // biome-disable-line no-console
// biome-ignore lint/suspicious/noConsoleLog: this is a script
console.log(`Updated old contributor data for ${username}`);
fs.writeFileSync(new URL("../data/contributors.json", import.meta.url), JSON.stringify(contributors)); // update file while fetching (sync happens safely in between fetches)
await new Promise((resolve) => setTimeout(resolve, 750)); // sleep to prevent 429
} catch (err) {
Expand Down
83 changes: 45 additions & 38 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading