Skip to content

Conversation

@chadrwalters
Copy link

Summary

This PR adds two features to linearis:

  1. projects create command - Create Linear projects from the CLI

    • Required --team flag (accepts team key, name, or UUID; comma-separated for multiple)
    • Optional flags: --description, --color, --icon, --lead, --target-date, --start-date, --state
    • Input validation for dates (YYYY-MM-DD) and state values
  2. --sort-order flag for issues create and issues update

    • Control issue position relative to other issues (lower values = higher in list)
    • Input validation for numeric values

Changes

  • Added GraphQLProjectsService with createProject() method
  • Added ProjectCreateArgs type definition
  • Added PROJECT_FRAGMENT and CREATE_PROJECT_MUTATION GraphQL queries
  • Extended LinearProject type to include startDate field
  • Added 10 unit tests for the new functionality
  • Updated CHANGELOG

Testing

# Test projects create help
linearis projects create --help

# Test validation
linearis projects create "Test" --team ENG --start-date "invalid"
# Error: Invalid --start-date "invalid". Must be YYYY-MM-DD format.

linearis issues create "Test" --team ENG --sort-order invalid
# Error: Invalid --sort-order value "invalid": must be a number

# All unit tests pass
npm test

Checklist

  • Tests pass (npm test)
  • Follows Conventional Commits
  • Updated CHANGELOG

🤖 Generated with Claude Code

Chad Walters and others added 13 commits January 14, 2026 12:28
Add Number.isFinite validation to catch non-numeric input like
"--sort-order foo" and provide clear error message instead of
letting NaN propagate to GraphQL API.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Allow users to reorder issues using the update command:
  linearis issues update ABC-123 --sort-order 1.5

Includes Number.isFinite validation to catch non-numeric input.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add TypeScript interface for project creation with required teamIds
field and optional fields: description, color, icon, leadId,
targetDate, startDate, state.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create src/queries/projects.ts with PROJECT_FRAGMENT,
  CREATE_PROJECT_MUTATION, and LIST_PROJECTS_QUERY
- Create GraphQLProjectsService with createProject() method
- Support team ID resolution (key, name, or UUID)
- Require UUID for leadId (Linear API limitation)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add CLI command to create Linear projects:
  linearis projects create "Project Name" --team ENG

Features:
- Required --team flag (can specify multiple with commas)
- Optional description, color, icon, lead, dates, state
- Validates state against allowed values
- Uses GraphQL for efficient single-query creation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Wolf review caught that startDate was fetched via GraphQL but
dropped in transformProject and missing from LinearProject type.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add YYYY-MM-DD format validation for --start-date and --target-date
to fail fast with clear error message instead of cryptic GraphQL errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Tests cover:
- Project creation with team resolution
- UUID passthrough for team IDs
- Lead ID UUID validation
- Optional field handling
- GraphQL failure handling
- startDate inclusion in response (Wolf fix verification)
- listProjects with team filtering

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added entries for:
- projects create command with required --team flag
- --sort-order flag for issues create/update
- startDate fix for LinearProject type

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add startDate field to getProjects() output in LinearService
- Normalize GraphQL null responses to undefined in transformProject
- Ensures consistent API response handling across service layers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mwolson
Copy link

mwolson commented Jan 15, 2026

If a view is using the "sort by priority" option, it would also be neat to support --priority-sort-order for mutating the prioritySortOrder field.

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