Watch
1
0
Fork
You've already forked contribmap
0
mirror of https://github.com/fledra/contribmap.git synced 2026-12-04 04:20:29 +03:00
Merge contribution heatmaps from multiple software forges
  • TypeScript 85.9%
  • Vue 12.9%
  • JavaScript 0.7%
  • CSS 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-06-08 04:25:37 +03:00
.husky initial commit 2025-12-04 22:26:24 +03:00
.vscode added config schema and loader 2026-01-17 19:09:06 +03:00
app made getHeatmapRange always utc based 2026-06-08 04:25:37 +03:00
public added an optional name field to forge schema 2026-01-25 03:13:05 +03:00
server made getHeatmapRange always utc based 2026-06-08 04:25:37 +03:00
shared made getHeatmapRange always utc based 2026-06-08 04:25:37 +03:00
.gitignore added contribmap config files to gitignore 2026-01-25 00:45:22 +03:00
.lintstagedrc fixed lint-staged linting whole codebase 2025-12-05 01:01:47 +03:00
.npmrc initial commit 2025-12-04 22:26:24 +03:00
eslint.config.mjs initial commit 2025-12-04 22:26:24 +03:00
LICENSE initial commit 2025-12-04 22:26:24 +03:00
nuxt.config.ts added experimental support for cloudflare pages env 2026-06-06 22:51:32 +03:00
package.json added typecheck script 2026-06-06 05:42:28 +03:00
pnpm-lock.yaml added typecheck script 2026-06-06 05:42:28 +03:00
pnpm-workspace.yaml updated dependencies 2026-06-06 05:34:11 +03:00
README.md added an optional name field to forge schema 2026-01-25 03:13:05 +03:00
tsconfig.json initial commit 2025-12-04 22:26:24 +03:00

contribmap icon

contribmap

contribmap is an app that pulls contribution activity from different software forges and merges them into a single calendar heatmap.

Configuration

contribmap requires a configuration file to function properly and automatically detects your configuration file in the project root.

To keep your account(s) secure, contribmap uses Indirect Token Mapping. This means you never put your actual API keys in your configuration files. Instead, you define them in your environment and reference the name of that variable in your configuration to tell the app which variable name to look for.

Configuration Methods

You can configure contribmap via (in order of precedence):

  • A CONTRIBMAP_CONFIG environment variable
  • A .contribmaprc file in JSON or YAML format
  • A contribmap.config.json file
  • A contribmap.config.yaml or contribmap.config.yml file

Configuration Format

Whether you use a file or the CONTRIBMAP_SOURCES environment variable, the data structure remains identical.

Schema

The configuration is an object where each key is a Profile Name. Each profile contains an array of Sources.

Field Type Description
name string? Optional display name to differentiate instances
forge string github, gitlab, gitlab-self, codeberg, forgejo, or gitea
username string Your username on the platform
token string The name of the environment variable that is holding your API token
baseUrl string Required for self-hosted instances (e.g. https://git.yourdomain.com)

A basic configuration would look like this:

// contribmap.config.json

{
  "default": [
    { "forge": "github", "username": "githubusername", "token": "GH_TOKEN" },
    { "forge": "gitlab", "username": "gitlabusername", "token": "GITLAB_TOKEN" }
  ]
}

OR

# contribmap.config.yaml

default:
  - forge: github
    username: githubusername
    token: GH_TOKEN

  - forge: gitlab
    username: gitlabusername
    token: GITLAB_TOKEN

Important

If you prefer to use the environment variable to configure contribmap, be sure that the value of this environment variable must be a valid JSON string that follows the exact same structure as a contribmap.config.json file.

Tip

You can fill a contribmap.config.json file and and use jq to easily generate a value for CONTRIBMAP_CONFIG environment variable:

jq -c . contribmap.config.json
Multi-profile configuration

You can define multiple profiles in your configuration:

// contribmap.config.json

{
  "$schema": "./public/schema.json",
  "default": [
    {
      "forge": "github",
      "username": "githubusername",
      "token": "GH_TOKEN"
    },
    {
      "forge": "gitlab",
      "username": "gitlabusername",
      "token": "GITLAB_TOKEN"
    }
  ],
  "work": [
    {
      "forge": "github",
      "username": "githubusername",
      "token": "GH_TOKEN"
    },
    {
      "forge": "gitlab-self",
      "username": "yourusername",
      "token": "WORK_GITLAB_TOKEN",
      "baseURL": "https://git.yourcompany.com"
    }
  ]
  // ...other profiles
}

OR

# contribmap.config.yaml

default:
  - forge: github
    username: githubusername
    token: GH_TOKEN

  - forge: gitlab
    username: gitlabusername
    token: GITLAB_TOKEN

work:
  - forge: github
    username: githubusername
    token: GH_TOKEN

  - forge: gitlab-self
    username: yourusername
    token: WORK_GITLAB_TOKEN
    baseURL: https://git.yourcompany.com

# ...other profiles

License

Copyright (C) 2025-PRESENT Baran D. (Fledra)

Licensed under GNU Affero General Public License as stated in the LICENSE:

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.