@@ -23,15 +23,15 @@ jobs:
2323 run : |
2424 PR_NUM="${{ github.event.pull_request.number }}"
2525 PR_TITLE="${{ github.event.pull_request.title }}"
26- PR_BODY=$(curl -sf -H "Authorization: token $GH_TOKEN" \
26+ PR_BODY=$(curl -s -H "Authorization: token $GH_TOKEN" \
2727 "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUM" \
2828 | python3 -c "import sys,json; print(json.loads(sys.stdin.read()).get('body','') or '')" 2>/dev/null)
2929
3030 # Extract linked issue number
3131 ISSUE_NUM=$(PR_TITLE="$PR_TITLE" PR_BODY_TEXT="$PR_BODY" python3 -c "
3232 import re, os
3333 text = os.environ.get('PR_TITLE', '') + ' ' + os.environ.get('PR_BODY_TEXT', '')
34- m = re.search(r'(?:closes|fixes|resolves)\s+ (?:\S+#)?(\d+)', text, re.IGNORECASE)
34+ m = re.search(r'(?:closes|fixes|resolves|issue|bounty )\s*:?\s* (?:\S+#)?(\d+)', text, re.IGNORECASE)
3535 print(m.group(1) if m else '')
3636 " 2>/dev/null)
3737
4141 fi
4242
4343 # Check if the bounty issue has review-passed label
44- LABELS=$(curl -sf -H "Authorization: token $GH_TOKEN" \
44+ LABELS=$(curl -s -H "Authorization: token $GH_TOKEN" \
4545 "https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE_NUM" \
4646 | python3 -c "import sys,json; print(','.join(l['name'] for l in json.loads(sys.stdin.read()).get('labels',[])))" 2>/dev/null)
4747
5252
5353 # Verify this closed PR is the one that holds the lock
5454 # Check for the escrow-lock-pr-N tracking comment
55- LOCK_HOLDER=$(curl -sf -H "Authorization: token $GH_TOKEN" \
55+ LOCK_HOLDER=$(curl -s -H "Authorization: token $GH_TOKEN" \
5656 "https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE_NUM/comments?per_page=100" \
5757 | python3 -c "
5858 import sys, json, re
@@ -73,15 +73,15 @@ jobs:
7373
7474 # Remove the review-passed label
7575 echo "Removing review-passed label from issue #$ISSUE_NUM (PR #$PR_NUM closed)"
76- curl -sf -X DELETE \
76+ curl -s -X DELETE \
7777 -H "Authorization: token $GH_TOKEN" \
7878 "https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE_NUM/labels/review-passed"
7979
8080 # Post a comment noting the unlock
81- curl -sf -X POST \
81+ curl -s -X POST \
8282 -H "Authorization: token $GH_TOKEN" \
8383 -H "Content-Type: application/json" \
8484 "https://api.github.com/repos/${{ github.repository }}/issues/$ISSUE_NUM/comments" \
85- -d "{\"body\":\"🔓 ** Escrow lock released** — PR #$PR_NUM was closed without merging.\n\nThis bounty is open for new submissions.\n\n---\n*SolFoundry Review Bot*\"}"
85+ -d "{\"body\":\"Escrow lock released — PR #$PR_NUM was closed without merging.\n\nThis bounty is open for new submissions.\n\n---\n*-- SolFoundry Bot*\"}"
8686
8787 echo "Escrow lock cleaned up for issue #$ISSUE_NUM"
0 commit comments