Skip to content

feat: add ralph-starter sync command for Linear status sync #199

@rubenmarcus

Description

@rubenmarcus

Summary

Add a ralph-starter sync command that checks GitHub PR merge state and updates Linear issue status accordingly.

Usage

ralph-starter sync [--source linear] [--project owner/repo]

How it works

  1. Query Linear for issues with status "In Progress" in the ralph-starter project
  2. For each issue, check if the issue identifier (e.g. ENG-42) appears in any open/merged GitHub PR via gh pr list --search "ENG-42"
  3. If PR is merged → update Linear to "Done" + add comment with PR URL
  4. If PR is closed (not merged) → add comment "PR closed without merge"
  5. If PR is open → keep "In Progress"

Implementation

Files to create/modify

  • src/commands/sync.ts — New sync command (~150 lines)
  • src/cli.ts — Register sync command
  • docs/docs/cli/sync.md — Documentation

Dependencies

Acceptance criteria

  • ralph-starter sync queries Linear and syncs status
  • Merged PRs → Linear "Done" + comment
  • Closed PRs → Linear comment
  • Open PRs → no change
  • Dry-run mode: ralph-starter sync --dry-run
  • Tests for sync logic

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions