Split manual Glama handoff from active queue

Keep account/site tasks out of the active operator queue and list them under manual review gates.
This commit is contained in:
zhifu gao
2026-07-07 14:48:10 +08:00
committed by GitHub
parent cb7adc0184
commit 6fd7bd0155
2 changed files with 67 additions and 0 deletions
+22
View File
@@ -126,9 +126,13 @@ KNOWN_ASSISTED_REVIEW_REQUESTS = {
}
REPORTER_WAITING_LABELS = {"needs feedback"}
CONTRIBUTOR_WAITING_LABELS = {"good first issue", "help wanted", "ready for PR"}
MANUAL_HANDOFF_ACTIONS = {
"submit Glama",
}
PASSIVE_INTEGRATION_ACTIONS = {
"archive",
"finish draft",
*MANUAL_HANDOFF_ACTIONS,
"preview auth gate",
"resolve CLA",
"wait for checks",
@@ -655,6 +659,24 @@ def format_integration_markdown(metrics: Dict[str, Any]) -> str:
f"- [{integration['pr']}]({integration.get('html_url')}): "
f"{integration.get('next_action') or 'inspect'}"
)
manual_handoff_integrations = sorted(
(
integration
for integration in metrics["integrations"]
if integration.get("state") == "open"
and (integration.get("next_action") or "inspect") in MANUAL_HANDOFF_ACTIONS
),
key=lambda integration: int(integration.get("repo_stars") or 0),
reverse=True,
)
if manual_handoff_integrations:
lines.extend(["", "## Manual handoff gates", ""])
for integration in manual_handoff_integrations:
reason = integration.get("known_review_gate_reason") or "manual action required"
lines.append(
f"- [{integration['pr']}]({integration.get('html_url')}): "
f"{integration.get('next_action') or 'inspect'}; {reason}"
)
review_gate_integrations = [
integration for integration in metrics["integrations"] if integration.get("known_review_gate_reason")
]
+45
View File
@@ -1070,6 +1070,51 @@ def test_format_integration_markdown_lists_active_operator_queue():
assert "activepieces/activepieces#13985" not in active_queue
def test_format_integration_markdown_lists_manual_handoff_gates():
module = load_growth_metrics_module()
metrics = {
"collected_at_utc": "2026-07-02T00:00:00+00:00",
"integrations": [
{
"pr": "punkpeye/awesome-mcp-servers#7153",
"html_url": "https://github.com/punkpeye/awesome-mcp-servers/pull/7153",
"state": "open",
"mergeable_state": "clean",
"repo_stars": 90_000,
"repo_forks": 12_000,
"updated_at": "2026-06-16T04:21:55Z",
"updated_age_days": 16,
"next_action": "submit Glama",
"known_review_gate_reason": "Glama listing and score badge required before review",
"checks": {"state": "success", "failed_check_runs": [], "pending_check_runs": []},
},
{
"pr": "huggingface/optimum-intel#1801",
"html_url": "https://github.com/huggingface/optimum-intel/pull/1801",
"state": "open",
"mergeable_state": "unstable",
"repo_stars": 600,
"repo_forks": 240,
"updated_at": "2026-06-30T04:20:02Z",
"updated_age_days": 0,
"next_action": "review gate",
"checks": {"state": "unknown", "failed_check_runs": [], "pending_check_runs": []},
},
],
}
output = module.format_integration_markdown(metrics)
active_queue = output.split("## Active operator queue", 1)[1].split("## Manual handoff gates", 1)[0]
manual_gates = output.split("## Manual handoff gates", 1)[1].split("## Manual review gates", 1)[0]
assert "punkpeye/awesome-mcp-servers#7153" not in active_queue
assert (
"- [punkpeye/awesome-mcp-servers#7153](https://github.com/punkpeye/awesome-mcp-servers/pull/7153): "
"submit Glama; Glama listing and score badge required before review"
) in manual_gates
assert "huggingface/optimum-intel#1801" not in manual_gates
def test_format_integration_markdown_lists_known_review_gates():
module = load_growth_metrics_module()
metrics = {