Skip to content

feat(dev-loop): full 10-step autonomous cycle with experience/ source of truth #84

feat(dev-loop): full 10-step autonomous cycle with experience/ source of truth

feat(dev-loop): full 10-step autonomous cycle with experience/ source of truth #84

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
env:
BRANCH_REF: ${{ github.event.pull_request.head.ref }}
run: echo "number=$(echo "$BRANCH_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"