Skip to content

Support GitHub review lifecycle triggers#131

Merged
khaliqgant merged 1 commit into
mainfrom
fix/github-review-trigger-catalog
May 28, 2026
Merged

Support GitHub review lifecycle triggers#131
khaliqgant merged 1 commit into
mainfrom
fix/github-review-trigger-catalog

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

Summary

  • add GitHub review edited/dismissed and review-thread resolved triggers to supported events and routing
  • include the review-family webhook entries in the GitHub mapping
  • regenerate the adapter-core trigger catalog without bumping package versions

Tests

  • npm run build --workspace @relayfile/adapter-core && npm test --workspace @relayfile/adapter-core -- --test-name-pattern='trigger catalog|generated trigger'
  • npm test --workspace @relayfile/adapter-github

@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR expands GitHub webhook support by adding handlers for pull request review lifecycle events. The change registers new event types (edited, dismissed, comment creation, thread resolution) across catalogs, implements a new ingestReviewThread handler in the GitHubAdapter, routes events appropriately, and updates all related tests.

Changes

GitHub PR Review Webhook Event Support

Layer / File(s) Summary
Event catalog registration
packages/core/src/triggers/catalog.generated.json, packages/core/src/triggers/catalog.generated.ts, packages/github/src/types.ts, packages/github/src/config.ts, packages/github/github.mapping.yaml
New pull request review events (pull_request_review.edited, pull_request_review.dismissed, pull_request_review_comment.created, pull_request_review_thread.resolved) are registered in generated catalogs, exported type definitions, default supported events, and webhook mappings.
Webhook event routing interface and configuration
packages/github/src/webhook/event-map.ts
WebhookAdapter interface gains new ingestReviewThread method. EVENT_MAP extends routing to handle edited/dismissed reviews via ingestReview, review comments via ingestReviewComment, and thread resolution via the new ingestReviewThread.
GitHubAdapter review-thread and review logic
packages/github/src/index.ts
New ingestReviewThread handler for thread events; ingestReview updated to derive event type from action and use write mode for submitted events (otherwise update); computePath, computeScopedPath, and resolveObjectId extended for review_thread object handling with PR-scoped paths and nested thread ID resolution.
Webhook router and adapter test updates
packages/github/src/webhook/__tests__/webhook-router.test.ts, packages/github/src/webhook/router.test.ts
Test mocks add ingestReviewThread handler. Test expectations updated to verify 19 supported events (up from 16) including new review-related events.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Review threads bloom and reviews take flight,
Edits, dismissals, comments—all in sight!
Webhooks route with clarity and care,
Thread paths scoped from repo to PR rare,
Handlers orchestrate with graceful flair! 🎯

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding support for GitHub review lifecycle triggers, which matches the core purpose of expanding review-related webhook events and triggers.
Description check ✅ Passed The description is directly related to the changeset, providing a clear summary of the three main objectives (adding events, webhook mappings, and regenerating catalogs) and listing specific test commands.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/github-review-trigger-catalog

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@khaliqgant khaliqgant merged commit 1b24113 into main May 28, 2026
2 of 3 checks passed
@khaliqgant khaliqgant deleted the fix/github-review-trigger-catalog branch May 28, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant