mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 11:52:01 +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 () {
|
pr_jq () {
|
||||||
echo "$pr_details" | 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"
|
echo "Invalid PR URL: $pr_url"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user