mirror of https://github.com/zulip/zulip.git
push-to-pull-request: Use `jq -r` to simplify a test slightly.
This option (aka `--raw-output`) prints a string as itself, rather than JSON-encoded; which makes it fit a bit better in a shell script, saving us a layer of quoting.
This commit is contained in:
parent
8e81ca0fb2
commit
954c71e90c
|
@ -50,7 +50,8 @@ pr_details="$(curl -s "$pr_url")"
|
|||
pr_jq () {
|
||||
echo "$pr_details" | jq "$@"
|
||||
}
|
||||
if [ "$(pr_jq .message)" = '"Not Found"' ]; then
|
||||
|
||||
if [ "$(pr_jq -r .message)" = "Not Found" ]; then
|
||||
echo "Invalid PR URL: $pr_url"
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue