You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(workflows): improve attempt comments and fix PR body parsing
- Only post attempt comment if PR was actually created (not on failures)
- Make approach section more technical (imports, plot function, params)
- Fix shell escaping for PR body in bot-auto-merge.yml (use gh pr view)
# 2. Extract structural comments as approach steps
239
-
for line in code.split('\n'):
240
-
line = line.strip()
241
-
# Look for section comments like "# Create figure", "# Plot data"
242
-
if line.startswith('# ') and not line.startswith('# Input') and not line.startswith('# Sample'):
243
-
comment = line[2:].strip()
244
-
if comment and len(comment) > 3 and comment[0].isupper():
245
-
approach_lines.append(f"- {comment}")
246
-
247
-
# 3. Extract key imports
225
+
# 1. Extract all imports (full import lines)
248
226
imports = []
249
227
for line in code.split('\n'):
250
228
if line.startswith('import ') or line.startswith('from '):
251
-
if 'matplotlib' in line or 'seaborn' in line or 'plotly' in line or 'bokeh' in line or 'altair' in line or 'plotnine' in line or 'pygal' in line or 'highcharts' in line:
252
-
imports.append(line.split()[1].split('.')[0])
229
+
# Skip typing imports
230
+
if 'typing' not in line and 'TYPE_CHECKING' not in line:
0 commit comments