MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / extractPRFromItem

Function extractPRFromItem

cmd/pad/cmd_github.go:390–404  ·  view source on GitHub ↗
(item *models.Item)

Source from the content-addressed store, hash-verified

388}
389
390func extractPRFromItem(item *models.Item) *GitHubPR {
391 if item == nil || item.CodeContext == nil || item.CodeContext.PullRequest == nil {
392 return nil
393 }
394 pr := item.CodeContext.PullRequest
395 return &GitHubPR{
396 Number: pr.Number,
397 URL: pr.URL,
398 Title: pr.Title,
399 State: pr.State,
400 Branch: item.CodeContext.Branch,
401 Repo: item.CodeContext.Repo,
402 UpdatedAt: pr.UpdatedAt,
403 }
404}
405
406func prStateColor(state string) *color.Color {
407 switch state {

Callers 5

reconcileItemFunction · 0.85
needsPRMetadataRefreshFunction · 0.85
githubStatusCmdFunction · 0.85
showItemPRStatusFunction · 0.85
showCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected