cf worker to merge heatmaps from github or any forgejo instance
Go to file
Clove 1d3a9eac91
add account id
2026-06-14 17:09:13 +02:00
src Update to doughmination fork 2026-06-13 10:38:30 +01:00
.editorconfig init 2026-06-13 14:06:38 +05:30
.gitignore init 2026-06-13 14:06:38 +05:30
.ignore init 2026-06-13 14:06:38 +05:30
.prettierrc init 2026-06-13 14:06:38 +05:30
README.md update readme and make it extensible 2026-06-13 14:30:53 +05:30
package.json init 2026-06-13 14:06:38 +05:30
pnpm-lock.yaml init 2026-06-13 14:06:38 +05:30
pnpm-workspace.yaml init 2026-06-13 14:06:38 +05:30
tsconfig.json init 2026-06-13 14:06:38 +05:30
worker-configuration.d.ts init 2026-06-13 14:06:38 +05:30
wrangler.jsonc add account id 2026-06-14 17:09:13 +02:00

README.md

contribapi

tiny extensible api to merge contribution heatmap from forgejo (git.gay, codeberg, etc) and github.

usage

this runs as a cloudflare worker

configuration

for testing, put these variables in .dev.vars. in production you will need to use wrangler to update worker secrets with this command:

pnpx wrangler secret put <name>
# it will prompt you for value

1. codeberg

codeberg (or forgejo in general) do not need api keys to get user heatmap.

CODEBERG_USERNAME=dragsbruh

2. github

github needs an api key. i recommend you use a fine grained personal access token with access to commit statuses of all repos.

https://github.com/settings/personal-access-tokens

GITHUB_USERNAME=dragsbruh
GITHUB_TOKEN=github_pat_xxxxxxxxxx

other forgejo instances

ill use git.gay in this example

  • copy src/forgejo.example.ts to, src/gitdotgay.ts
  • read comments in src/gitdotgay.ts and change as described, its like 4 changes
  • read queryForges function in src/index.ts and add your query function as shown

to remove github/etc, its the same, you just remove queryGithub

deploying

pnpm deploy