ci: rework Discord lifecycle + migration workflows

- Merge defer-discord-thread.yml and delete-discord-thread.yml into
  create-ready-for-testing-message.yml (ready/lock/close jobs)
- Derive script slug from the "Name of the Script" issue field
  (lowercase + spaces->dashes), use issue-title case for display
- Fix slug mismatch (tr -d ' ' vs dashes) that broke delete_new_script
- move-to-main: PR title/body taken from the issue

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Michel Roegl-Brunner
2026-06-02 11:26:31 +02:00
parent a942dd7282
commit 4385451b37
5 changed files with 215 additions and 154 deletions

View File

@@ -25,9 +25,23 @@ jobs:
- name: Extract Issue Info and Script Type
id: extract_info
env:
ISSUE_BODY: ${{ github.event.issue.body }}
ISSUE_TITLE: ${{ github.event.issue.title }}
run: |
TITLE=$(echo '${{ github.event.issue.title }}' | tr '[:upper:]' '[:lower:]' | tr -d ' ')
BODY='${{ github.event.issue.body }}'
BODY="$ISSUE_BODY"
# TITLE (slug): from the "Name of the Script" field in the issue body, normalized to
# the repo's lowercase + spaces->dashes convention (e.g. "Alpine Cinny" -> "alpine-cinny").
# This must match the slug move-to-main-repo.yaml used to create the files, otherwise the
# delete branch would not find them. Falls back to the title if the field is absent.
NAME_RAW=$(printf '%s\n' "$BODY" \
| sed -n '/^###[[:space:]]*Name of the Script/,/^###/p' \
| sed '1d;/^###/d;/^[[:space:]]*$/d' | head -n1)
if [ -z "$NAME_RAW" ]; then
NAME_RAW="$ISSUE_TITLE"
fi
TITLE=$(echo "$NAME_RAW" | tr -d '\r' | tr '[:upper:]' '[:lower:]' | sed 's/[[:space:]]\+/-/g')
echo "TITLE=$TITLE" >> $GITHUB_ENV