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

Method hasDeferredEdits

pkg/cmd/issue/edit/edit.go:282–288  ·  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

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

Callers 2

NewCmdEditFunction · 0.95
editRunFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected