badges / badges/shields

Allow embedding endpoint badges into the frontend

Open
#2,904 9 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
27.2k
Forks
5.6k
Avg merge
1d 8h
Merged PRs (30d)
46

Description

## Motivation

The endpoint badge #2838 allows implementing the api-to-badge conversion logic in different locations without need to modify or add shields.io services. This leads to a possible diversification and emergence of new badges, which should be faster than badges added directly to shields.io source.

## Context

In order to provide an endpoint badge, one "only" needs to create an API as specified in https://shields.io/#/endpoint.
However, to make this badge usable by other people, one as developer would like to provide the same template functionality as shields.io does, such as `https://img.shields.io/appveyor/ci/:user/:repo.svg` when you click on a badge at https://shields.io
Example: http://transifex.quelltext.eu/

## Problem

Each new endpoint wants to provide configurable badges.
Currently, the endpoint badge only allows using your endpoint.
Configuration needs to be done manually by users or as crappy as on https://transifex.quelltext.eu

## Possible Solution

A possible solution to this would be

- A way of including endpoint badges into the shields.io frontend.
- [ ] using multiple URLs for services in case of some going down (using just the first one is sufficient)
- [ ] a reference to the endpoint's repository can be included so that we can track if something goes wrong and other people can do a set-up if needed.
- [ ] customization of the endpoint's url (not the shields url using ?url=...) in the frontend
- [ ] adding all this information as JSON, no coding required.
- [ ] A documentation of how to achieve this
- [ ] located in https://shields.io/#/endpoint or /docs?

## Relevance

As stated earlier, I believe that in the future, more badges will exist using the endpoint API than the shields.io implementation. As such, it would be good, if shields.io is still the place to go to find these badges, sparing the badge users the hassle of different template engines.

Related:
- https://github.com/badges/shields/issues/2838#issuecomment-458657152

Contributor guide

Open the contributing guide

Research direction

Start with the endpoint specification at shields.io/#/endpoint and inspect the existing shields.io frontend flow for badge templates. Clarify the JSON format and how it should represent endpoint URLs, repository references, and configurable URLs; done means endpoint providers can expose configurable badges through the frontend and the setup is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.