Skip to content

fix(webhooks): isolate per-issue errors and deduplicate linked issues in handlePullRequest (#47) - #72

Open
ghzhost wants to merge 1 commit into
MergeFi:mainfrom
ghzhost:fix/47-webhooks-isolated-issue-processing
Open

fix(webhooks): isolate per-issue errors and deduplicate linked issues in handlePullRequest (#47)#72
ghzhost wants to merge 1 commit into
MergeFi:mainfrom
ghzhost:fix/47-webhooks-isolated-issue-processing

Conversation

@ghzhost

@ghzhost ghzhost commented Aug 16, 2026

Copy link
Copy Markdown

Summary

Addresses Issue #47 by hardening GithubWebhooksService.handlePullRequest:

  1. Deduplicates issue numbers: PR descriptions referencing an issue multiple times (e.g. "Fixes N+1 query and unbounded loop patterns across bounty expiry, milestone resolution, and reputation computation will not scale past a few hundred rows #12. Also resolves N+1 query and unbounded loop patterns across bounty expiry, milestone resolution, and reputation computation will not scale past a few hundred rows #12") are deduplicated before iteration to prevent attempting duplicate state transitions and spurious webhook failures.
  2. Per-issue error isolation: Wraps each linked issue processing in a dedicated try/catch block so that a failure on one bounty does not abort processing of subsequent linked bounties in the same PR.
  3. Aggregated error reporting: Collects any per-issue failures and reports them in the aggregate WebhookEvent.error field for clear operator visibility while allowing partial successes to complete.

Verification

Closes #47

@vercel

vercel Bot commented Aug 16, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the chonilius' projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment