Fix open change list format

With latest gerrit the open changes list format has changed:
'commitMessage' title is replaced to 'subject'. Also the ordering of
the fields is replaced. With this patch we get back the originally
used formatting: '<link_to_change> -- <commit_message_title>'

Change-Id: I84e23db4ca79956b37bf4864b08f840e0d653a42
This commit is contained in:
Előd Illés 2023-04-11 16:43:44 +02:00
parent e28a06c78b
commit d92d989112

View File

@ -37,8 +37,8 @@ function get_open_patches {
OPEN_CHANGES=$(ssh -p 29418 review.opendev.org gerrit query status:open \
project:${REPO} branch:stable/${BRANCH} | \
awk '/url:|commitMessage:/ {$1=""; print $0}' | \
awk '!(NR%2){print buf " --" $0}{buf=$0}')
awk '/url:|subject:/ {$1=""; print $0}' | \
awk '(NR%2){buf=$0}!(NR%2){print $0 " --" buf}')
if [ -n "${OPEN_CHANGES}" ]; then
title "Changes waiting for review in ${REPO} (stable/${BRANCH})"