-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c4aa2ab
commit fed13b9
Showing
1 changed file
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,25 @@ | ||
# Releases | ||
# Releases and tags | ||
|
||
Some repos only have tags and no releases, so check if there are releases in the GitHub UI for a specific repo before looking for its release in the API. | ||
|
||
A release is specific to GitHub, while a tag is in the Git repo and also stored on GitHub. | ||
|
||
The latest release, if there are releases. | ||
|
||
e.g. [https://api.github.com/repos/octokit/core.js/releases/latest](https://api.github.com/repos/octokit/core.js/releases/latest) | ||
|
||
For tags, you cannot use `latest`, you have to use a specific value. | ||
|
||
|
||
## Go example | ||
|
||
- Releases - empty list [https://api.github.com/repos/golang/go/releases](https://api.github.com/repos/golang/go/releases), and `latest` gives an error as not found. | ||
- Tags - [https://api.github.com/repos/golang/go/tags](https://api.github.com/repos/golang/go/tags) | ||
|
||
I got this from the API could could not get it to work with a SHA. | ||
|
||
``` | ||
git_tags_url "https://api.github.com/repos/golang/go/git/tags{/sha}" | ||
``` | ||
|
||
Tried: [https://api.github.com/repos/golang/go/git/tags/cdd3d6932853ec2fb2ac0a693143b22098adb012](https://api.github.com/repos/golang/go/git/tags/cdd3d6932853ec2fb2ac0a693143b22098adb012) |