Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

@waleedlatif1 waleedlatif1 commented Jan 16, 2026

Summary

  • updated linear tools to enforce only required fields per api spec
  1. linear_create_issue - Fixed: Block was requiring both teamId AND projectId, but Linear API only requires teamId and title. Changed to only require teamId.
  2. linear_read_issues - Fixed: Block was requiring both teamId AND projectId, but these are optional filter parameters. Removed all required validation.
  3. linear_create_workflow_state - Fixed: Block was requiring color, but per https://github.com/linear/linear/blob/master/packages/sdk/src/schema.graphql, color is optional. Removed color validation.
  4. linear_update_comment - Fixed: Block was requiring body, but tool definition has it as optional (per Linear's CommentUpdateInput). Made body optional in block.
  5. linear_create_cycle - Fixed: Block was requiring name but NOT startsAt/endsAt. Per https://pkg.go.dev/github.com/guillermo/linear/linear-api:
    • teamId, startsAt, endsAt are required
    • name is optional (auto-generated by Linear if not provided)

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Jan 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
docs Skipped Skipped Jan 16, 2026 2:55am

Review with Vercel Agent

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 16, 2026

Greptile Summary

Aligned Linear block field requirements with the actual Linear API specification by making several fields optional that were incorrectly marked as required.

Key changes:

  • linear_read_issues: removed requirement for teamId and projectId (both optional filters)
  • linear_create_issue: removed requirement for projectId (only teamId and title required per API spec)
  • linear_create_cycle: changed from requiring name to requiring startDate and endDate (name auto-generated by Linear if omitted)
  • linear_update_comment: made body optional (can update other comment properties)
  • linear_create_workflow_state: made color optional (not required per API spec)

The PR correctly references the TypeScript interfaces in apps/sim/tools/linear/types.ts which define the actual API contracts. All changes make previously over-constrained operations match their corresponding TypeScript param interfaces.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes strictly align UI field requirements with the backend TypeScript API interfaces, removing false positives that would have blocked valid API calls. All modifications make fields optional that are already optional in the type definitions, improving usability without introducing bugs.
  • No files require special attention

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/linear.ts Updated field requirements to match Linear API spec - made optional fields truly optional (teamId, projectId, name, color, body) for various operations

Sequence Diagram

sequenceDiagram
    participant User
    participant LinearBlock
    participant ParamConfig
    participant TypeDefs
    participant LinearAPI

    User->>LinearBlock: Select operation (e.g., create_cycle)
    LinearBlock->>ParamConfig: Check field requirements
    
    alt Before PR (Incorrect)
        ParamConfig->>ParamConfig: Validate required: true for "name"
        ParamConfig->>User: Error: "Team ID and cycle name are required"
    end
    
    alt After PR (Correct)
        ParamConfig->>ParamConfig: Validate conditional required fields
        Note over ParamConfig: name is optional, only teamId + dates required
        ParamConfig->>TypeDefs: Build params with optional name
        TypeDefs->>LinearAPI: Send request with required fields only
        LinearAPI-->>User: Success (with auto-generated name)
    end
    
    Note over LinearBlock,TypeDefs: Changes apply to:<br/>- linear_read_issues (teamId, projectId optional)<br/>- linear_create_issue (projectId optional)<br/>- linear_create_cycle (name optional)<br/>- linear_update_comment (body optional)<br/>- linear_create_workflow_state (color optional)
Loading

@waleedlatif1 waleedlatif1 merged commit 51e3768 into staging Jan 16, 2026
6 of 7 checks passed
@waleedlatif1 waleedlatif1 deleted the fix/linear branch January 16, 2026 02:58
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.

2 participants