https://github.com/sebbo2002/gitlab-badges
It's like a very tiny shields.io (without website) for your private GitLab instance…
https://github.com/sebbo2002/gitlab-badges
Last synced: 6 months ago
JSON representation
It's like a very tiny shields.io (without website) for your private GitLab instance…
- Host: GitHub
- URL: https://github.com/sebbo2002/gitlab-badges
- Owner: sebbo2002
- License: mit
- Created: 2017-08-03T09:22:35.000Z (almost 9 years ago)
- Default Branch: develop
- Last Pushed: 2026-01-01T03:16:17.000Z (7 months ago)
- Last Synced: 2026-01-05T20:16:58.930Z (7 months ago)
- Language: TypeScript
- Size: 6.17 MB
- Stars: 38
- Watchers: 1
- Forks: 32
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# GitLab Badges
[](LICENSE)
This server acts like a very tiny shields.io to generate SVG badges for your private GitLab instance. Uses shield.io's [gh-badges](https://www.npmjs.com/package/gh-badges) to generate them.
## 📦 Installation
npm i -g @sebbo2002/gitlab-badges
gitlab-badges
# OR
docker run -e GITLAB_URL=https://gitlab.example.com -e GITLAB_TOKEN=**** sebbo2002/gitlab-badges
## 🔧 Configuration
Use environment variables to set login credentials and pushover tokens:
GITLAB_URL
GitLab URL (https://gitlab.example.com)
GITLAB_TOKEN
A private Token which is used to query the GitLab API
PORT
Port to listen to, default to 8888
BADGE_STYLE
Optional, allows to specify the used [badge style](http://shields.io/#styles)
MAX_CACHE_SIZE
Optional, to setup the living cache size, defaults to 50, set to 0 (zero) to disable the cache
## 📑 API
#### `/:projectId/:branch/build`
Generates a badge with the current build state of the latest commit in the given branch.
You'll find your project's ID in the GitLab project settings.
###### Example
```
https://gitlab-badges.example.com/1337/master/build
```
#### `/:projectId/:branch/coverage`
Generates a badge with the current build coverage of the latest commit in the given branch.
You'll find your project's ID in the GitLab project settings.
###### Example
```
https://gitlab-badges.example.com/1337/master/coverage
```
#### `/cache`
Returns all currently cached data as a JSON object.
#### `/ping`
Returns `pong`. Usually helpful to monitor the server in a very basic way.
## 🙆🏼♂️ Copyright and license
Copyright (c) Sebastian Pekarek under the [MIT license](LICENSE).