From d20caffae1bbba1be2a476e33b21c9d81ca71f4c Mon Sep 17 00:00:00 2001 From: yetone Date: Mon, 2 Nov 2026 05:22:03 +0800 Subject: [PATCH] release: notes written again on magpie-releases are copied here each hour MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GrayRabbit on Discord (11-02): the "更新内容" dialog in Chinese listed v0.1.2634 on as raw English commit subjects. magpie-releases' release runs got "Insufficient Balance" from DeepSeek for both the changelog and its Chinese since v0.1.2634, so those releases went out with the commit list and no part, as v0.1.1233 to 1242 did (#2122). magpie-releases b90a82b now writes such notes again each hour (notes.yml) once DeepSeek answers. - notes-mirror.yml, hourly at :53 and by hand: a release here still without the zh marker gets magpie-releases' notes of the same tag once those have it, with the mirror's footer. The app reads magpie-releases through usemagpie.ai, so this is the GitHub page. - release.yml's notice on #2260 names insufficient_balance_error as a DeepSeek top-up and says the notes are written again by themselves. v0.1.2634 to 2644's notes were written by hand from their commits, in English and Chinese, on both repos' releases. Run: actionlint 1.7.7 (mote) on notes-mirror.yml and release.yml: nothing but release.yml's existing unknown runner labels. No Go or GUI code changed. Not tried: notes-mirror.yml on GitHub's runners before this push. --- .github/workflows/notes-mirror.yml | 35 ++++++++++++++++++++++++++++++ .github/workflows/release.yml | 6 +++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/notes-mirror.yml diff --git a/.github/workflows/notes-mirror.yml b/.github/workflows/notes-mirror.yml new file mode 100644 index 000000000..c107e9251 --- /dev/null +++ b/.github/workflows/notes-mirror.yml @@ -0,0 +1,35 @@ +# A release's notes are copied here once, when release.yml's mirror-release +# job publishes it. When DeepSeek turned the notes away, magpie-releases' +# notes.yml writes them again later (each hour, at :23), and this copies +# them to this repo's release of the same tag: one here still without the +# marker gets magpie-releases' notes once those have it. +# The app reads magpie-releases (usemagpie.ai's /api/notes), so this is +# the GitHub page alone. +name: notes-mirror + +on: + schedule: + - cron: '53 * * * *' + workflow_dispatch: + +permissions: + contents: write + +jobs: + mirror: + runs-on: ubuntu-latest + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - name: Copy notes written again + run: | + set -uo pipefail + tags=$(gh release list -R "$GITHUB_REPOSITORY" -L 100 --exclude-drafts --json tagName -q '.[].tagName') || exit 1 + for t in $tags; do + here=$(gh release view "$t" -R "$GITHUB_REPOSITORY" --json body -q .body) || continue + if printf '%s' "$here" | grep -qF ''; then continue; fi + there=$(gh release view "$t" -R yetone/magpie-releases --json body -q .body) || continue + if ! printf '%s' "$there" | grep -qF ''; then continue; fi + { printf '%s' "$there"; printf '\n\n---\nThe same release, and the feed magpie updates from: https://github.com/yetone/magpie-releases/releases/tag/%s\n' "$t"; } > notes.md + gh release edit "$t" -R "$GITHUB_REPOSITORY" --notes-file notes.md >/dev/null && echo "$t: notes copied" + done diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea35fb2f5..1c6c9f22e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -105,7 +105,9 @@ jobs: # balance did so for v0.1.1233 to v0.1.1242, and Chinese apps showed # English for a day until a user said so (#2122). Its warning is in a # log nobody reads, so a release without them is said here, on one - # open issue, where the notes get added by hand. + # open issue. magpie-releases' notes.yml writes them again each hour + # once DeepSeek answers (it didn't for v0.1.2634 to 2646, a spent + # balance again), and notes-mirror.yml copies them here. - name: Say when the notes have no Chinese env: GH_REPO: ${{ github.repository }} @@ -116,7 +118,7 @@ jobs: exit 0 fi title="Release notes without Chinese" - msg="$REF went out with English notes alone: magpie-releases' release run got no Chinese from DeepSeek. Its reason is the \`DeepSeek wrote no Chinese notes\` warning in that run's Generate changelog step (https://github.com/yetone/magpie-releases/actions). Until the Chinese is added below a \`\` marker, in the release on yetone/magpie-releases and here, apps set to Chinese show its notes in English (#2122)." + msg="$REF went out with English notes alone: magpie-releases' release run got no Chinese from DeepSeek. Its reason is the \`DeepSeek wrote no Chinese notes\` warning in that run's Generate changelog step (https://github.com/yetone/magpie-releases/actions); \`insufficient_balance_error\` means the DEEPSEEK_API_KEY account needs a top-up. Until then apps set to Chinese show its commit subjects (#2122). magpie-releases' notes.yml writes the notes again each hour once DeepSeek answers, and notes-mirror.yml copies them here; notes written by hand below a \`\` marker are kept." n=$(gh issue list --state open --search "\"$title\" in:title" --json number,title -q ".[] | select(.title == \"$title\") | .number" | head -1) || n="" if [ -n "$n" ]; then gh issue comment "$n" --body "$msg" || echo "::warning::could not comment on #$n: $msg"