get releases empty in github api

2020-02-07 04:28发布

I try to get idea-community releases with following, but it return empty

curl "https://api.github.com/repos/JetBrains/intellij-community/releases"

but when the releases is exist in here

how to get its releases

标签: api github
1条回答
smile是对你的礼貌
2楼-- · 2020-02-07 04:34

From the documentation:

This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the Repository Tags API.

GitHub's UI is confusing, but this repository doesn't actually have any releases, which are a GitHub-specific concept. The "releases" you are seeing are actually just regular Git tags.

Try this instead:

curl https://api.github.com/repos/JetBrains/intellij-community/tags

See also What's the difference between tag and release?

查看更多
登录 后发表回答