Skip to content

feat: add --due-date flag to create and update#1

Open
muqsitnawaz wants to merge 1 commit intomainfrom
feat/due-date-flag
Open

feat: add --due-date flag to create and update#1
muqsitnawaz wants to merge 1 commit intomainfrom
feat/due-date-flag

Conversation

@muqsitnawaz
Copy link
Copy Markdown
Contributor

Summary

  • linear create --due-date YYYY-MM-DD sets the due date at creation time.
  • linear update <id> --due-date YYYY-MM-DD sets it on existing issues; --due-date none clears it.
  • Uses Linear's TimelessDate (date-only) field on IssueUpdateInput.dueDate / IssueCreateInput.dueDate.
  • Validation via datetime.date.fromisoformat — stdlib only, zero new dependencies.

Why

Linear's web UI and the official @linear/cli both expose due dates as a first-class field. linear-cli previously fetched and sorted by dueDate but had no way to set one — so users had to fall through to GraphQL by hand. Closes that gap with two flags and one helper.

Verified end-to-end against the Linear API

```
$ linear update RUSH-565 --due-date 2026-04-26
RUSH-565 -> due: 2026-04-26

$ linear update RUSH-565 --due-date none
RUSH-565 -> due: cleared

$ linear update RUSH-565 --due-date not-a-date
Invalid --due-date 'not-a-date'. Use YYYY-MM-DD (e.g. 2026-04-28) or 'none'.

$ linear create "TEST" --due-date 2026-12-31
Created RUSH-566: TEST [no cycle | Muqsit]

(verified dueDate=2026-12-31 via GraphQL, then deleted)

```

Test plan

  • Create with valid date sets dueDate (verified via GraphQL read-back)
  • Update with valid date sets dueDate
  • Update with none clears dueDate
  • Invalid date string exits non-zero with a clear message
  • Help text lists --due-date for both subcommands
  • Existing flows untouched (no other args/handlers changed)

Linear's TimelessDate (YYYY-MM-DD). On update, 'none' clears the date.
Validation uses datetime.date.fromisoformat (stdlib, no new deps).
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.

1 participant