Skip to content

fix(agent): bash Telegram edit-in-place + circuit breaker backoff #76

fix(agent): bash Telegram edit-in-place + circuit breaker backoff

fix(agent): bash Telegram edit-in-place + circuit breaker backoff #76

Workflow file for this run

name: Trinity Agent Cleanup
on:
pull_request:
types: [closed]
jobs:
cleanup-agent:
if: |
github.event.pull_request.merged == true &&
startsWith(github.event.pull_request.head.ref, 'feat/issue-')
runs-on: ubuntu-latest
steps:
- name: Extract issue number
id: issue
run: echo "number=$(echo '${{ github.event.pull_request.head.ref }}' | sed 's/[^0-9]//g')" >> $GITHUB_OUTPUT
- name: Close issue
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ISSUE="${{ steps.issue.outputs.number }}"
echo "🏠 Closing issue #${ISSUE} after PR merge..."
gh issue close "${ISSUE}" \
--repo "${{ github.repository }}" \
--comment "🏠 Agent returned home. PR merged. Services are pooled (not destroyed)." \
2>/dev/null || echo "⚠️ Issue #${ISSUE} already closed or not found"