6

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

anzeaucha
  • 157
  • 6

1 Answers1

8

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?

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
  • 3
    If a repo doesn't have any releases defined, GitHub's UI will list all tags as if they were releases. But the GitHub API doesn't do that; releases have to be explicitly defined to show up in the API. – Chris Jones Dec 23 '19 at 18:24