MCPcopy Index your code
hub / github.com/AutoForgeAI/autoforge / get_all_passing_features

Function get_all_passing_features

progress.py:115–142  ·  view source on GitHub ↗

Get all passing features for webhook notifications. Args: project_dir: Directory containing the project Returns: List of dicts with id, category, name for each passing feature

(project_dir: Path)

Source from the content-addressed store, hash-verified

113
114
115def get_all_passing_features(project_dir: Path) -> list[dict]:
116 """
117 Get all passing features for webhook notifications.
118
119 Args:
120 project_dir: Directory containing the project
121
122 Returns:
123 List of dicts with id, category, name for each passing feature
124 """
125 from autoforge_paths import get_features_db_path
126 db_file = get_features_db_path(project_dir)
127 if not db_file.exists():
128 return []
129
130 try:
131 with closing(_get_connection(db_file)) as conn:
132 cursor = conn.cursor()
133 cursor.execute(
134 "SELECT id, category, name FROM features WHERE passes = 1 ORDER BY priority ASC"
135 )
136 features = [
137 {"id": row[0], "category": row[1], "name": row[2]}
138 for row in cursor.fetchall()
139 ]
140 return features
141 except Exception:
142 return []
143
144
145def send_progress_webhook(passing: int, total: int, project_dir: Path) -> None:

Callers 1

send_progress_webhookFunction · 0.85

Calls 2

get_features_db_pathFunction · 0.90
_get_connectionFunction · 0.85

Tested by

no test coverage detected