I am working on a script which collects information about commits via the Gitlab API. Among others, I need to know which tag(s) are pointing to a certain commit. I was using
GET /repository/commits/<sha>/refs until I noticed that there are multiple tags listed in the response and different commits can have the same tags, according to this endpoint, which is impossible. So my questions are:
- What information is shown by this endpoint as type "branch" and "tag"?
- Which endpoint would show me the correct tag for a given commit?
Thank you!