-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
🐛 Bug Description
GitHub CLI commands fail when trying to pass complex markdown content through the --body parameter due to shell escaping issues with backticks, quotes, and special characters.
🔴 Impact
- Can't create GitHub issues/PRs with code examples programmatically
- Markdown documentation can't be passed through CLI
- CI/CD workflows that create issues fail with complex content
📝 Problem Details
When using `gh issue create --body` with markdown containing:
- Code blocks with triple backticks
- Inline code with single backticks
- Dollar signs with variables (${var})
- Mixed quotes types
- Multi-line content
The shell interprets these special characters causing command failure.
🔧 Workaround
Use `--body-file` parameter instead:
```javascript
// Write content to temp file first
await fs.writeFile(tempFile, markdownContent);
// Use --body-file instead of --body
await
```
🔗 References
Metadata
Metadata
Assignees
Labels
No labels