Skip to content

Add explicit clearing flags to issue update and project update - #281

Merged
schpetbot merged 1 commit into
mainfrom
schpet/clear-flags
Sep 5, 2026
Merged

Add explicit clearing flags to issue update and project update#281
schpetbot merged 1 commit into
mainfrom
schpet/clear-flags

Conversation

@schpetbot

Copy link
Copy Markdown
Collaborator

Third of a three-PR stack, based on #280 (which is based on #279). Merge those first.

issue update had --unassign and --clear-cycle and no other way to remove a value, and cliffy rejects an empty string as a missing option value, so --due-date "" could never work. This adds --clear-due-date, --clear-estimate, --clear-parent, --clear-project, and --clear-milestone on issue update, and --clear-lead, --clear-start-date, and --clear-target-date on project update. Each clear flag conflicts with its set flag with an actionable error, counts as an update for the "at least one option" guard, and sends an explicit null in the mutation input. Existing --unassign and --clear-cycle are unchanged.

Verified: 724 tests with exact-variables mocks pinning the explicit nulls, every clear read back through linear api on scratch objects (all deleted afterwards), a QA case table of 19 cases, and two high-effort Codex review passes (one suggestion-text fix; one "dangling milestone" claim checked live and found to be cascaded server-side by Linear).

https://claude.ai/code/session_01A9qEGri4p2HZMQSuYsBmub

@schpetbot
schpetbot force-pushed the schpet/entity-comments branch from ffc801e to ddbaa34 Compare September 4, 2026 21:13
@schpetbot
schpetbot force-pushed the schpet/entity-comments branch from ddbaa34 to c04834c Compare September 5, 2026 14:19
Base automatically changed from schpet/entity-comments to main September 5, 2026 14:22
issue update could set a due date, estimate, parent, project, or
milestone but never remove one, and project update had the same gap for
lead, start date, and target date. Only --unassign and --clear-cycle
existed. cliffy rejects an empty string as a missing option value, so
--due-date "" is not a workaround, and an agent driving the CLI had to
fall back to a hand-written projectUpdate/issueUpdate mutation through
linear api.

Add one boolean clear flag per field, each placed after its set flag and
modelled on --clear-cycle: it conflicts with its set flag (a
ValidationError before any request, with a null check so --estimate 0
counts as a value), skips the lookup the set flag would run, and puts an
explicit null in the mutation input. --clear-project also rejects
--milestone, because a milestone belongs to the project being removed;
--project with --clear-milestone is allowed so a move can detach a stale
milestone in one update. The project update guard treats each clear flag
as an update and its suggestion lists them.

Linear honours null for every field, including startDate, verified on a
scratch project and issue.

Claude-Session: https://claude.ai/code/session_01A9qEGri4p2HZMQSuYsBmub
@schpetbot
schpetbot merged commit d341afd into main Sep 5, 2026
15 checks passed
@schpetbot
schpetbot deleted the schpet/clear-flags branch September 5, 2026 14:25
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