feat: Allow campaign owners to cancel before funding completes#12
feat: Allow campaign owners to cancel before funding completes#120xdevcollins merged 2 commits intomainfrom
Conversation
Creators had no way to cancel their own campaigns — only admin could. Adds owner_cancel_campaign() allowing owners to cancel in Draft, Submitted, or Campaigning states. Existing pledges become refundable via process_refund_batch(). Cannot cancel after Funded. Closes #6 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 1 minutes and 7 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ance and registry modules
Summary
owner_cancel_campaign(campaign_id)— owner-authed cancel forDraft,Submitted, orCampaigningstatesInvalidStateif campaign isFundedor beyond (milestones in progress)refund_progress = 0so existing pledges are refundable viaprocess_refund_batch()vote_session_idif cancelling fromSubmittedCampaignCancelledByOwnerevent (distinct from admin'sCampaignCancelled)Closes #6
Test plan
test_owner_cancel_in_draft— owner cancels in Draft statustest_owner_cancel_in_campaigning_with_refunds— owner cancels with existing pledges → refunds worktest_owner_cancel_after_funded_fails— cannot cancel after campaign is Funded🤖 Generated with Claude Code