fix(workflows): improve attempt comments and fix PR body parsing#95
Merged
MarkusNeusinger merged 1 commit intomainfrom Dec 1, 2025
Merged
fix(workflows): improve attempt comments and fix PR body parsing#95MarkusNeusinger merged 1 commit intomainfrom
MarkusNeusinger merged 1 commit intomainfrom
Conversation
- 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)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes two workflow issues: preventing empty attempt comments when PRs aren't created and resolving shell escaping errors in PR body parsing. The changes improve the robustness and informativeness of the automated plot generation workflow.
Key Changes:
- Added conditional check to only post attempt comments when PR exists (fixes Issue #83)
- Enhanced Technical Approach section with structured information (imports, plot function, parameters, config)
- Fixed unsafe PR body variable expansion by using
gh pr viewcommand (fixes auto-merge "Permission denied" error)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/gen-library-impl.yml |
Modified attempt comment posting to check PR existence; rewrote Technical Approach extraction to show imports, plot function, parameters, and styling config instead of generic approach bullets |
.github/workflows/bot-auto-merge.yml |
Replaced direct PR body variable expansion with safe gh pr view command to prevent shell escaping issues |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
| if func_match: | ||
| params = func_match.group(1).strip() | ||
| # Get first 3 params | ||
| param_list = [p.strip().split(':')[0].strip() for p in params.split(',')[:4]] |
There was a problem hiding this comment.
The comment says "Get first 3 params" but the code slices [:4], which would get the first 4 parameters. Either update the comment to "Get first 4 params" or change the slice to [:3].
Suggested change
| param_list = [p.strip().split(':')[0].strip() for p in params.split(',')[:4]] | |
| param_list = [p.strip().split(':')[0].strip() for p in params.split(',')[:3]] |
MarkusNeusinger
added a commit
that referenced
this pull request
Dec 1, 2025
## Summary - Only post attempt comment to sub-issues if PR was actually created (fixes empty 'Attempt 1/3' comments) - Make Technical Approach section more useful: imports, plot function, parameters, config - Fix shell escaping in bot-auto-merge.yml (use `gh pr view` instead of direct variable expansion) ## Fixes - Issue #83: Duplicate 'Attempt 1/3' with first being empty - Auto-merge workflow failing with 'Permission denied'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gh pr viewinstead of direct variable expansion)Fixes