Git Product home page Git Product logo

gitlab-badges's Introduction

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 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

📑 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.

gitlab-badges's People

Contributors

dependabot[bot] avatar depfu[bot] avatar github-actions[bot] avatar sebbo2002 avatar semantic-release-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.