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

Method hasDeferredEdits

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

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

Callers 2

NewCmdEditFunction · 0.95
editRunFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected