Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions scripts/collect_growth_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
"punkpeye/awesome-mcp-servers#7153": {
"action": "submit Glama",
"reason": "Glama listing and score badge required before review",
},
"TEN-framework/ten-framework#2191": {
"action": "wait for maintainer review",
"reason": "Claude review action requires maintainer permissions for fork PRs",
}
}
KNOWN_ASSISTED_REVIEW_REQUESTS = {
Expand Down Expand Up @@ -313,6 +317,10 @@ def recommend_integration_action(
).lower()
if "cla" in pending_names:
return "resolve CLA"
if known_review_gate_action and (
"claude-review" in failed_names or "review bot" in failed_names
):
return known_review_gate_action
Comment on lines +320 to +323

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To simplify the logic and avoid duplicate condition checks, you can combine this check with the subsequent review bot gate check.

Since suggestions are limited to modified lines, applying the suggestion below will leave the original check on lines 324-325 as redundant/dead code. Please make sure to manually delete lines 324-325 after applying this suggestion.

    if "claude-review" in failed_names or "review bot" in failed_names:
        return known_review_gate_action or "review bot gate"

if "claude-review" in failed_names or "review bot" in failed_names:
return "review bot gate"
if "vercel" in failed_names and "vercel.com/git/authorize" in failed_urls:
Expand Down
5 changes: 4 additions & 1 deletion tests/test_collect_growth_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,10 @@ def fake_fetch_json(url, headers=None):
metrics = module.collect_integration_metrics(["TEN-framework/ten-framework#2191"])

integration = metrics["integrations"][0]
assert integration["next_action"] == "review bot gate"
assert integration["known_review_gate_reason"] == (
"Claude review action requires maintainer permissions for fork PRs"
)
assert integration["next_action"] == "wait for maintainer review"
assert integration["checks"]["failed_check_runs"][0]["name"] == "claude-review"


Expand Down