Skip to content

Commit d877885

Browse files
feat: add githubContributions (#44)
1 parent 22f0f11 commit d877885

3 files changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/scheduler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ jobs:
6161
echo "CONTRIBKIT_GITHUB_CONTRIBUTORS_LOGIN=${{ github.repository_owner }}"
6262
} >> ./configs/github/.env
6363
64+
# github contributions
65+
{
66+
echo "CONTRIBKIT_GITHUB_CONTRIBUTIONS_TOKEN=${{ secrets.GH_BOT_TOKEN }}"
67+
} >> ./configs/githubContributions/.env
68+
6469
- name: Setup dist
6570
run: |
6671
# empty dist directory

build.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ crowdin_projects=(
1212
614257
1313
)
1414

15+
github_accounts=(
16+
"ReenigneArcher"
17+
)
18+
1519
output_dir="$(pwd)/dist"
1620

1721
echo "Building sponsors..."
@@ -31,6 +35,15 @@ for repo in "${repos[@]}"; do
3135
done
3236
popd || exit 1
3337

38+
echo "Building GitHub contributions..."
39+
pushd configs/githubContributions || exit 1
40+
for account in "${github_accounts[@]}"; do
41+
echo "Building GitHub contributions for account ${account}..."
42+
export CONTRIBKIT_GITHUB_CONTRIBUTIONS_LOGIN="${account}"
43+
npx contribkit --outputDir="${output_dir}" --name="githubContributions.${account}" --force
44+
done
45+
popd || exit 1
46+
3447
echo "Building CrowdIn contributors..."
3548
pushd configs/crowdin || exit 1
3649
for project in "${crowdin_projects[@]}"; do
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { defineConfig, tierPresets } from '@lizardbyte/contribkit'
2+
3+
export default defineConfig({
4+
githubContributions: {
5+
login: process.env.CONTRIBKIT_GITHUB_CONTRIBUTIONS_LOGIN,
6+
token: process.env.CONTRIBKIT_GITHUB_CONTRIBUTIONS_TOKEN,
7+
logarithmicScaling: false,
8+
maxContributions: 100,
9+
},
10+
renderer: 'circles',
11+
width: 1000,
12+
circles: {
13+
radiusMax: 100,
14+
radiusMin: 1,
15+
radiusPast: 1,
16+
},
17+
tiers: [
18+
{
19+
title: 'Repo',
20+
preset: tierPresets.base,
21+
},
22+
],
23+
})

0 commit comments

Comments
 (0)