mirror of
https://github.com/opnsense/src.git
synced 2026-06-14 19:20:18 -04:00
git-arc: fix diff2reviewers() with multiple reviewers
The select command of jq provides us with a multiline output. Thus, the
${userids} is a newline separated list. The recent change 9e84289f2c
explicitly said that we aren't going to translate newline to comma when
constructing JSON for the next command. It also forces the ${userids} to
be printed as is, with shell's field splitting disabled. So we end up
with invalid JSON, that is missing commas.
Fix this by enabling shell's field splitting by printing ${userids}
outside of double quotes.
Reviewed by: jlduran, imp, emaste
Differential Revision: https://reviews.freebsd.org/D47889
Fixes: 9e84289f2c
This commit is contained in:
parent
6749f059a5
commit
d6ed5ff4ac
1 changed files with 1 additions and 1 deletions
|
|
@ -341,7 +341,7 @@ diff2reviewers()
|
|||
jq '.response.data[0].attachments.reviewers.reviewers[] | select(.status == "accepted").reviewerPHID')
|
||||
if [ -n "$userids" ]; then
|
||||
echo '{
|
||||
"constraints": {"phids": ['"$(echo "$userids" | tr '[:blank:]' ',')"']}
|
||||
"constraints": {"phids": ['"$(echo $userids | tr '[:blank:]' ',')"']}
|
||||
}' |
|
||||
arc_call_conduit -- user.search |
|
||||
jq -r '.response.data[].fields.username'
|
||||
|
|
|
|||
Loading…
Reference in a new issue