gendesign/.forgejo/workflows/stale-claims.yml
lekss361 8c9d1344cc fix(stale-claims): avoid SIGPIPE 141 — pass file path не pipe
Root cause: `cat $ISSUES_TMP | python3 <<EOF ... sys.exit(0)` — Python exits
0 early, cat получает SIGPIPE, set -o pipefail → script exits 141 = failure.

Fix: передача file path через env var вместо stdin pipe. Python читает файл
напрямую. No pipe → no SIGPIPE.

Verified локально на VPS с bot-qa token: exit 0, '[OK] 0 wip issues —
nothing to do'.

Also remove diagnostic steps from workflow (added в PR #611, нужно для
поиска root cause, теперь убираем).

Refs: PR #611 (diagnostic), runs #1514-1520 failures.
2026-05-28 01:05:56 +03:00

39 lines
1.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Cleanup stale claims for autonomous multi-agent workflow.
#
# Запускается каждые 30 минут (cron). Освобождает issues застрявшие в
# `status/wip` дольше 4 часов. См. `scripts/cleanup-stale-claims.sh`.
#
# Secrets:
# FORGEJO_BOT_QA_TOKEN — bot-qa PAT (write:issue scope нужен).
# Можно использовать любой bot-PAT с write:issue, но bot-qa имеет минимум прав.
name: cleanup-stale-claims
on:
schedule:
# Каждые 30 минут UTC
- cron: '*/30 * * * *'
workflow_dispatch: {} # manual run возможен через UI
concurrency:
group: stale-claims
cancel-in-progress: false
jobs:
cleanup:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Run cleanup script
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_BOT_QA_TOKEN }}
FORGEJO_URL: https://git.gendsgn.ru
FORGEJO_REPO: lekss361/gendesign
STALE_HOURS: 4
run: |
chmod +x scripts/cleanup-stale-claims.sh
./scripts/cleanup-stale-claims.sh