我如何使用github api获取项目的所有标签或版本? [英] How can I use github api to get all tags or releases for a project?

查看:615
本文介绍了我如何使用github api获取项目的所有标签或版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何使用github-api获取项目的所有当前版本或标签。我已经看过 github-api中标签的文档,但我没有看到方法来列出所有的标签或列出所有的版本,但只列出一个特定的标签:sha。

I would like to know how to use the github-api to get all the current releases or tags for a project. I have seen the documentation for tags in github-api but I don't see a way to list all tags or list all releases but only list a specific tag by :sha.

推荐答案

可能不在你期望的地方。

It's possible, but the documentation is perhaps not in the place you'd expect it to be.

http://developer.github.com/v3/git/refs/


您也可以申请一份 - 命名。例如,要获取所有标记
引用,可以调用:

You can also request a sub-namespace. For example, to get all the tag references, you can call:



GET /repos/:owner/:repo/git/refs/tags

这篇关于我如何使用github api获取项目的所有标签或版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆