Skip to content

Use gh --body-file - stdin heredoc to preserve Bash(gh:*) permission match#86

Merged
sebastientaggart merged 1 commit into
devfrom
feature/gh-body-file
Apr 9, 2026
Merged

Use gh --body-file - stdin heredoc to preserve Bash(gh:*) permission match#86
sebastientaggart merged 1 commit into
devfrom
feature/gh-body-file

Conversation

@sebastientaggart

@sebastientaggart sebastientaggart commented Apr 9, 2026

Copy link
Copy Markdown
Member

Replaces --body "$(cat <<'EOF' ...)" and --notes "$(cat <<'EOF' ...)" in skills/submit-for-review.md and skills/deploy.md with --body-file - / --notes-file - piped from a stdin heredoc.

The $(...) form defeats Claude Code's permission matcher — any command containing command substitution cannot match Bash(gh:*), so users got a Yes/No prompt with no "Allow always" option on every PR/issue/release creation. Stdin heredoc redirection is not substitution, so the gh invocation stays pure literal flags and matches cleanly.

Also avoids a temp-file approach (e.g. /tmp/cc_pr_body.md) which still triggers per-path permission prompts in practice.

Issue #82

@sebastientaggart

Copy link
Copy Markdown
Member Author

Review Summary

Verdict: APPROVE

Findings

No issues found. Code looks correct and follows project conventions.

  • [NOTE] The gh issue create example places [--label "..."] between --body-file - and the <<'EOF' heredoc redirect, which is valid bash (the redirect binds to the command regardless of position) but may read as unusual; consider a brief inline note if future readers find it confusing.

@sebastientaggart
sebastientaggart merged commit 7446082 into dev Apr 9, 2026
2 checks passed
@sebastientaggart
sebastientaggart deleted the feature/gh-body-file branch April 9, 2026 23:38
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.

1 participant