MCPcopy
hub / github.com/cli/cli / State

Method State

pkg/search/result.go:394–399  ·  view source on GitHub ↗

The state of an issue or a pull request, may be either open or closed. For a pull request, the "merged" state is inferred from a value for merged_at and which we take return instead of the "closed" state.

()

Source from the content-addressed store, hash-verified

392// For a pull request, the "merged" state is inferred from a value for merged_at and
393// which we take return instead of the "closed" state.
394func (issue Issue) State() string {
395 if !issue.PullRequest.MergedAt.IsZero() {
396 return "merged"
397 }
398 return issue.StateInternal
399}
400
401func (issue Issue) IsPullRequest() bool {
402 return issue.PullRequest.URL != ""

Callers 2

ExportDataMethod · 0.95
displayIssueResultsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected