Skip to content

Add variable %{latest_tag} available for badge link and url

Could you please add a variable with the last tag (eg : %{latest_tag}) available for badges link and url.

Implementation Guide

  1. Update the app/models/badge.rb to include last_tag in the PLACEHOLDERS hash, e.g.:
'last_tag' => -> (project) { TagsFinder.new(project.repository, PARAMS).execute }
  1. Update the documentation, as doc/user/project/badges.md and doc/api/project_badges.md
  2. Update the app/assets/javascripts/badges/components/badge_settings.vue to address new variable.
  3. Add missing tests, verify that badge has been displayed correctly, etc.
Edited by Christina Lohr