Unable to find out information about Ansible releases via GitHub API

Hi

I was interested in finding out what the latest available Ansible releases were via GitHub’s API.

The following curl command should have showed me all the available “published” releases of Ansible:

curl -s “https://api.github.com/repos/ansible/ansible/releases

Specifically, GitHub’s API documentation (https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository) states that: “This returns a list of releases, which does not include regular Git tags that have not been associated with a release.”

Currently the above only outputs information for a single release: “tag_name”: “v2.0.0.1-1”

I was wondering if this was correct since the API call I was looking to use to find the latest release also returns v2.0.0.1-1. (curl -s “https://api.github.com/repos/ansible/ansible/releases/latest”)

I apologise if this isn’t an Ansible issue as it could be something wrong with GitHub since for some reason, I also can’t find out the latest release of git is via GitHub’s API. (Running curl -s “https://api.github.com/repos/git/git/releases/latest”, returns a “message”: “Not Found” response)

regards,
Jinesh

Instead of listing releases, list the tags instead:

https://developer.github.com/v3/repos/#list-tags

The Github releases only works if the project uses that feature, we tried for a while but did not find it very useful (stopped at 2.0 as you’ve already found out).