Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitLab tag (latest by date) #6388

Closed
guillermin opened this issue Apr 16, 2021 · 1 comment
Closed

GitLab tag (latest by date) #6388

guillermin opened this issue Apr 16, 2021 · 1 comment
Labels
service-badge New or updated service badge

Comments

@guillermin
Copy link

📋 Description

Exactly the same as the already existing "GitHub tag (latest by date)" badge, but for a GitLab.com repository.
e.g. "tag | v1.3.0"

🔗 Data

The data can be obtained from the public GitLab API (no key required). The call would be as follows:
https://gitlab.com/api/v4/projects/{user}%2F{repo}/repository/tags
(where {user} and {repo} should be replaced by their respective values)

The response is a JSON array that is by default sorted with the latest tag on top, so the value could be extracted as:
result[0].name

The documentation for the call can be found here.

🎤 Motivation

It can be used anywhere people are already using the equivalent GitHub badge, but for GitLab repositories. The main use case is to display the latest version of the app according to the repository.
In my case I want it alongside the F-Droid version badge so that it is clear whether the version that is published to F-Droid is the latest or not.

@guillermin guillermin added the service-badge New or updated service badge label Apr 16, 2021
@calebcartwright
Copy link
Member

Thanks for reaching out but going to close as a duplicate of #4867

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

No branches or pull requests

2 participants