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.
()
| 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. |
| 394 | func (issue Issue) State() string { |
| 395 | if !issue.PullRequest.MergedAt.IsZero() { |
| 396 | return "merged" |
| 397 | } |
| 398 | return issue.StateInternal |
| 399 | } |
| 400 | |
| 401 | func (issue Issue) IsPullRequest() bool { |
| 402 | return issue.PullRequest.URL != "" |
no outgoing calls
no test coverage detected