From f16ae561dd060df12561a3dc129bae6301637a42 Mon Sep 17 00:00:00 2001 From: Tres Finocchiaro Date: Tue, 11 Feb 2025 01:43:56 -0500 Subject: [PATCH] Make commit hashes consistent Related https://github.com/LMMS/lmms/pull/7694 --- lib/Artifacts.php | 4 ++-- templates/download/pull-request.twig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Artifacts.php b/lib/Artifacts.php index 3df9ebc..72cb53a 100644 --- a/lib/Artifacts.php +++ b/lib/Artifacts.php @@ -87,7 +87,7 @@ private function mapBranchAssetsFromJson(array $json): array return new Asset( platform: $parsed->getPlatform(), platformName: $parsed, // __toString() - releaseName: 'g' . substr($artifact['workflow_run']['head_sha'], 0, 9), + releaseName: '@' . substr($artifact['workflow_run']['head_sha'], 0, 7), downloadUrl: $this->router->generate('download_artifact', ['id' => $artifact['id']]), description: null, gitRef: $artifact['workflow_run']['head_sha'], @@ -103,7 +103,7 @@ private function mapPullRequestAssetsFromJson(array $json, string $pr, string $d return new Asset( platform: $parsed->getPlatform(), platformName: $parsed, // __toString() - releaseName: '#' . $pr . '@' . substr($artifact['workflow_run']['head_sha'], 0, 9), + releaseName: '#' . $pr . ' @' . substr($artifact['workflow_run']['head_sha'], 0, 7), downloadUrl: $this->router->generate('download_artifact', ['id' => $artifact['id']]), description: $description, gitRef: $artifact['workflow_run']['head_sha'], diff --git a/templates/download/pull-request.twig b/templates/download/pull-request.twig index 699cabd..b7068e6 100644 --- a/templates/download/pull-request.twig +++ b/templates/download/pull-request.twig @@ -11,7 +11,7 @@
{% trans with {'%download%': path('download')} %}Anyone can open a pull request against LMMS; we are not responsible for the builds on this page.
Unless you were directed here to test a pull request, please download an official build from the main download page instead.{% endtrans %}
-

{{ 'Pull Request #%id%'|trans({'%id%': id}) }}

+

{% trans %}Pull Request {% endtrans %} #{{ id }}

{% for asset in artifacts %} {{ download.printrelbutton(asset, 'btn-secondary') }} {% endfor %}