MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _classify

Function _classify

graphify/prs.py:104–119  ·  view source on GitHub ↗
(pr: "PRInfo", base: str = "v8")

Source from the content-addressed store, hash-verified

102
103
104def _classify(pr: "PRInfo", base: str = "v8") -> str:
105 if pr.base_branch != base:
106 return "WRONG-BASE"
107 if pr.ci_status == "FAILURE":
108 return "CI-FAIL"
109 if pr.review_decision == "CHANGES_REQUESTED":
110 return "CHANGES-REQ"
111 if pr.is_draft:
112 return "DRAFT"
113 if pr.days_old >= _STALE_DAYS:
114 return "STALE"
115 if pr.review_decision == "APPROVED":
116 return "APPROVED"
117 if pr.ci_status == "PENDING":
118 return "PENDING"
119 return "READY"
120
121
122def _status_color(status: str) -> str:

Callers 9

test_readyMethod · 0.90
test_ci_failMethod · 0.90
test_changes_reqMethod · 0.90
test_draftMethod · 0.90
test_staleMethod · 0.90
test_pendingMethod · 0.90
test_wrong_baseMethod · 0.90
statusMethod · 0.85

Calls

no outgoing calls

Tested by 8

test_readyMethod · 0.72
test_ci_failMethod · 0.72
test_changes_reqMethod · 0.72
test_draftMethod · 0.72
test_staleMethod · 0.72
test_pendingMethod · 0.72
test_wrong_baseMethod · 0.72