Skip to content

Commit f993738

Browse files
authored
Show active integration operator queue (#3099)
1 parent 6347a8f commit f993738

2 files changed

Lines changed: 95 additions & 0 deletions

File tree

scripts/collect_growth_metrics.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@
126126
}
127127
REPORTER_WAITING_LABELS = {"needs feedback"}
128128
CONTRIBUTOR_WAITING_LABELS = {"good first issue", "help wanted", "ready for PR"}
129+
PASSIVE_INTEGRATION_ACTIONS = {
130+
"archive",
131+
"finish draft",
132+
"preview auth gate",
133+
"resolve CLA",
134+
"wait for checks",
135+
"wait for maintainer rerun",
136+
"wait for maintainer review",
137+
}
129138

130139

131140
def fetch_json(url: str, headers: Optional[Dict[str, str]] = None) -> Any:
@@ -628,6 +637,24 @@ def format_integration_markdown(metrics: Dict[str, Any]) -> str:
628637
f"{int(integration['repo_stars']):,} stars, "
629638
f"{integration.get('next_action') or 'inspect'}"
630639
)
640+
active_operator_integrations = sorted(
641+
(
642+
integration
643+
for integration in metrics["integrations"]
644+
if integration.get("state") == "open"
645+
and integration.get("repo_stars") is not None
646+
and (integration.get("next_action") or "inspect") not in PASSIVE_INTEGRATION_ACTIONS
647+
),
648+
key=lambda integration: int(integration.get("repo_stars") or 0),
649+
reverse=True,
650+
)
651+
if active_operator_integrations:
652+
lines.extend(["", "## Active operator queue", ""])
653+
for integration in active_operator_integrations:
654+
lines.append(
655+
f"- [{integration['pr']}]({integration.get('html_url')}): "
656+
f"{integration.get('next_action') or 'inspect'}"
657+
)
631658
review_gate_integrations = [
632659
integration for integration in metrics["integrations"] if integration.get("known_review_gate_reason")
633660
]

tests/test_collect_growth_metrics.py

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,74 @@ def test_format_integration_markdown_lists_high_exposure_priorities_by_stars():
10021002
assert "deleted-org/deleted-repo#1" not in output.split("## High-exposure priorities", 1)[1].split("## Failed or pending checks", 1)[0]
10031003

10041004

1005+
def test_format_integration_markdown_lists_active_operator_queue():
1006+
module = load_growth_metrics_module()
1007+
metrics = {
1008+
"collected_at_utc": "2026-07-02T00:00:00+00:00",
1009+
"integrations": [
1010+
{
1011+
"pr": "getpaseo/paseo#1634",
1012+
"html_url": "https://github.com/getpaseo/paseo/pull/1634",
1013+
"state": "open",
1014+
"mergeable_state": "dirty",
1015+
"repo_stars": 9_500,
1016+
"repo_forks": 900,
1017+
"updated_at": "2026-06-30T09:47:12Z",
1018+
"updated_age_days": 0,
1019+
"next_action": "resolve conflicts",
1020+
"checks": {"state": "unknown", "failed_check_runs": [], "pending_check_runs": []},
1021+
},
1022+
{
1023+
"pr": "huggingface/optimum-intel#1801",
1024+
"html_url": "https://github.com/huggingface/optimum-intel/pull/1801",
1025+
"state": "open",
1026+
"mergeable_state": "unstable",
1027+
"repo_stars": 600,
1028+
"repo_forks": 240,
1029+
"updated_at": "2026-06-30T04:20:02Z",
1030+
"updated_age_days": 0,
1031+
"next_action": "review gate",
1032+
"checks": {"state": "unknown", "failed_check_runs": [], "pending_check_runs": []},
1033+
},
1034+
{
1035+
"pr": "livekit/agents#6176",
1036+
"html_url": "https://github.com/livekit/agents/pull/6176",
1037+
"state": "open",
1038+
"mergeable_state": "blocked",
1039+
"repo_stars": 11_000,
1040+
"repo_forks": 3_200,
1041+
"updated_at": "2026-06-30T10:55:17Z",
1042+
"updated_age_days": 0,
1043+
"next_action": "wait for maintainer review",
1044+
"checks": {"state": "success", "failed_check_runs": [], "pending_check_runs": []},
1045+
},
1046+
{
1047+
"pr": "activepieces/activepieces#13985",
1048+
"html_url": "https://github.com/activepieces/activepieces/pull/13985",
1049+
"state": "open",
1050+
"mergeable_state": "blocked",
1051+
"repo_stars": 23_000,
1052+
"repo_forks": 3_800,
1053+
"updated_at": "2026-06-30T08:46:39Z",
1054+
"updated_age_days": 0,
1055+
"next_action": "resolve CLA",
1056+
"checks": {"state": "pending", "failed_check_runs": [], "pending_check_runs": []},
1057+
},
1058+
],
1059+
}
1060+
1061+
output = module.format_integration_markdown(metrics)
1062+
1063+
active_queue = output.split("## Active operator queue", 1)[1].split("## Failed or pending checks", 1)[0]
1064+
assert "- [getpaseo/paseo#1634](https://github.com/getpaseo/paseo/pull/1634): resolve conflicts" in active_queue
1065+
assert (
1066+
"- [huggingface/optimum-intel#1801](https://github.com/huggingface/optimum-intel/pull/1801): review gate"
1067+
in active_queue
1068+
)
1069+
assert "livekit/agents#6176" not in active_queue
1070+
assert "activepieces/activepieces#13985" not in active_queue
1071+
1072+
10051073
def test_format_integration_markdown_lists_known_review_gates():
10061074
module = load_growth_metrics_module()
10071075
metrics = {

0 commit comments

Comments
 (0)