MCPcopy Index your code
hub / github.com/cli/cli / DetailedItem

Method DetailedItem

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

Source from the content-addressed store, hash-verified

534}
535
536func (p ProjectItem) DetailedItem() exportable {
537 switch p.Type() {
538 case "DraftIssue":
539 return DraftIssue{
540 ID: p.Content.DraftIssue.ID,
541 Body: p.Body(),
542 Title: p.Title(),
543 }
544
545 case "Issue":
546 return Issue{
547 Body: p.Body(),
548 Title: p.Title(),
549 Number: p.Number(),
550 Repository: struct{ NameWithOwner string }{
551 NameWithOwner: p.Repo(),
552 },
553 URL: p.URL(),
554 }
555
556 case "PullRequest":
557 return PullRequest{
558 Body: p.Body(),
559 Title: p.Title(),
560 Number: p.Number(),
561 Repository: struct{ NameWithOwner string }{
562 NameWithOwner: p.Repo(),
563 },
564 URL: p.URL(),
565 }
566 }
567 return nil
568}
569
570// Type is the underlying type of the project item.
571func (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