pgxn / pgxn-manager

Interface for managing extensions on PGXN
http://pgxn.org
46 stars 18 forks source link

Add Badges to the META.json #48

Open theory opened 9 years ago

theory commented 9 years ago

Add a section to the resources section of the meta spec to allow specification of badges. Perhaps we'd have a whitelist of badges to display on the site, such as those for Travis, GitHub, Coveralls, and badge.fury.io. It might look something like this:

"badges": {
    "travis": {
        "img": "https://travis-ci.org/theory/pgtap.png",
        "link": "https://travis-ci.org/theory/pgtap"
    },
    "coveralls": {
        "img": "https://coveralls.io/repos/theory/sqitch/badge.svg",
        "link": "https://coveralls.io/r/theory/sqitch"
    }
}
theory commented 9 years ago

Or perhaps:

"badges": [
    {
        "name": "travis",
        "img": "https://travis-ci.org/theory/pgtap.png",
        "link": "https://travis-ci.org/theory/pgtap"
    },
    {
        "name": "coveralls",
        "img": "https://coveralls.io/repos/theory/sqitch/badge.svg",
        "link": "https://coveralls.io/r/theory/sqitch"
    }
]
decibel commented 9 years ago

Perhaps we shouldn't accept full URLs. We should already know that a travis badge is at travis-ci.org, for example. This way people couldn't just push random links up to the site.

theory commented 9 years ago

My thought is to let them put in whatever they want, but the site will only display those from know domains.

decibel commented 9 years ago

That works too. Would be good to sanity-check on upload too.

theory commented 9 years ago

How about this?

"badges": {
  "travis": "theory/pgtap",
  "coveralls": "theory/pgtap"
}

What other badges might people want?