From 83b311cb2c6c28326ba0e8eff7807673cc071527 Mon Sep 17 00:00:00 2001 From: friday Date: Sat, 21 Aug 2021 09:39:30 +0200 Subject: [PATCH] Fallback release name to tag name Release name is optional for git,. If you don't fill it in, the Releases will use the tag name as the title. If you build Travis from a git tag (non-release) it will convert it to a releases without a name. --- assets/js/releases.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/releases.js b/assets/js/releases.js index 7a5cf03..75490cd 100644 --- a/assets/js/releases.js +++ b/assets/js/releases.js @@ -36,10 +36,10 @@ jQuery(function($) { .addClass(!selectStable ? 'fa-dot-circle' : 'fa-circle'); $('#stable-release + .option-info') - .html('v' + stable.name + ' from ' + new Date(stable.published_at).toLocaleDateString() + + .html('v' + (stable.name || stable.tag_name) + ' from ' + new Date(stable.published_at).toLocaleDateString() + ' Release notes.'); $('#dev-release + .option-info') - .html('v' + dev.name + ' from ' + new Date(dev.published_at).toLocaleDateString() + + .html('v' + (dev.name || dev.tag_name) + ' from ' + new Date(dev.published_at).toLocaleDateString() + ' Release notes.'); var aurLink = selectStable ? 'https://aur.archlinux.org/packages/ulauncher/' :