feat(config): add tea-comment wrapper for Gitea PR comments
Single-command wrapper that handles temp file creation and cleanup so tea comment works reliably with multi-line strings. Pre-approved in settings.json, referenced in CLAUDE.md and pr-review skill. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
# Post a comment to a Gitea PR or issue.
|
||||
# Usage: tea-comment <number> "comment body"
|
||||
set -euo pipefail
|
||||
|
||||
if [[ $# -lt 2 ]]; then
|
||||
echo "Usage: tea-comment <number> <comment>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
NUMBER="$1"
|
||||
BODY="$2"
|
||||
HASH=$(echo -n "$BODY" | md5sum | cut -c1-8)
|
||||
TMPFILE="/tmp/tea-comment-${NUMBER}-${HASH}.md"
|
||||
trap 'rm -f "$TMPFILE"' EXIT
|
||||
|
||||
printf '%s' "$BODY" > "$TMPFILE"
|
||||
tea comment --login schweitz --repo jpmschweitzer/settled-reach "$NUMBER" "$(cat "$TMPFILE")"
|
||||
Reference in New Issue
Block a user