Skip to content

Commit 716480b

Browse files
committed
[git_commit_and_push_all] various updates
1 parent 7534be2 commit 716480b

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

dotfiles/bin/git-pr

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ NAME
2020
${_SCRIPT_NAME}
2121
2222
SYNOPSIS
23-
${_SCRIPT_NAME_GIT} [--no-body] [--no-open] [--simple] [--to-ref <to_ref>] [--title | -t <title]
23+
${_SCRIPT_NAME_GIT} [--body | -b <body>] [--no-body] [--no-open] [--simple] [--to-ref <to_ref>] [--title | -t <title>]
2424
${SYNOP_INDENT} [--help] [--debug] [--verbose]
2525
2626
EXAMPLES
@@ -44,6 +44,11 @@ while test $# -gt 0; do
4444
export verbose=true
4545
shift
4646
;;
47+
--body | -b)
48+
shift
49+
body="$1"
50+
shift
51+
;;
4752
--no-body)
4853
no_body=true
4954
shift
@@ -110,7 +115,9 @@ function github_url() {
110115
query_params+=("title=$(url_encode_py "$title")")
111116

112117
if ! check_true "${no_body-}"; then
113-
if command -v git-pr-description-custom >/dev/null 2>&1; then
118+
if test -n "${body-}"; then
119+
query_params+=("body=$(url_encode_py "$body")")
120+
elif command -v git-pr-description-custom >/dev/null 2>&1; then
114121
query_params+=("body=$(git pr-description-custom --to-ref "${PR_TO_REF}" --urlencode)")
115122
else
116123
query_params+=("body=$(url_encode_py "$(git pr-description --to-ref "${PR_TO_REF}")")")

0 commit comments

Comments
 (0)