mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 04:23:46 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user