Skip to content

Commit 0bb39b1

Browse files
Chronoclaude
authored andcommitted
fix: overhaul GitHub bots -- review pipeline, spam guard, messaging, CodeRabbit
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f418700 commit 0bb39b1

10 files changed

Lines changed: 94 additions & 99 deletions

.coderabbit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ reviews:
2929
path_filters: []
3030

3131
auto_review:
32-
enabled: true
32+
enabled: false
3333
drafts: false
3434
base_branches:
3535
- main

.github/workflows/bounty-tracker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ jobs:
160160
pr_labels = [l["name"] for l in closing_pr.get("labels", [])]
161161
if "paid" in pr_labels:
162162
print(f"PR #{pr_num} already has 'paid' label — skipping duplicate notification")
163-
sys.exit(0)
163+
exit(0)
164164
165165
keyboard = {"inline_keyboard": [[{"text": "\U0001f440 View PR", "url": pr_url}]]}
166166
@@ -223,7 +223,7 @@ jobs:
223223
f"Check out the other [open bounties]"
224224
f"(https://github.com/{repo}/issues?q=is%3Aissue+is%3Aopen+label%3Abounty) "
225225
f"for more opportunities.\n\n"
226-
f"---\n*SolFoundry Bot \U0001f3ed*"
226+
f"---\n*-- SolFoundry Bot*"
227227
)
228228
requests.post(
229229
f"https://api.github.com/repos/{repo}/issues/{opr_num}/comments",

.github/workflows/claim-guard.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ jobs:
236236
f"- The project owner reviews and approves/denies your claim\n"
237237
f"- Once approved: 14-day deadline, AI review ≥7/10\n\n"
238238
f"Keep building — the top-tier bounties will open up.\n\n"
239-
f"⚠️ Star rewards and content bounties don't count toward tier progression.\n\n"
240-
f"*— SolFoundry Bot 🏭*"
239+
f"Star rewards and content bounties don't count toward tier progression.\n\n"
240+
f"---\n*-- SolFoundry Bot*"
241241
)
242242
gh_post(f"repos/{repo}/issues/{issue}/comments", {"body": body})
243243
exit(0)
@@ -274,7 +274,7 @@ jobs:
274274
f"⚠️ @{user} — You already have an active T3 claim (#{list(user_t3_claims)[0]}). "
275275
f"Please complete or release your existing claim before taking on another.\n\n"
276276
f"**One T3 bounty at a time** — these are large-scope projects that need full focus.\n\n"
277-
f"*— SolFoundry Bot 🏭*"
277+
f"---\n*-- SolFoundry Bot*"
278278
)
279279
gh_post(f"repos/{repo}/issues/{issue}/comments", {"body": body})
280280
exit(0)
@@ -287,7 +287,7 @@ jobs:
287287
f"**Your stats:** {t1_count} T1 + {t2_count} T2 completed bounties ✅\n"
288288
f"**Proposal:** {comment[:300]}{'...' if len(comment) > 300 else ''}\n\n"
289289
f"You'll be notified here when your claim is approved or denied.\n\n"
290-
f"*— SolFoundry Bot 🏭*"
290+
f"---\n*-- SolFoundry Bot*"
291291
)
292292
gh_post(f"repos/{repo}/issues/{issue}/comments", {"body": body})
293293

.github/workflows/escrow-cleanup.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -41,7 +41,7 @@ jobs:
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
@@ -52,7 +52,7 @@ jobs:
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

Comments
 (0)