MCPcopy Create free account
hub / github.com/cli/cli / hasDeferredEdits

Method hasDeferredEdits

pkg/cmd/issue/edit/edit.go:283–289  ·  view source on GitHub ↗

hasDeferredEdits reports whether the run asks for an edit that the deferred update path applies, which Editable.Dirty() cannot see. Setting --type is absent because it sets Editable.IssueType.Edited, which Dirty() already covers; only --remove-type arrives here.

()

Source from the content-addressed store, hash-verified

281// absent because it sets Editable.IssueType.Edited, which Dirty() already
282// covers; only --remove-type arrives here.
283func (opts *EditOptions) hasDeferredEdits() bool {
284 return opts.RemoveIssueType ||
285 opts.Parent != "" || opts.RemoveParent ||
286 len(opts.AddSubIssues) > 0 || len(opts.RemoveSubIssues) > 0 ||
287 len(opts.AddBlockedBy) > 0 || len(opts.RemoveBlockedBy) > 0 ||
288 len(opts.AddBlocking) > 0 || len(opts.RemoveBlocking) > 0
289}
290
291func editRun(opts *EditOptions) error {
292 httpClient, err := opts.HttpClient()

Callers 2

NewCmdEditFunction · 0.95
editRunFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected