chore(config): add .tmp/ repo directory for agent temp files
Gitignored .tmp/ avoids Bash permission prompts when writing temp files for tea comment posting. Added sed -n blanket permission. Updated review-pr skill to use Write tool into .tmp/ instead of Bash heredocs to /tmp/. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,7 @@
|
|||||||
"Bash(find *)",
|
"Bash(find *)",
|
||||||
"Bash(list *)",
|
"Bash(list *)",
|
||||||
"Bash(tree *)",
|
"Bash(tree *)",
|
||||||
|
"Bash(sed -n *)",
|
||||||
|
|
||||||
"Skill(commit)",
|
"Skill(commit)",
|
||||||
"Skill(worktree-update)",
|
"Skill(worktree-update)",
|
||||||
|
|||||||
@@ -156,19 +156,16 @@ Note: `tea pr reject` does not work on your own PRs. Use `tea comment` instead.
|
|||||||
**IMPORTANT — `tea comment` hangs with inline heredocs and multi-line strings.**
|
**IMPORTANT — `tea comment` hangs with inline heredocs and multi-line strings.**
|
||||||
Always use a two-step approach: write to a temp file first, then pass via `$(cat)`:
|
Always use a two-step approach: write to a temp file first, then pass via `$(cat)`:
|
||||||
|
|
||||||
```bash
|
```
|
||||||
# Step 1: Write review to temp file (use Bash heredoc, NOT the Write tool)
|
# Step 1: Write review to .tmp/ using the Write tool (no permission prompt)
|
||||||
cat > /tmp/review-<branch>.md << 'EOF'
|
Write(file_path: "<repo_root>/.tmp/review-<branch>.md", content: "...review content...")
|
||||||
## Review: <branch> -> main
|
|
||||||
...review content...
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Step 2: Post to Gitea (separate Bash call)
|
# Step 2: Post to Gitea (separate Bash call)
|
||||||
tea comment --login schweitz --repo jpmschweitzer/settled-reach <PR_NUMBER> "$(cat /tmp/review-<branch>.md)"
|
tea comment --login schweitz --repo jpmschweitzer/settled-reach <PR_NUMBER> "$(cat .tmp/review-<branch>.md)"
|
||||||
```
|
```
|
||||||
|
|
||||||
These MUST be separate sequential Bash calls — do not chain them in a single
|
Use the Write tool for step 1 (avoids Bash permission prompts). The `.tmp/`
|
||||||
command. The heredoc write must complete before `tea comment` reads the file.
|
directory is gitignored and exists in the repo root for this purpose.
|
||||||
|
|
||||||
## 7. Merging approved PRs
|
## 7. Merging approved PRs
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
# Build and cache
|
# Build and cache
|
||||||
.cache/
|
.cache/
|
||||||
|
.tmp/
|
||||||
server/target/
|
server/target/
|
||||||
tooling/content-converter/target/
|
tooling/content-converter/target/
|
||||||
tooling/line-previewer/target/
|
tooling/line-previewer/target/
|
||||||
|
|||||||
Reference in New Issue
Block a user