tiny extensible api to merge contribution heatmap from forgejo (git.gay, codeberg, etc) and github.
Important
This repo is NOT by me, this is works by dragsbruh, and you can find the original repo on Codeberg. I originally made edits so I could keep up with it, but I still want the original owner attributed
Note
I did add a copy of ESAL-2.0 in commits, but this was an accident due to updating all my repos at once. Please ignore this in the commit history, it was not intentional.
this runs as a cloudflare worker
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 value1. codeberg
codeberg (or forgejo in general) do not need api keys to get user heatmap.
CODEBERG_USERNAME=doughmination2. 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=doughmination
GITHUB_TOKEN=github_pat_xxxxxxxxxxother forgejo instances
ill use git.gay in this example
- copy
src/forgejo.example.tsto,src/gitdotgay.ts - read comments in
src/gitdotgay.tsand change as described, its like 4 changes - read
queryForgesfunction insrc/index.tsand add your query function as shown
to remove github/etc, its the same, you just remove queryGithub
pnpm deploy