This commit is contained in:
parent
631356f2f8
commit
dd3a820e57
1 changed files with 6 additions and 0 deletions
|
|
@ -148,6 +148,9 @@ pkgs.writeShellApplication {
|
|||
else
|
||||
_body="$*"
|
||||
fi
|
||||
if [ -z "$(printf '%s' "$_body" | tr -d '[:space:]')" ]; then
|
||||
echo "hive-forge comment: refusing to post empty comment body" >&2; exit 1
|
||||
fi
|
||||
local _payload
|
||||
_payload=$(jq -n --arg body "$_body" '{body:$body}')
|
||||
forge_post "$FORGE_API/repos/$_repo/issues/$_n/comments" "$_payload" \
|
||||
|
|
@ -174,6 +177,9 @@ pkgs.writeShellApplication {
|
|||
_body="$1"; shift
|
||||
if [ $# -gt 0 ]; then _repo="$1"; fi
|
||||
fi
|
||||
if [ -z "$(printf '%s' "$_body" | tr -d '[:space:]')" ]; then
|
||||
echo "hive-forge comment-edit: refusing to post empty comment body" >&2; exit 1
|
||||
fi
|
||||
local _payload
|
||||
_payload=$(jq -n --arg body "$_body" '{body:$body}')
|
||||
forge_patch "$FORGE_API/repos/$_repo/issues/comments/$_id" "$_payload" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue