shields icon indicating copy to clipboard operation
shields copied to clipboard

Badge Request: GitLab tags and releases

Open svoop opened this issue 6 years ago • 4 comments

Similar to GitHub badges, it would be nice to have GitLab badges for tags and releases as well. Both tags and releases are available for public repos from the GitLab API without authentication, examples:

curl -v 'https://gitlab.com/api/v4/projects/gitlab-org%2fgitlab-foss/repository/tags'
curl -v 'https://gitlab.com/api/v4/projects/gitlab-org%2fgitlab-foss/releases'

(I might have a go later this year, right now I'm a little overbooked due to COVID-19.)

svoop avatar Apr 04 '20 18:04 svoop

Thanks for offering to work on this.

It has been a while since anyone looked at GitLab badges, but I think one of the issues we hit in the past was the rate limits on the API. You've noted that a token is not required to access these endpoints for public repos, but presumably there are rate limits on anonymous access? Probably a good start would be to have a read over https://github.com/badges/shields/issues/541 to understand that history.

The reason we are able to provide badges for GitLab CI pipelines is because we can get the info for them without hitting their API.

chris48s avatar Apr 04 '20 19:04 chris48s

@chris48s Two quick thoughts:

  • A few days ago, gitlab.com has switched to Cloudflare which could have a positive impact on rate limits. Haven't checked this though.
  • For self-hosted GitLab, possible rate limits should be ignored. Either the server admins lift them or the repo users don't used the badges. Either way, admins and users often are part of the same organisation.

svoop avatar Apr 06 '20 08:04 svoop

I've started by creating a gitlab-tag service with GitLab tag (latest by date). This is the one I'm most interested in, but I'll get around to implementing the rest of them soon.

guillermin avatar Apr 16 '21 21:04 guillermin

Tag support went live earlier today, with the standard by-date/semver and pre-release filters as other similar badges. Release support should get added via #7021 in the hopefully not too distant future

calebcartwright avatar Sep 15 '21 01:09 calebcartwright