{"id":15451276,"url":"https://github.com/gr2m/octokit-plugin-get-semantic-releases","last_synced_at":"2025-04-19T23:53:48.962Z","repository":{"id":43874784,"uuid":"458271637","full_name":"gr2m/octokit-plugin-get-semantic-releases","owner":"gr2m","description":"Get repository releases with semantic version tags (e.g. `v1.2.3`, `v2.0.0-beta.1`, etc)","archived":false,"fork":false,"pushed_at":"2022-09-23T19:41:28.000Z","size":31,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T15:10:06.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gr2m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-11T17:02:04.000Z","updated_at":"2024-03-21T18:27:10.000Z","dependencies_parsed_at":"2022-09-26T21:50:45.714Z","dependency_job_id":null,"html_url":"https://github.com/gr2m/octokit-plugin-get-semantic-releases","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Foctokit-plugin-get-semantic-releases","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Foctokit-plugin-get-semantic-releases/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Foctokit-plugin-get-semantic-releases/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gr2m%2Foctokit-plugin-get-semantic-releases/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gr2m","download_url":"https://codeload.github.com/gr2m/octokit-plugin-get-semantic-releases/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248682073,"owners_count":21144801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T21:22:12.330Z","updated_at":"2025-04-19T23:53:48.935Z","avatar_url":"https://github.com/gr2m.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# octokit-plugin-get-semantic-releases\n\n\u003e Get repository releases with semantic version tags (e.g. `v1.2.3`, `v2.0.0-beta.1`, etc)\n\n[![@latest](https://img.shields.io/npm/v/octokit-plugin-get-semantic-releases.svg)](https://www.npmjs.com/package/octokit-plugin-get-semantic-releases)\n[![Build Status](https://github.com/gr2m/octokit-plugin-get-semantic-releases/workflows/Test/badge.svg)](https://github.com/gr2m/octokit-plugin-get-semantic-releases/actions?query=workflow%3ATest+branch%3Amain)\n\n## usage\n\n\u003ctable\u003e\n\u003ctbody valign=top align=left\u003e\n\u003ctr\u003e\u003cth\u003e\n\nBrowsers\n\n\u003c/th\u003e\u003ctd width=100%\u003e\n\nLoad `octokit-plugin-get-semantic-releases` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [cdn.skypack.dev](https://cdn.skypack.dev)\n\n```html\n\u003cscript type=\"module\"\u003e\n  import { Octokit } from \"https://cdn.skypack.dev/@octokit/core\";\n  import {\n    getSemanticReleases,\n    composeGetSemanticReleases,\n  } from \"https://cdn.skypack.dev/octokit-plugin-get-semantic-releases\";\n\u003c/script\u003e\n```\n\n\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003cth\u003e\n\nNode\n\n\u003c/th\u003e\u003ctd\u003e\n\nInstall with `npm install @octokit/core octokit-plugin-get-semantic-releases`. Optionally replace `@octokit/core` with a compatible module\n\n```js\nconst { Octokit } = require(\"@octokit/core\");\nconst {\n  getSemanticReleases,\n  composeGetSemanticReleases,\n} = require(\"octokit-plugin-get-semantic-releases\");\n```\n\n\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n```js\nconst MyOctokit = Octokit.plugin(getSemanticReleases);\nconst octokit = new MyOctokit({ auth: \"secret123\" });\n\nconst releases = await octokit.getSemanticReleases({\n  owner: \"octokit\",\n  repo: \"core.js\",\n});\n// `releases` is array of releases as shown at https://docs.github.com/en/rest/reference/releases#list-releases\n// but includes a `version` property, which is the normalized semantic version derived from the tag name.\n// The releases are sorted by version in ascending order.\n```\n\nIf you want to utilize the `getSemanticReleases()` in another plugin or with an existing `octokit` instance, use `composeGetSemanticReleases`.\n\n```js\nfunction myPlugin(octokit, options) {\n  return {\n    myMethod({owner, repo}) =\u003e {\n      return composeGetSemanticReleases(\n        octokit,\n        {owner, repo }\n      )\n    }\n  }\n}\n```\n\n## Options\n\n\u003ctable width=\"100%\"\u003e\n  \u003cthead align=left\u003e\n    \u003ctr\u003e\n      \u003cth width=150\u003e\n        name\n      \u003c/th\u003e\n      \u003cth width=70\u003e\n        type\n      \u003c/th\u003e\n      \u003cth\u003e\n        description\n      \u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody align=left valign=top\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003eowner\u003c/code\u003e\n      \u003c/th\u003e\n      \u003cth\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003cstrong\u003eRequired.\u003c/strong\u003e Repository owner login\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003erepo\u003c/code\u003e\n      \u003c/th\u003e\n      \u003cth\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n        \u003cstrong\u003eRequired.\u003c/strong\u003e Repository name\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003cth\u003e\n        \u003ccode\u003erange\u003c/code\u003e\n      \u003c/th\u003e\n      \u003cth\u003e\n        \u003ccode\u003estring\u003c/code\u003e\n      \u003c/th\u003e\n      \u003ctd\u003e\n\nFilter out versions that don't match the `range` string following [semver conventions](https://semver.npmjs.com/).\n\nExample: Load all stable versions greater than `v1.2.1` but not inclusive.\n\n```js\nconst releases = await octokit.getSemanticReleases({\n  owner: \"octokit\",\n  repo: \"core.js\",\n  range: \"\u003e1.2.1\",\n});\n```\n\n\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n  \n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md)\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Foctokit-plugin-get-semantic-releases","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgr2m%2Foctokit-plugin-get-semantic-releases","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgr2m%2Foctokit-plugin-get-semantic-releases/lists"}