Repository navigation
Commit e5fec67
Fix create-pr workflow: sanitize output and prevent duplicate PRs (#9)
## Summary
This PR enhances the robustness and reliability of the automated PR
creation workflow by implementing proper output sanitization and
duplicate prevention mechanisms.
## Key Accomplishments
- **Output Sanitization**: Added proper environment variable handling to
safely process Claude-generated PR titles and descriptions, preventing
potential injection issues or formatting problems
- **Duplicate Prevention**: Implemented validation logic to check for
existing PRs before creating new ones, avoiding unnecessary duplicate
pull requests
- **Improved Error Handling**: Enhanced the workflow's resilience by
adding safeguards around the PR creation process
- **Better Variable Management**: Structured environment variable usage
for cleaner and more maintainable workflow execution
## Breaking Changes
None. This is a backward-compatible enhancement that improves existing
functionality without changing the workflow's interface or expected
behavior.
## Testing Notes
- Verify that PR creation works correctly with various title and
description formats
- Test duplicate detection by attempting to create PRs for branches with
existing pull requests
- Confirm that environment variable sanitization properly handles
special characters and multi-line content
- Validate that the workflow fails gracefully when encountering edge
cases
## Infrastructure Considerations
This update affects the automated PR creation pipeline and should
improve overall workflow reliability. The changes focus on defensive
programming practices and should reduce potential failures in the CI/CD
process. Monitor initial runs to ensure the enhanced validation logic
performs as expected in the production environment.
---
🤖 Generated with [Claude Code](https://claude.ai/code)
**Branch Info:**
- Source: `bugfix/claude-pr-escape`
- Target: `main`
- Type: bugfix
Co-Authored-By: Claude <noreply@anthropic.com>1 file changed
Lines changed: 32 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
300 | 303 | | |
301 | 304 | | |
302 | 305 | | |
303 | | - | |
304 | 306 | | |
305 | | - | |
306 | | - | |
307 | | - | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
308 | 322 | | |
309 | 323 | | |
310 | 324 | | |
| |||
317 | 331 | | |
318 | 332 | | |
319 | 333 | | |
320 | | - | |
| 334 | + | |
321 | 335 | | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
328 | 346 | | |
329 | | - | |
330 | | - | |
331 | 347 | | |
332 | 348 | | |
333 | 349 | | |
| |||
0 commit comments