Skip to content

Conversation

kduprey
Copy link
Contributor

@kduprey kduprey commented Sep 29, 2025

Reverts #6887

Need to add status = 'accepted' to OrganizationInvitationAcceptedJSON interface for congruency.

Summary by CodeRabbit

  • Revert

    • Reverted the addition of user_id to organizationInvitation.accepted webhook payload. The event now uses the same payload schema as other organizationInvitation events; user_id is no longer included.
  • Refactor

    • Consolidated invitation webhook event types by merging organizationInvitation.accepted into the general OrganizationInvitation event type for a simpler, unified webhook interface.

@kduprey kduprey self-assigned this Sep 29, 2025
@Copilot Copilot AI review requested due to automatic review settings September 29, 2025 23:45
Copy link

linear bot commented Sep 29, 2025

Copy link

changeset-bot bot commented Sep 29, 2025

⚠️ No Changeset found

Latest commit: f0ccbd1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Sep 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
clerk-js-sandbox Ready Ready Preview Comment Sep 29, 2025 11:45pm

Copy link
Contributor

coderabbitai bot commented Sep 29, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The diff removes the specialized OrganizationInvitationAcceptedJSON type and the separate OrganizationInvitationAcceptedWebhookEvent. It folds the accepted event into OrganizationInvitationWebhookEvent and updates imports and unions accordingly. A changeset entry related to the user_id field on accepted events is deleted. No runtime logic or control flow changes.

Changes

Cohort / File(s) Summary
Changeset cleanup
\.changeset/blue-teeth-report.md
Deletes a changeset describing the addition of user_id to organizationInvitation.accepted webhook payloads.
Backend JSON types
packages/backend/src/api/resources/JSON.ts
Removes exported interface OrganizationInvitationAcceptedJSON that extended OrganizationInvitationJSON with required user_id.
Webhook type consolidation
packages/backend/src/api/resources/Webhooks.ts
Removes OrganizationInvitationAcceptedWebhookEvent and its JSON import; adds 'organizationInvitation.accepted' to OrganizationInvitationWebhookEvent union; updates WebhookEvent union to exclude the removed type.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my ears at types that flow,
One hop back—no extra JSON to show.
Invites accepted join the stream,
A single union, neat and clean.
Thump-thump! I file my carrots tight—
Less burrows, same moonlit bite. 🥕🌙

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-6887-kenton/user-3577-update-organizationinvitationjson-interface-to-include

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ea2bc26 and f0ccbd1.

📒 Files selected for processing (3)
  • .changeset/blue-teeth-report.md (0 hunks)
  • packages/backend/src/api/resources/JSON.ts (0 hunks)
  • packages/backend/src/api/resources/Webhooks.ts (1 hunks)

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

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reverts a previous feature that added a user_id field to organizationInvitation.accepted webhook events. The revert removes the specialized handling for accepted organization invitations and returns to using the generic organization invitation structure for all invitation-related webhook events.

  • Removes the OrganizationInvitationAcceptedJSON interface that extended the base invitation with a user_id field
  • Consolidates webhook event types to use a single OrganizationInvitationWebhookEvent for all invitation events
  • Removes the changeset documentation for the reverted feature

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/backend/src/api/resources/Webhooks.ts Removes specialized webhook event type and consolidates invitation events
packages/backend/src/api/resources/JSON.ts Removes the extended JSON interface with user_id field
.changeset/blue-teeth-report.md Removes changeset documentation for the reverted feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kduprey kduprey requested a review from tmilewski September 29, 2025 23:45
@kduprey kduprey closed this Sep 29, 2025
@kduprey kduprey deleted the revert-6887-kenton/user-3577-update-organizationinvitationjson-interface-to-include branch September 29, 2025 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants