Closed T145 closed 2 years ago
It's the release_id
specified in the API here https://docs.github.com/en/rest/releases/releases#get-a-release.
For example:
curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/dsaltares/fetch-gh-release-asset/releases
Yields (just showing the latest release):
[
{
"url": "https://api.github.com/repos/dsaltares/fetch-gh-release-asset/releases/66315603",
"assets_url": "https://api.github.com/repos/dsaltares/fetch-gh-release-asset/releases/66315603/assets",
"upload_url": "https://uploads.github.com/repos/dsaltares/fetch-gh-release-asset/releases/66315603/assets{?name,label}",
"html_url": "https://github.com/dsaltares/fetch-gh-release-asset/releases/tag/1.0.0",
"id": 66315603,
"author": {
"login": "dsaltares",
"id": 570314,
"node_id": "MDQ6VXNlcjU3MDMxNA==",
"avatar_url": "https://avatars.githubusercontent.com/u/570314?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dsaltares",
"html_url": "https://github.com/dsaltares",
"followers_url": "https://api.github.com/users/dsaltares/followers",
"following_url": "https://api.github.com/users/dsaltares/following{/other_user}",
"gists_url": "https://api.github.com/users/dsaltares/gists{/gist_id}",
"starred_url": "https://api.github.com/users/dsaltares/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dsaltares/subscriptions",
"organizations_url": "https://api.github.com/users/dsaltares/orgs",
"repos_url": "https://api.github.com/users/dsaltares/repos",
"events_url": "https://api.github.com/users/dsaltares/events{/privacy}",
"received_events_url": "https://api.github.com/users/dsaltares/received_events",
"type": "User",
"site_admin": false
},
"node_id": "RE_kwDODnq3bM4D8-VT",
"tag_name": "1.0.0",
"target_commitish": "master",
"name": "1.0.0",
"draft": false,
"prerelease": false,
"created_at": "2022-05-08T14:10:48Z",
"published_at": "2022-05-08T14:15:02Z",
"assets": [
],
"tarball_url": "https://api.github.com/repos/dsaltares/fetch-gh-release-asset/tarball/1.0.0",
"zipball_url": "https://api.github.com/repos/dsaltares/fetch-gh-release-asset/zipball/1.0.0",
"body": "## What's Changed\r\n* feat: support Windows and macOS runners by migrating to TS and node by @umireon in https://github.com/dsaltares/fetch-gh-release-asset/pull/36\r\n* fix: respect release_id by @umireon in https://github.com/dsaltares/fetch-gh-release-asset/pull/40\r\n* chore: npm, personal eslint and prettier by @dsaltares in https://github.com/dsaltares/fetch-gh-release-asset/pull/42\r\n* fix: tests only run once on PRs by @dsaltares in https://github.com/dsaltares/fetch-gh-release-asset/pull/43\r\n* refactor: unify main and mainRegex functions to remove duplicate code by @dsaltares in https://github.com/dsaltares/fetch-gh-release-asset/pull/44\r\n* refactor: use async-retry instead of custom retry logic by @dsaltares in https://github.com/dsaltares/fetch-gh-release-asset/pull/45\r\n\r\n## New Contributors\r\n* @umireon made their first contribution in https://github.com/dsaltares/fetch-gh-release-asset/pull/36\r\n\r\n**Full Changelog**: https://github.com/dsaltares/fetch-gh-release-asset/compare/0.0.8...1.0.0",
"mentions_count": 2
}
]
66315603
is the id of the release. You can pass the values latest
, of course, or the name of the tag. In the case of this repo, it could be 1.0.0
.
Does this answer your question?
Yes; thank you!
It's not quite clear what a
<release_id>
is supposed to mean, considering it defaults to alatest
version and takes other tag specifications.I'm guessing the answer is "yes" from the context given here: https://github.com/dsaltares/fetch-gh-release-asset#name=