Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support for platform wide webhooks #14092

Merged

Conversation

SomayChauhan
Copy link
Member

@SomayChauhan SomayChauhan commented Mar 14, 2024

What does this PR do?

LOOM

Fixes #13587

Type of change

  • New feature (non-breaking change which adds functionality)

How should this be tested?

Mandatory Tasks

  • Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Copy link

vercel bot commented Mar 14, 2024

@SomayChauhan is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the ❗️ migrations contains migration files label Mar 14, 2024
Copy link
Contributor

github-actions bot commented Mar 14, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@github-actions github-actions bot added consumer High priority Created by Linear-GitHub Sync webhooks area: webhooks, callback, webhook payload ✨ feature New feature or request 🎨 needs design Before engineering kick-off, a designer needs to submit a mockup labels Mar 14, 2024
@SomayChauhan SomayChauhan force-pushed the feat/support-for-platform-wide-webhooks branch from 602e019 to 69513b1 Compare March 14, 2024 15:30
@SomayChauhan SomayChauhan force-pushed the feat/support-for-platform-wide-webhooks branch from 2ee4320 to 7ecb109 Compare March 15, 2024 07:17
Copy link
Contributor

github-actions bot commented Mar 15, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@SomayChauhan SomayChauhan marked this pull request as ready for review March 15, 2024 10:04
@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Mar 15, 2024
@graphite-app graphite-app bot requested a review from a team March 15, 2024 10:04
Copy link

graphite-app bot commented Mar 15, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (03/15/24)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add community label" took an action on this PR • (03/15/24)

1 label was added to this PR based on Keith Williams's automation.

@SomayChauhan SomayChauhan self-assigned this Mar 15, 2024
Copy link
Member

@CarinaWolli CarinaWolli left a comment

Choose a reason for hiding this comment

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

Left two comments that need to be addressed first 🙏


if (input.eventTypeId) {
andCondition.push({ eventTypeId: input.eventTypeId });
} else if (input.teamId) {
andCondition.push({ teamId: input.teamId });
} else if (ctx.user.role == "ADMIN") {
andCondition.push({ platform: true });
Copy link
Member

Choose a reason for hiding this comment

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

with this, the ADMIN won't be able to delete any of their other event types anymore

Copy link
Member Author

Choose a reason for hiding this comment

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

i see 🤔

@@ -127,7 +143,6 @@ const WebhooksList = ({ webhooksByViewer }: { webhooksByViewer: WebhooksByViewer
<WebhookListItem
key={webhook.id}
webhook={webhook}
readOnly={group.metadata?.readOnly ?? false}
Copy link
Member

Choose a reason for hiding this comment

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

why was that removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

A mistake, sorry!!

@CarinaWolli
Copy link
Member

@SomayChauhan can you take a look at the type error?

@SomayChauhan
Copy link
Member Author

@SomayChauhan can you take a look at the type error?

fixed 👍

Copy link
Member

@CarinaWolli CarinaWolli left a comment

Choose a reason for hiding this comment

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

Great work, everything looks good now 🙌🏻

@CarinaWolli CarinaWolli merged commit 7e55788 into calcom:main Mar 18, 2024
29 of 37 checks passed
@dosubot dosubot bot modified the milestones: v4.1, v4.0 Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Created by Linear-GitHub Sync consumer ✨ feature New feature or request High priority Created by Linear-GitHub Sync ❗️ migrations contains migration files 🎨 needs design Before engineering kick-off, a designer needs to submit a mockup webhooks area: webhooks, callback, webhook payload
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3130] Support webhooks that listen to platform-wide events
3 participants