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

Method DetailedItem

pkg/cmd/project/shared/queries/queries.go:569–601  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

567}
568
569func (p ProjectItem) DetailedItem() exportable {
570 switch p.Type() {
571 case "DraftIssue":
572 return DraftIssue{
573 ID: p.Content.DraftIssue.ID,
574 Body: p.Body(),
575 Title: p.Title(),
576 }
577
578 case "Issue":
579 return Issue{
580 Body: p.Body(),
581 Title: p.Title(),
582 Number: p.Number(),
583 Repository: struct{ NameWithOwner string }{
584 NameWithOwner: p.Repo(),
585 },
586 URL: p.URL(),
587 }
588
589 case "PullRequest":
590 return PullRequest{
591 Body: p.Body(),
592 Title: p.Title(),
593 Number: p.Number(),
594 Repository: struct{ NameWithOwner string }{
595 NameWithOwner: p.Repo(),
596 },
597 URL: p.URL(),
598 }
599 }
600 return nil
601}
602
603// Type is the underlying type of the project item.
604func (p ProjectItem) Type() string {

Callers 1

Calls 6

TypeMethod · 0.95
BodyMethod · 0.95
TitleMethod · 0.95
NumberMethod · 0.95
RepoMethod · 0.95
URLMethod · 0.95

Tested by

no test coverage detected