Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • add additional output params for remaining linear tools

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 Nov 21, 2025

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

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Nov 21, 2025 3:05am

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 21, 2025

Greptile Overview

Greptile Summary

This PR adds comprehensive output parameters and fixes bugs in Linear tools to provide complete API coverage.

Key Changes

  • Extended filtering for read_issues: Added assignee, state, priority, label filters, date ranges, pagination, and sorting options
  • Complete issue creation/update: Added support for all Linear issue fields including assignee, priority, labels, cycle, parent, due date, subscribers, and milestone
  • Bug fixes:
    • Fixed archive_label to use correct issueLabelArchive mutation instead of issueLabelDelete
    • Fixed create_project to use single teamId instead of teamIds array
    • Added missing projectId parameter to create_project_label and create_project_status
  • Documentation improvements: Updated all parameter descriptions with clear format specifications and clarified relation type behavior
  • Type safety: Updated TypeScript interfaces to match all parameter changes with correct optional/required flags

All changes maintain backward compatibility by making new parameters optional.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are well-structured bug fixes and feature enhancements that add comprehensive parameter support to Linear tools. All new parameters are optional, maintaining backward compatibility. The bug fixes correct incorrect API calls (archive vs delete, teamId vs teamIds array) which will improve functionality. Type definitions are properly updated and documentation is thorough.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/tools/linear/read_issues.ts 5/5 Added comprehensive filtering and pagination parameters for issue querying with proper GraphQL query expansion
apps/sim/tools/linear/create_issue.ts 5/5 Added support for all issue creation parameters including assignee, priority, labels, cycle, parent, due date, subscribers, and milestone
apps/sim/tools/linear/update_issue.ts 5/5 Added missing parameters for issue updates including project, cycle, parent, due date, and separate add/remove label operations
apps/sim/tools/linear/archive_label.ts 5/5 Fixed mutation to use issueLabelArchive instead of issueLabelDelete for correct archive operation
apps/sim/tools/linear/create_project.ts 5/5 Changed teamIds array to single teamId parameter to match Linear API requirements
apps/sim/tools/linear/create_project_label.ts 5/5 Added required projectId parameter that was missing from project label creation
apps/sim/tools/linear/create_project_status.ts 5/5 Added required projectId parameter that was missing from project status creation
apps/sim/tools/linear/types.ts 5/5 Updated TypeScript interfaces to reflect new optional/required parameters and correct types across all Linear tool operations

Sequence Diagram

sequenceDiagram
    participant User
    participant SimTool as Linear Tool
    participant LinearAPI as Linear GraphQL API
    
    Note over User,LinearAPI: Example: Creating Issue with Extended Parameters
    User->>SimTool: linear_create_issue(teamId, title, assigneeId, priority, labels, etc.)
    SimTool->>SimTool: Build GraphQL input with all parameters
    SimTool->>LinearAPI: POST /graphql with issueCreate mutation
    LinearAPI->>LinearAPI: Validate and create issue
    LinearAPI-->>SimTool: Return issue with all fields
    SimTool->>SimTool: Transform response to include all output fields
    SimTool-->>User: Return comprehensive issue object
    
    Note over User,LinearAPI: Example: Reading Issues with Filters
    User->>SimTool: linear_read_issues(teamId, assigneeId, stateId, priority, labelIds, etc.)
    SimTool->>SimTool: Build filter object from parameters
    SimTool->>LinearAPI: POST /graphql with issues query
    LinearAPI->>LinearAPI: Apply filters and pagination
    LinearAPI-->>SimTool: Return filtered issues with pagination info
    SimTool->>SimTool: Transform response with hasNextPage and endCursor
    SimTool-->>User: Return filtered issues array with pagination
    
    Note over User,LinearAPI: Example: Bug Fixes
    User->>SimTool: linear_archive_label(labelId)
    SimTool->>LinearAPI: POST /graphql with issueLabelArchive (was issueLabelDelete)
    LinearAPI-->>SimTool: Return success
    SimTool-->>User: Return success status
    
    User->>SimTool: linear_create_project(teamId, name)
    SimTool->>LinearAPI: POST /graphql with teamId (was teamIds array)
    LinearAPI-->>SimTool: Return created project
    SimTool-->>User: Return project object
Loading

Copy link
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.

13 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

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