Skip to content

[WIP] GitHub CLI with complex markdown body#108

Open
konard wants to merge 3 commits into
mainfrom
issue-40-b1e760e6
Open

[WIP] GitHub CLI with complex markdown body#108
konard wants to merge 3 commits into
mainfrom
issue-40-b1e760e6

Conversation

@konard

@konard konard commented Sep 9, 2025

Copy link
Copy Markdown
Member

🤖 AI-Powered Solution

This pull request is being automatically generated to solve issue #40.

📋 Issue Reference

Fixes #40

🚧 Status

Work in Progress - The AI assistant is currently analyzing and implementing the solution.

📝 Implementation Details

Details will be added as the solution is developed...


This PR was created automatically by the AI issue solver

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #40
@konard konard self-assigned this Sep 9, 2025
konard and others added 2 commits September 9, 2025 20:48
Add comprehensive solution for safely passing complex markdown content with special characters to GitHub CLI commands.

## Changes

### Core Implementation
- Add `githubCli` helper object with methods for safe GitHub CLI operations
- Implement `createIssue()`, `createPullRequest()`, and `withBodyFile()` functions
- Use temporary file approach with `--body-file` parameter to avoid shell escaping issues
- Automatic cleanup of temporary files with proper error handling

### New Features
- Safe handling of backticks, variables (${var}), quotes, and special characters
- Support for all GitHub CLI options (assignee, labels, milestone, etc.)
- Production-ready error handling and file cleanup
- Memory-efficient temporary file management

### Testing & Examples
- Comprehensive test suite covering edge cases and error scenarios
- Demonstration script showing the problem and solution
- Documentation with usage examples for CI/CD workflows

### Version Bump
- Update package.json from 0.7.1 to 0.7.2

## Solves
- Issue #40: GitHub CLI with complex markdown body fails due to shell escaping
- Provides production-ready alternative to direct `--body` parameter usage
- Maintains compatibility with all existing functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard marked this pull request as ready for review September 9, 2025 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub CLI with complex markdown body

1 participant