Describe the feature
Currently, UNGH provides an API endpoint to fetch all releases for a repository (/repos/{owner}/{name}/releases). This is great for retrieving the entire release history, but there is no efficient way to fetch a specific release by its tag name.
A common use case is needing to fetch metadata or assets for a single, specific release (e.g., the release associated with a specific version tag). With the current API, one would have to fetch the entire list of releases and then filter it on the client side, which is inefficient and increases bandwidth usage, especially for repositories with a long release history.
I would like to request a new API endpoint to fetch a single release by its tag name.
Proposed Solution
Add a new API endpoint that follows the existing UNGH API pattern:
- Endpoint:
/repos/{owner}/{name}/releases/tags/{tag}
- Method:
GET
- Description: Get a specific release by its tag name.
Example Request:
GET https://ungh.cc/repos/nuxt/framework/releases/tags/v3.0.0-rc.13
Expected Response:
The response should return the release object for the specified tag, similar to the structure returned in the array from the current /releases/latest endpoint.
{
"release": {
"id": 82066265,
"tag": "v3.0.0-rc.13",
"author": "pi0",
"name": "v3.0.0-rc.13",
"draft": false,
"prerelease": false,
"createdAt": "2022-11-04T11:37:49Z",
"publishedAt": "2022-11-04T11:41:59Z",
"markdown": "....",
"html": "..."
}
}
Why This is Useful
- Efficiency: Eliminates the need to fetch all releases just to find one by tag name, saving bandwidth and improving response times.
- Simplicity: Provides a direct, semantic way to access a release, aligning with common user expectations (e.g., "get the release for version 1.0.0").
- Consistency: Follows the established pattern of UNGH's other single-resource endpoints (e.g.,
/repos/{owner}/{name}/releases for the list and /repos/{owner}/{name}/releases/tags/{tag} for a single item).
Alternative Solutions
Continue using the existing /releases endpoint and filter client-side. (This is the current workaround, but is inefficient.)
Additional context
This feature would complement the existing releases functionality and make UNGH an even more powerful and user-friendly tool for interacting with GitHub release metadata. It is a small, focused addition that provides significant value.
Additional information
Describe the feature
Currently, UNGH provides an API endpoint to fetch all releases for a repository (
/repos/{owner}/{name}/releases). This is great for retrieving the entire release history, but there is no efficient way to fetch a specific release by its tag name.A common use case is needing to fetch metadata or assets for a single, specific release (e.g., the release associated with a specific version tag). With the current API, one would have to fetch the entire list of releases and then filter it on the client side, which is inefficient and increases bandwidth usage, especially for repositories with a long release history.
I would like to request a new API endpoint to fetch a single release by its tag name.
Proposed Solution
Add a new API endpoint that follows the existing UNGH API pattern:
/repos/{owner}/{name}/releases/tags/{tag}GETExample Request:
GET https://ungh.cc/repos/nuxt/framework/releases/tags/v3.0.0-rc.13Expected Response:
The response should return the release object for the specified tag, similar to the structure returned in the array from the current
/releases/latestendpoint.{ "release": { "id": 82066265, "tag": "v3.0.0-rc.13", "author": "pi0", "name": "v3.0.0-rc.13", "draft": false, "prerelease": false, "createdAt": "2022-11-04T11:37:49Z", "publishedAt": "2022-11-04T11:41:59Z", "markdown": "....", "html": "..." } }Why This is Useful
/repos/{owner}/{name}/releasesfor the list and/repos/{owner}/{name}/releases/tags/{tag}for a single item).Alternative Solutions
Continue using the existing
/releasesendpoint and filter client-side. (This is the current workaround, but is inefficient.)Additional context
This feature would complement the existing releases functionality and make UNGH an even more powerful and user-friendly tool for interacting with GitHub release metadata. It is a small, focused addition that provides significant value.
Additional information