Add explicit clearing flags to issue update and project update - #281
Merged
Conversation
schpetbot
force-pushed
the
schpet/entity-comments
branch
from
September 4, 2026 21:13
ffc801e to
ddbaa34
Compare
schpetbot
force-pushed
the
schpet/clear-flags
branch
from
September 4, 2026 21:13
27cd012 to
36dfc69
Compare
schpetbot
force-pushed
the
schpet/entity-comments
branch
from
September 5, 2026 14:19
ddbaa34 to
c04834c
Compare
schpetbot
force-pushed
the
schpet/clear-flags
branch
from
September 5, 2026 14:19
36dfc69 to
1a8b4d3
Compare
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
force-pushed
the
schpet/clear-flags
branch
from
September 5, 2026 14:22
1a8b4d3 to
71ce80a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third of a three-PR stack, based on #280 (which is based on #279). Merge those first.
issue updatehad--unassignand--clear-cycleand 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-milestoneonissue update, and--clear-lead,--clear-start-date, and--clear-target-dateonproject 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 explicitnullin the mutation input. Existing--unassignand--clear-cycleare unchanged.Verified: 724 tests with exact-variables mocks pinning the explicit nulls, every clear read back through
linear apion 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