在github api中获取发布为空

anz*_*cha 2 api github

我尝试使用以下命令获得想法社区版本,但返回空

curl "https://api.github.com/repos/JetBrains/intellij-community/releases"
Run Code Online (Sandbox Code Playgroud)

但是当发布在这里时

如何获得释放

Chr*_*ris 5

文档中

这将返回发行版列表,其中不包括尚未与发行版关联的常规Git标签。要获取Git标签列表,请使用Repository Tags API

GitHub的UI令人困惑,但是该存储库实际上没有任何发布,这是GitHub的概念。您看到的“发行版”实际上只是常规的Git标签。

尝试以下方法:

curl https://api.github.com/repos/JetBrains/intellij-community/tags
Run Code Online (Sandbox Code Playgroud)

另请参见标签和发布之间有什么区别?

  • 如果存储库没有定义任何版本,GitHub 的 UI 将列出所有标签,就像它们是版本一样。但 GitHub API 并没有这样做;必须明确定义版本才能显示在 API 中。 (3认同)