release: notes written again on magpie-releases are copied here each hour
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 <!-- lang:zh --> 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.
This commit is contained in:
@@ -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
|
||||
# <!-- lang:zh --> 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 '<!-- lang:zh -->'; then continue; fi
|
||||
there=$(gh release view "$t" -R yetone/magpie-releases --json body -q .body) || continue
|
||||
if ! printf '%s' "$there" | grep -qF '<!-- lang:zh -->'; 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
|
||||
@@ -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 \`<!-- lang:zh -->\` 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 \`<!-- lang:zh -->\` 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"
|
||||
|
||||
Reference in New Issue
Block a user