Skip to content

Commit 6fd7bd0

Browse files
authored
Split manual Glama handoff from active queue
Keep account/site tasks out of the active operator queue and list them under manual review gates.
1 parent cb7adc0 commit 6fd7bd0

2 files changed

Lines changed: 67 additions & 0 deletions

File tree

scripts/collect_growth_metrics.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,13 @@
126126
}
127127
REPORTER_WAITING_LABELS = {"needs feedback"}
128128
CONTRIBUTOR_WAITING_LABELS = {"good first issue", "help wanted", "ready for PR"}
129+
MANUAL_HANDOFF_ACTIONS = {
130+
"submit Glama",
131+
}
129132
PASSIVE_INTEGRATION_ACTIONS = {
130133
"archive",
131134
"finish draft",
135+
*MANUAL_HANDOFF_ACTIONS,
132136
"preview auth gate",
133137
"resolve CLA",
134138
"wait for checks",
@@ -655,6 +659,24 @@ def format_integration_markdown(metrics: Dict[str, Any]) -> str:
655659
f"- [{integration['pr']}]({integration.get('html_url')}): "
656660
f"{integration.get('next_action') or 'inspect'}"
657661
)
662+
manual_handoff_integrations = sorted(
663+
(
664+
integration
665+
for integration in metrics["integrations"]
666+
if integration.get("state") == "open"
667+
and (integration.get("next_action") or "inspect") in MANUAL_HANDOFF_ACTIONS
668+
),
669+
key=lambda integration: int(integration.get("repo_stars") or 0),
670+
reverse=True,
671+
)
672+
if manual_handoff_integrations:
673+
lines.extend(["", "## Manual handoff gates", ""])
674+
for integration in manual_handoff_integrations:
675+
reason = integration.get("known_review_gate_reason") or "manual action required"
676+
lines.append(
677+
f"- [{integration['pr']}]({integration.get('html_url')}): "
678+
f"{integration.get('next_action') or 'inspect'}; {reason}"
679+
)
658680
review_gate_integrations = [
659681
integration for integration in metrics["integrations"] if integration.get("known_review_gate_reason")
660682
]

tests/test_collect_growth_metrics.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,6 +1070,51 @@ def test_format_integration_markdown_lists_active_operator_queue():
10701070
assert "activepieces/activepieces#13985" not in active_queue
10711071

10721072

1073+
def test_format_integration_markdown_lists_manual_handoff_gates():
1074+
module = load_growth_metrics_module()
1075+
metrics = {
1076+
"collected_at_utc": "2026-07-02T00:00:00+00:00",
1077+
"integrations": [
1078+
{
1079+
"pr": "punkpeye/awesome-mcp-servers#7153",
1080+
"html_url": "https://github.com/punkpeye/awesome-mcp-servers/pull/7153",
1081+
"state": "open",
1082+
"mergeable_state": "clean",
1083+
"repo_stars": 90_000,
1084+
"repo_forks": 12_000,
1085+
"updated_at": "2026-06-16T04:21:55Z",
1086+
"updated_age_days": 16,
1087+
"next_action": "submit Glama",
1088+
"known_review_gate_reason": "Glama listing and score badge required before review",
1089+
"checks": {"state": "success", "failed_check_runs": [], "pending_check_runs": []},
1090+
},
1091+
{
1092+
"pr": "huggingface/optimum-intel#1801",
1093+
"html_url": "https://github.com/huggingface/optimum-intel/pull/1801",
1094+
"state": "open",
1095+
"mergeable_state": "unstable",
1096+
"repo_stars": 600,
1097+
"repo_forks": 240,
1098+
"updated_at": "2026-06-30T04:20:02Z",
1099+
"updated_age_days": 0,
1100+
"next_action": "review gate",
1101+
"checks": {"state": "unknown", "failed_check_runs": [], "pending_check_runs": []},
1102+
},
1103+
],
1104+
}
1105+
1106+
output = module.format_integration_markdown(metrics)
1107+
1108+
active_queue = output.split("## Active operator queue", 1)[1].split("## Manual handoff gates", 1)[0]
1109+
manual_gates = output.split("## Manual handoff gates", 1)[1].split("## Manual review gates", 1)[0]
1110+
assert "punkpeye/awesome-mcp-servers#7153" not in active_queue
1111+
assert (
1112+
"- [punkpeye/awesome-mcp-servers#7153](https://github.com/punkpeye/awesome-mcp-servers/pull/7153): "
1113+
"submit Glama; Glama listing and score badge required before review"
1114+
) in manual_gates
1115+
assert "huggingface/optimum-intel#1801" not in manual_gates
1116+
1117+
10731118
def test_format_integration_markdown_lists_known_review_gates():
10741119
module = load_growth_metrics_module()
10751120
metrics = {

0 commit comments

Comments
 (0)