Skip to content

Conversation

@codegen-sh
Copy link
Contributor

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

This PR adds multimodal support for Linear, allowing the codegen bot to handle file attachments from Linear issues.

Changes:

  1. Enhanced LinearEvent model to include attachments

  2. Added new models for file attachments and upload responses

  3. Added methods to the LinearClient class:

    • get_issue_attachments: Fetches attachments for an issue
    • download_attachment: Downloads a file attachment
    • request_upload_url: Requests a pre-signed URL for file upload
    • upload_file: Uploads a file to Linear
  4. Updated the Linear event handler class:

    • Added a client property to access the Linear API
    • Enhanced event handling to automatically fetch attachments for issues
    • Added methods to download and upload files

These changes enable the codegen bot to:

  • Automatically fetch file attachments when handling Linear events
  • Download attachments to local storage for processing
  • Upload files to Linear when needed

This implementation follows a similar pattern to the Slack multimodal support, but is adapted for Linear's specific API requirements.

"""
try:
# Download the attachment
content = self.client.download_attachment(attachment.url)
Copy link
Contributor

Choose a reason for hiding this comment

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

call this raw_content

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.

1 participant