Skip to content

[GithubReleaseBranch] Add GitHub release by branch badge#11941

Draft
LuxologyGG wants to merge 4 commits into
badges:masterfrom
LuxologyGG:feat/auto-badge-issue-7929
Draft

[GithubReleaseBranch] Add GitHub release by branch badge#11941
LuxologyGG wants to merge 4 commits into
badges:masterfrom
LuxologyGG:feat/auto-badge-issue-7929

Conversation

@LuxologyGG

@LuxologyGG LuxologyGG commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Closes #7929

Summary

Adds a new version badge that shows the latest GitHub release for a specified branch. The badge matches releases using the target_commitish field from the GitHub releases API and paginates through release pages when needed.

Example

https://img.shields.io/github/v/release/laravel/framework/13.x

Produces a badge labeled latest-release@13.x with the latest release version for that branch.

API rate limits

This badge uses the GitHub REST API (GET /repos/{owner}/{repo}/releases). Unauthenticated requests are limited to 60 requests/hour per IP; authenticated requests allow 5,000 requests/hour per token. Shields.io uses configured GitHub tokens when available.

Checklist

  • Service implementation (services/github/github-release-branch.service.js)
  • Unit tests (services/github/github-release-branch.service.spec.js)
  • Service tests (services/github/github-release-branch.tester.js)
  • Tests passing
  • npm run lint (0 errors)

Testing

  • npm run test:core -- --grep GithubReleaseBranch (9 passing)
  • npm run test:services -- --only=GithubReleaseBranch (10 passing)

@github-actions

github-actions Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor
Warnings
⚠️

Found badge URL that may not follow our standard route abbreviations in services/github/github-release-branch.service.js.
Please ensure you've reviewed our conventions.

Messages
📖 ✨ Thanks for your contribution to Shields, @LuxologyGG!

Generated by 🚫 dangerJS against eedd3b2

@cursor cursor Bot force-pushed the feat/auto-badge-issue-7929 branch from 7494ccb to a5761af Compare June 24, 2026 18:07
@LuxologyGG LuxologyGG changed the title Add GitHub release by branch badge [GithubReleaseBranch] Add GitHub release by branch badge Jun 24, 2026
Implements a version badge that shows the latest release for a
specified branch using the GitHub releases API target_commitish field.

Closes badges#7929
Reorder static render before transform and fix Prettier
formatting in spec and tester files.
@LuxologyGG LuxologyGG force-pushed the feat/auto-badge-issue-7929 branch from ddd13e4 to eedd3b2 Compare June 28, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

New Feature Request: Github release (latest on a specified branch)

2 participants