-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Description
📋 Description
This badge would display the latest version of a Ruby gem published to GitHub Packages.
Which service is this badge for: GitHub Packages (Ruby gems registry)
What sort of information should this badge show: The latest version number of a Ruby gem from GitHub Packages, similar to existing badges for other package managers.
Proposed URL format:
https://img.shields.io/github/ruby-package/v/{owner}/{package}
Example:
https://img.shields.io/github/ruby-package/v/twilightcoders/gemplate
→ displays "v0.0.1"https://img.shields.io/github/ruby-package/v/twilightcoders/sudo
→ displays "v0.4.0"
Related:
🔗 Data
Data source: GitHub Packages API endpoint for Ruby gems:
https://api.github.com/orgs/{owner}/packages?package_type=rubygems
Is there a public API: Yes, GitHub's REST API provides package information including versions. The endpoint returns package metadata including all published versions, allowing retrieval of the latest version.
This would complement the existing GitHub Packages badges for other package types (npm, Docker, etc.) and provide consistency across the GitHub Packages ecosystem.
GitHub Packages API endpoint:
https://api.github.com/orgs/{owner}/packages?package_type=rubygems
The API returns package metadata including version information. The latest version can be extracted from the package versions array.
🎤 Motivation
Many organizations and developers are migrating from public package registries to GitHub Packages for better security, access control, and integration with their existing GitHub workflows. However, there's currently no way to display version badges for Ruby gems hosted on GitHub Packages, creating an inconsistency in documentation and project visibility.
Specific use cases:
- Private/internal gems: Organizations publishing internal Ruby gems to GitHub Packages need version badges for their internal documentation and README files
- Security-conscious projects: Teams using GitHub Packages for enhanced security and access control still want to display current version information publicly
- Consistency across package types: GitHub Packages already supports npm, Docker, and other package types in shields.io - Ruby gems are a notable gap
- Migration from public registries: Projects moving from RubyGems.org to GitHub Packages lose the ability to display version badges, hindering adoption
- Enterprise workflows: Companies using GitHub Enterprise with GitHub Packages need version badges for their internal project dashboards and documentation
This feature would provide parity with other GitHub Packages badge types and support the growing ecosystem of Ruby projects using GitHub's package registry.