The browser extension (poli0981/itch-f2p-extension) and the Telegram bot (poli0981/telegram-scraper-bot) are archived. Removed: POST /api/ingest (ingest.ts, requireService, the idempotency store, RL_INGEST, ACCESS_AUD_INGEST; it never received a game), the admin's "Browser extension" auto-approve source and "Extension" queue label, and the About page's Telegram numeric-ID note. No D1 migration: the idempotency table and the 'ext' CHECK stay. Policies (Privacy, ToS, EULA + installer RTF, Disclaimer, Security; EN + VI) drop the extension / ingest wording; Last updated 2026-10-16, LEGAL_VERSION unchanged. Docs, CLAUDE.md and pipeline comments updated. Release 4.4.1 (also ships #131, #135, #136, #137). [skip-discuss] Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
41 lines
1.5 KiB
Bash
Executable File
41 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Apply a pipeline patch to the latest main and push it, retrying on races.
|
|
#
|
|
# Usage: bash bash/commit_push.sh PATCH.json "commit message"
|
|
#
|
|
# Every data writer (refresh, ingest, the admin Worker and its cron) pushes
|
|
# to main. Instead of rebasing whole-file JSON rewrites (which conflict), each
|
|
# attempt starts from a fresh origin/main and re-applies the URL-keyed patch;
|
|
# apply_patch.py is idempotent and validates before anything is committed.
|
|
# Pushes use the job's GITHUB_TOKEN, so they do not re-trigger workflows.
|
|
set -euo pipefail
|
|
|
|
PATCH="${1:?patch file required}"
|
|
MESSAGE="${2:?commit message required}"
|
|
MAX_ATTEMPTS=5
|
|
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
|
|
for attempt in $(seq 1 "$MAX_ATTEMPTS"); do
|
|
git fetch --no-tags --depth=1 origin main
|
|
git reset --hard origin/main
|
|
python scripts/apply_patch.py "$PATCH"
|
|
mkdir -p scripts/state # git add fails on a pathspec that matches nothing
|
|
git add -A data_game scripts/deleted_games.json scripts/temp_link.json scripts/state
|
|
if git diff --cached --quiet; then
|
|
echo "No data changes — nothing to commit."
|
|
exit 0
|
|
fi
|
|
git commit -q -m "$MESSAGE"
|
|
if git push origin HEAD:main; then
|
|
echo "Pushed on attempt $attempt."
|
|
exit 0
|
|
fi
|
|
echo "::warning::push rejected (attempt $attempt/$MAX_ATTEMPTS) — retrying on the new main"
|
|
sleep $((attempt * 10 + RANDOM % 10))
|
|
done
|
|
|
|
echo "::error::push failed after $MAX_ATTEMPTS attempts"
|
|
exit 1
|