philschatz / octokat.js

:octocat: Github API Client using Promises or callbacks. Intended for the browser or NodeJS.
http://philschatz.com/2014/05/25/octokat/
MIT License
421 stars 133 forks source link

Allow access to `repo.git.tags` #268

Open ntdb opened 6 years ago

ntdb commented 6 years ago

Github's /git/refs/tag/<TAG> endpoint seems to be limited to annotated tags. I encountered a situation where I needed to access a lightweight tag that, itself, pointed to an annotated release tag. When fetching this ref, the object.url returned by Github was of the form /git/tags/<TAG> but this form was not supported by Octokat. These changes allow the fetching of lightweight tags through repo.git.tags.

This SO answer was pivotal in helping me understand this case and identify the solution.