Skip to content

Fix APIKey typing#16541

Merged
guillim merged 6 commits intomainfrom
c--fix-api-key-typing
Dec 15, 2025
Merged

Fix APIKey typing#16541
guillim merged 6 commits intomainfrom
c--fix-api-key-typing

Conversation

@Weiko
Copy link
Copy Markdown
Member

@Weiko Weiko commented Dec 12, 2025

Following this #16540
Those were not failing (yet) but were wrongly typed and error prone

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 11 files

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 12, 2025

🚀 Preview Environment Ready!

Your preview environment is available at: http://bore.pub:3923

This environment will automatically shut down when the PR is closed or after 5 hours.

Copy link
Copy Markdown
Contributor

@guillim guillim left a comment

Choose a reason for hiding this comment

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

LGTM, expect a need for synchronisation with our providers where we may have defined webhooks that have API key

@Body() body: JsonRpc,
@AuthWorkspace() workspace: WorkspaceEntity,
@AuthApiKey() apiKey: string | undefined,
@AuthApiKey() apiKey: ApiKeyEntity | undefined,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is going to break any current MCP users right ? are we ok with that ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is only a typing change, this won't break the actual logic behind it. Also, request object already types it correctly but this was not typed properly in controllers/resolvers.
The typing was wrong originally already, code expected things to be strings but they were objects. They were rarely accessed as values but simply checked if they were defined but I'd prefer to correct the typing right now to avoid any issue in the future. We had a real bug that I've fixed in this PR if you want an example #16540

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

My bad, I did not read 16540. Then it's 100% logic

@guillim guillim enabled auto-merge (squash) December 15, 2025 15:52
@guillim guillim self-requested a review December 15, 2025 15:53
@guillim guillim merged commit 039a3d9 into main Dec 15, 2025
57 checks passed
@guillim guillim deleted the c--fix-api-key-typing branch December 15, 2025 16:05
@twenty-eng-sync
Copy link
Copy Markdown

Hey @Weiko! After you've done the QA of your Pull Request, you can mark it as done here. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants