From fffce6039ade143412708533e53096a58bfc3d02 Mon Sep 17 00:00:00 2001 From: zarzet Date: Thu, 12 Mar 2026 02:51:37 +0700 Subject: [PATCH] feat: add Deezer entry in provider priority UI and improve release changelog - Add 'deezer' case with icon to _ProviderItem in provider_priority_page.dart - Fix release.yml: deterministic previous-tag lookup for Full Changelog link - Strip version header line and author attribution from Telegram changelog - cliff.toml: hide repo owner username from commit attribution - cliff.toml: remove PR number stripping preprocessor --- .github/workflows/release.yml | 16 ++++++++++++++-- cliff.toml | 4 +--- lib/screens/settings/provider_priority_page.dart | 6 ++++++ 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1129349..57772b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -344,9 +344,18 @@ jobs: VERSION=${{ needs.get-version.outputs.version }} REPO_OWNER="${{ github.repository_owner }}" REPO_NAME="${{ github.event.repository.name }}" + CURRENT_REF=$(git rev-list -n 1 "$VERSION" 2>/dev/null || git rev-parse HEAD) + PREVIOUS_TAG=$(git describe --tags --abbrev=0 "${CURRENT_REF}^" 2>/dev/null || true) - # Start with git-cliff changelog - cp /tmp/changelog.txt /tmp/release_body.txt + # Start with git-cliff changelog, but replace its compare footer with a + # deterministic previous-tag lookup from git. + sed '/^## [0-9][0-9.[:alpha:]-]*$/d; /^\*\*Full Changelog\*\*/d' /tmp/changelog.txt > /tmp/release_body.txt + + if [ -n "$PREVIOUS_TAG" ]; then + printf '\n**Full Changelog**: [%s...%s](https://github.com/%s/%s/compare/%s...%s)\n' \ + "$PREVIOUS_TAG" "$VERSION" "$REPO_OWNER" "$REPO_NAME" "$PREVIOUS_TAG" "$VERSION" \ + >> /tmp/release_body.txt + fi # Append download section cat >> /tmp/release_body.txt << FOOTER @@ -424,7 +433,10 @@ jobs: else # Convert Markdown to Telegram HTML CHANGELOG=$(cat /tmp/cliff_tg.txt | \ + sed '/^## [0-9][0-9.[:alpha:]-]*$/d' | \ sed '/^\*\*Full Changelog\*\*/d' | \ + sed 's/ by \[@[^]]*\](https:\/\/github\.com\/[^)]*)//g' | \ + sed 's/ by @[A-Za-z0-9_-]\+//g' | \ sed 's/\[#\([0-9]*\)\]([^)]*)/#\1/g' | \ sed 's/\[@\([^]]*\)\]([^)]*)/@\1/g' | \ sed 's/&/\&/g' | \ diff --git a/cliff.toml b/cliff.toml index 0509818..b5680d4 100644 --- a/cliff.toml +++ b/cliff.toml @@ -22,7 +22,7 @@ body = """ {% if commit.github.pr_number %} \ ([#{{ commit.github.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.github.pr_number }}))\ {% endif %}\ - {%- if commit.github.username %} by [@{{ commit.github.username }}](https://github.com/{{ commit.github.username }}){%- endif %} + {%- if commit.github.username and commit.github.username != "zarzet" %} by [@{{ commit.github.username }}](https://github.com/{{ commit.github.username }}){%- endif %} {%- endfor %} {% endfor %} @@ -58,8 +58,6 @@ split_commits = false # Regex for preprocessing the commit messages commit_preprocessors = [ - # Remove PR number from message (we add it back via GitHub integration) - { pattern = '\(#(\d+)\)', replace = '' }, # Strip conventional commit prefix for cleaner messages # (group header already shows the type) ] diff --git a/lib/screens/settings/provider_priority_page.dart b/lib/screens/settings/provider_priority_page.dart index e28ad7e..02c15b1 100644 --- a/lib/screens/settings/provider_priority_page.dart +++ b/lib/screens/settings/provider_priority_page.dart @@ -334,6 +334,12 @@ class _ProviderItem extends StatelessWidget { ); case 'qobuz': return _ProviderInfo(name: 'Qobuz', icon: Icons.album, isBuiltIn: true); + case 'deezer': + return _ProviderInfo( + name: 'Deezer', + icon: Icons.graphic_eq, + isBuiltIn: true, + ); case 'youtube': return _ProviderInfo( name: 'YouTube',