Skip to content

fix: v2 CI breaking changes check#24445

Merged
supalarry merged 4 commits intomainfrom
lauris/cal-6569-fix-ci-v2-breaking-changes-check
Oct 14, 2025
Merged

fix: v2 CI breaking changes check#24445
supalarry merged 4 commits intomainfrom
lauris/cal-6569-fix-ci-v2-breaking-changes-check

Conversation

@supalarry
Copy link
Contributor

Fixes #24444

@supalarry supalarry requested a review from a team October 14, 2025 09:00
@supalarry supalarry requested review from a team as code owners October 14, 2025 09:00
@linear
Copy link

linear bot commented Oct 14, 2025

@github-actions github-actions bot added api area: API, enterprise API, access token, OAuth ci area: CI, DX, pipeline, github actions High priority Created by Linear-GitHub Sync platform Anything related to our platform plan labels Oct 14, 2025
@graphite-app graphite-app bot requested a review from a team October 14, 2025 09:00
@keithwillcode keithwillcode added the core area: core, team members only label Oct 14, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 14, 2025

Walkthrough

The GetTeamMembershipsInput class in apps/api/v2/src/modules/teams/memberships/inputs/get-team-memberships.input.ts now extends SkipTakePagination instead of GetUsersInput. The import for GetUsersInput was removed, and an import for SkipTakePagination from @calcom/platform-types was added. Existing validation and API property decorators for the emails field remain unchanged.

Possibly related PRs

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title Check ✅ Passed The title reflects the primary purpose of the changes, which is to fix the v2 CI breaking changes check by restoring default pagination behavior, and it directly relates to the modifications in the changeset.
Linked Issues Check ✅ Passed The changes update GetTeamMembershipsInput to extend SkipTakePagination, thereby reintroducing default skip and take values as specified in issue #24444.
Out of Scope Changes Check ✅ Passed All modifications are confined to restoring the base class and imports in the GetTeamMembershipsInput file, with no unrelated changes detected.
Description Check ✅ Passed The description references issue #24444, which corresponds to the goal of the pull request, making it clearly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch lauris/cal-6569-fix-ci-v2-breaking-changes-check

📜 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 870e953 and 06fea9f.

📒 Files selected for processing (1)
  • apps/api/v2/src/modules/teams/memberships/inputs/get-team-memberships.input.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

**/*.ts: For Prisma queries, only select data you need; never use include, always use select
Ensure the credential.key field is never returned from tRPC endpoints or APIs

Files:

  • apps/api/v2/src/modules/teams/memberships/inputs/get-team-memberships.input.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js .utc() in hot paths like loops

Files:

  • apps/api/v2/src/modules/teams/memberships/inputs/get-team-memberships.input.ts
**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

Flag default exports and encourage named exports. Named exports provide better tree-shaking, easier refactoring, and clearer imports. Exempt main components like pages, layouts, and components that serve as the primary export of a module.

Files:

  • apps/api/v2/src/modules/teams/memberships/inputs/get-team-memberships.input.ts
🧬 Code graph analysis (1)
apps/api/v2/src/modules/teams/memberships/inputs/get-team-memberships.input.ts (1)
packages/platform/types/pagination/pagination.input.ts (1)
  • SkipTakePagination (26-52)
🔇 Additional comments (1)
apps/api/v2/src/modules/teams/memberships/inputs/get-team-memberships.input.ts (1)

5-7: LGTM – pagination defaults restored. Switch to SkipTakePagination reintroduces the default skip/take values and no other GetUsersInput functionality is used.


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.

@supalarry supalarry added ready-for-e2e and removed core area: core, team members only labels Oct 14, 2025
@dosubot dosubot bot added the 🐛 bug Something isn't working label Oct 14, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/api/v2/src/modules/users/inputs/get-users.input.ts (1)

23-33: Critical: Runtime behavior doesn't match the OpenAPI schema default.

Same issue as the take property—the default: DEFAULT_SKIP in the ApiProperty decorator (line 27) declares a default in the OpenAPI schema, but the Transform decorator (line 29) returns undefined when no value is provided.

Apply this diff to provide the actual runtime default:

-  @Transform(({ value }: { value: string }) => value && parseInt(value))
+  @Transform(({ value }: { value: string }) => (value ? parseInt(value) : DEFAULT_SKIP))

Additionally, consider using @ApiPropertyOptional for consistency:

-  @ApiProperty({
-    required: false,
+  @ApiPropertyOptional({
     description: "The number of items to skip",
     example: 0,
     default: DEFAULT_SKIP,
   })
📜 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 06d6c18 and e751add.

📒 Files selected for processing (2)
  • apps/api/v2/src/modules/users/inputs/get-users.input.ts (1 hunks)
  • packages/platform/types/pagination/pagination.input.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.ts

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

**/*.ts: For Prisma queries, only select data you need; never use include, always use select
Ensure the credential.key field is never returned from tRPC endpoints or APIs

Files:

  • packages/platform/types/pagination/pagination.input.ts
  • apps/api/v2/src/modules/users/inputs/get-users.input.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/review.mdc)

Flag excessive Day.js use in performance-critical code; prefer native Date or Day.js .utc() in hot paths like loops

Files:

  • packages/platform/types/pagination/pagination.input.ts
  • apps/api/v2/src/modules/users/inputs/get-users.input.ts
**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

Flag default exports and encourage named exports. Named exports provide better tree-shaking, easier refactoring, and clearer imports. Exempt main components like pages, layouts, and components that serve as the primary export of a module.

Files:

  • packages/platform/types/pagination/pagination.input.ts
  • apps/api/v2/src/modules/users/inputs/get-users.input.ts
🧬 Code graph analysis (1)
apps/api/v2/src/modules/users/inputs/get-users.input.ts (1)
packages/platform/types/pagination/pagination.input.ts (2)
  • DEFAULT_TAKE (23-23)
  • DEFAULT_SKIP (24-24)
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Install dependencies / Yarn install & cache
🔇 Additional comments (2)
packages/platform/types/pagination/pagination.input.ts (1)

23-24: LGTM!

Exporting these constants enables consistent pagination defaults across modules while maintaining DRY principles.

apps/api/v2/src/modules/users/inputs/get-users.input.ts (1)

5-6: LGTM!

Clean import of the newly exported pagination constants.

@vercel
Copy link

vercel bot commented Oct 14, 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 Oct 14, 2025 10:09am
cal-eu Ignored Ignored Oct 14, 2025 10:09am

@keithwillcode keithwillcode added the core area: core, team members only label Oct 14, 2025
export class GetTeamMembershipsInput extends GetUsersInput {
import { SkipTakePagination } from "@calcom/platform-types";

export class GetTeamMembershipsInput extends SkipTakePagination {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

GetUsersInput consists of emails, skip and take and we process emails differently in GetTeamMembershipsInput and need previous skip and take so we just extend SkipTakePagination instead of GetUsersInput

@github-actions
Copy link
Contributor

E2E results are ready!

@supalarry supalarry merged commit 947b05b into main Oct 14, 2025
39 of 40 checks passed
@supalarry supalarry deleted the lauris/cal-6569-fix-ci-v2-breaking-changes-check branch October 14, 2025 11:46
@supalarry supalarry mentioned this pull request Oct 14, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api area: API, enterprise API, access token, OAuth 🐛 bug Something isn't working ci area: CI, DX, pipeline, github actions core area: core, team members only High priority Created by Linear-GitHub Sync platform Anything related to our platform plan ready-for-e2e size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: CI v2 breaking changes check

3 participants