Skip to content

Commit 8cb6eab

Browse files
feat(workflows): improve comment structure in YAML configuration
- Refactor comment generation to include status section - Enhance readability by organizing comment lines into a list
1 parent 37925d6 commit 8cb6eab

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

.github/workflows/gen-library-impl.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -248,18 +248,22 @@ jobs:
248248
249249
approach_text = '\n'.join(approach_lines)
250250
251-
comment = f"""## Attempt $ATTEMPT/3 - $TIMESTAMP
251+
lines = [
252+
f"## Attempt $ATTEMPT/3 - $TIMESTAMP",
253+
"",
254+
"### Approach",
255+
approach_text,
256+
"",
257+
"### Status",
258+
f"- **PR:** $PR_LINK",
259+
f"- **File:** \`$PLOT_FILE\`",
260+
f"- **Workflow:** [${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})",
261+
"",
262+
"---",
263+
""
264+
]
265+
comment = '\n'.join(lines)
252266
253-
### Approach
254-
{approach_text}
255-
256-
### Status
257-
- **PR:** $PR_LINK
258-
- **File:** \`$PLOT_FILE\`
259-
- **Workflow:** [${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
260-
261-
---
262-
"""
263267
with open('/tmp/attempt_comment.md', 'w') as f:
264268
f.write(comment)
265269
PYEOF

0 commit comments

Comments
 (0)