-
Notifications
You must be signed in to change notification settings - Fork 0
Fix type error in Linear webhooks example #129
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
base: codegen-bot/update-linear-webhooks-example
Are you sure you want to change the base?
Fix type error in Linear webhooks example #129
Conversation
Reviewer's GuideThis PR addresses a mypy type error in the Linear webhooks example by importing the proper types and adding a runtime type guard with a fallback in the File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
This PR fixes the type error in the Linear webhooks example that was causing the mypy check to fail.
Changes:
Added proper type checking in the
handle_issue
method to check ifevent.data
is an instance ofLinearIssue
before accessing thetitle
attribute.Added explicit imports for
LinearIssue
andLinearComment
types.Added a fallback case for when the event data is not of the expected type.
This fixes the mypy error:
💻 View my work • About Codegen
Summary by Sourcery
Fix type error in Linear webhooks example by adding proper type checks and fallback handling in handle_issue.
Bug Fixes:
Enhancements: