Skip to content

Comments

feat: pass event type#24098

Merged
Udit-takkar merged 6 commits intofeat/cal-ai-event-typefrom
feat/support-event-type
Oct 6, 2025
Merged

feat: pass event type#24098
Udit-takkar merged 6 commits intofeat/cal-ai-event-typefrom
feat/support-event-type

Conversation

@Udit-takkar
Copy link
Contributor

@Udit-takkar Udit-takkar commented Sep 26, 2025

What does this PR do?

  • Fixes #XXXX (GitHub issue number)
  • Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)

Completes #24093

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • N/A I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 26, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/support-event-type

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
🧪 Early access (Sonnet 4.5): enabled

We are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience.

Note:

  • Public repositories are always opted into early access features.
  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.

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

@graphite-app graphite-app bot requested a review from a team September 26, 2025 10:41
@keithwillcode keithwillcode added core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO labels Sep 26, 2025
@dosubot dosubot bot added event-types area: event types, event-types ✨ feature New feature or request labels Sep 26, 2025
Comment on lines 1427 to 1431
const eventType = await this.prismaClient.eventType.findFirst({
where: {
id: eventTypeId,
userId,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

if data is not required, it's better to use a count instead of findFirst.

const count = await this.prismaClient.eventType.count({
    where: { id: eventTypeId, userId },
  })

  return count > 0

Copy link
Contributor

@joeauyeung joeauyeung left a comment

Choose a reason for hiding this comment

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

We should also address @volnei's comment as well

@github-actions github-actions bot marked this pull request as draft September 29, 2025 20:27
@vercel
Copy link

vercel bot commented Sep 30, 2025

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

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
cal Ignored Ignored Sep 30, 2025 0:24am
cal-eu Ignored Ignored Sep 30, 2025 0:24am

@pull-request-size pull-request-size bot added size/L and removed size/M labels Sep 30, 2025
@Udit-takkar Udit-takkar marked this pull request as ready for review September 30, 2025 12:23
return workflow.activeOn.map((active) => active.eventTypeId);
}

static async getEventTypeIdsByWorkflowStepId({ workflowStepId }: { workflowStepId: number }) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

todo: refactor these to not use static method after inbound call PR has been merged

Copy link
Contributor

Choose a reason for hiding this comment

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

@Udit-takkar we can introduce a new method even keeping the existing ones to avoid breaking changes and use the instance of this class. What do you think? This is similar on what I did here #24190

Copy link
Contributor

@joeauyeung joeauyeung left a comment

Choose a reason for hiding this comment

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

LGTM

@Udit-takkar Udit-takkar merged commit 0d1b8cf into feat/cal-ai-event-type Oct 6, 2025
14 checks passed
@Udit-takkar Udit-takkar deleted the feat/support-event-type branch October 6, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO event-types area: event types, event-types ✨ feature New feature or request ready-for-e2e size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants