fix(github-webhook): check membership across multiple teams#7706
fix(github-webhook): check membership across multiple teams#7706aidankmcalister wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe webhook's team membership verification now checks multiple GitHub organization teams concurrently. It transitions from a single hardcoded team lookup to parallel requests against both Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/docs/src/app/api/github-webhook/route.ts`:
- Around line 41-49: The GitHub membership fetches using teamSlugs ->
Promise.all are missing timeouts and error handling; update the logic around
membershipResults / isTeamMember to use per-request AbortController (or a shared
timeout) and wrap the parallel calls so failures don’t reject the whole
Promise.all: either use Promise.allSettled or catch individual fetch errors,
treat non-200 or errored responses as non-members, and ensure you pass
authHeaders into each fetch and clear/handle the abort signal; update the code
paths that compute membershipResults and isTeamMember to reflect these guarded
outcomes so network timeouts or fetch errors return false rather than throwing.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 55398a16-9abf-4ea7-9441-bea25be838c7
📒 Files selected for processing (1)
apps/docs/src/app/api/github-webhook/route.ts
Summary by CodeRabbit