Skip to content

Fix: Add title field to LinearComment to prevent AttributeError #996

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

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

codegen-sh[bot]
Copy link
Contributor

@codegen-sh codegen-sh bot commented Mar 31, 2025

Description

This PR fixes an error that occurs when handling Linear comment events. The error message is:

'LinearComment' object has no attribute 'title'

The issue happens when code tries to access event.data.title on a LinearComment object, but the LinearComment class doesn't have a title attribute.

Changes

  • Added an optional title field with a default value of None to the LinearComment class
  • Updated type hints to use more explicit Optional and Union types from the typing module

Testing

This change should prevent the AttributeError when handling Linear comment events while maintaining backward compatibility with existing code.

Fixes issue CG-17839

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants