Skip to content

feat: add cycle support to issue commands#150

Merged
schpet merged 1 commit intoschpet:mainfrom
jholm117:feat/cycle-flag
Feb 24, 2026
Merged

feat: add cycle support to issue commands#150
schpet merged 1 commit intoschpet:mainfrom
jholm117:feat/cycle-flag

Conversation

@jholm117
Copy link
Contributor

Summary

  • Add --cycle flag to issue create and issue update commands, accepting cycle name, number, or active keyword
  • Display cycle in issue view output alongside project and milestone metadata
  • New getCycleIdByNameOrNumber helper queries team cycles via GraphQL

Test plan

  • 208 tests passing (3 new snapshot tests for cycle in create/update/view)
  • deno check, deno lint clean
  • Manual: linear issue update PLA4-10034 --team PLA4 --cycle active — verified cycle set via issue view

🤖 Generated with Claude Code

Add --cycle flag to issue create and update commands, accepting cycle
name, number, or 'active' keyword. Display cycle in issue view output
alongside project and milestone metadata.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@schpet schpet merged commit e24ef1d into schpet:main Feb 24, 2026
7 checks passed
@schpet
Copy link
Owner

schpet commented Feb 24, 2026

@jholm117 nice, thanks! similarly issue list would benefit from cycle support if that's something you may use #64

@regaw-leinad
Copy link
Contributor

picked this up, added --cycle to issue list plus cycle list and cycle view commands in #162

schpet pushed a commit that referenced this pull request Mar 4, 2026
### Summary
- Add `linear cycle list` and `linear cycle view` commands for browsing
team cycles
- Add `--cycle` filter to `linear issue list` for filtering issues by
cycle
- Regenerate skill docs to include new commands

### Problem
PR #150 added cycle support to issue create/update/view, but there was
no way to browse cycles themselves or filter issue lists by cycle. Users
had to know cycle names/numbers without being able to look them up from
the CLI. See #64.

### Fix
Adds a `cycle` command group (aliased `cy`) with two subcommands,
following the same patterns as the existing `milestone` commands:

**`cycle list`** shows all cycles for a team with number, name, dates,
and status. Active cycle is highlighted in green, upcoming cycles use
default color, and completed/past cycles are muted.

```
$ linear cycle list --team XXX
#  NAME       START      END        STATUS
3  Sprint 3   2026-03-10 2026-03-24 Upcoming
2  Sprint 2   2026-02-24 2026-03-10 Active
1  Sprint 1   2026-02-10 2026-02-24 Completed
```

**`cycle view`** shows full cycle details including a progress
indicator, description, issue breakdown by state, and first 10 issues.
Accepts cycle name, number, or "active".

```
$ linear cycle view active --team XXX
# Sprint 2

**Number:** 2
**Start:** 2026-02-24
**End:** 2026-03-10
**Status:** Active
**Team:** MyTeam (XXX)

## Issues

**Progress:** 17/50 (34%)
**Total Issues:** 50
**Completed:** 17
**In Progress:** 12
**To Do:** 21

**Issues:**
- XXX-412: Fix auth token refresh (In Progress)
- XXX-398: Add dark mode toggle (Todo)
...
```

**`issue list --cycle`** filters the issue list to a specific cycle,
reusing the existing `getCycleIdByNameOrNumber()` utility and the
GraphQL `IssueFilter.cycle` field.

```
$ linear issue list --cycle active --team XXX --sort priority
◌   ID      TITLE                  LABELS          E STATE UPDATED
--- XXX-101 Some task              Backend, Feature - Todo  1 day ago
--- XXX-102 Another task           Feature          - Todo  1 day ago
```

### Why
Cycles are a core part of the Linear workflow and the CLI should support
browsing them. `cycle list` lets you see what's available, `cycle view`
gives you sprint progress at a glance, and `--cycle` on issue list lets
you scope your view to a specific sprint.

### Test Plan
- Tested all three commands against a real Linear workspace with 11
cycles and 50+ issues
- `cycle view` tested with active, by number, and by exact name lookup
- All 220 unit/snapshot tests pass
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.

3 participants