sync-test-repos.sh: Update topic and commit message

In preparation of using this script in the OpenStack CI propose job,
we update the topic branch and the commit message to match those
in the Jenkins job. This way we can use this script to update reviews
which were proposed by the Jenkins job.

Change-Id: I35a952af4f2d8147060412995c5f51cc7c039324
This commit is contained in:
Markos Chandras 2017-05-25 14:26:18 +01:00
parent d7836428d4
commit 090b3ca62e
1 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@ process_changes() {
# Commit changes
git add .
git commit $([[ ${review} == "__no_review__" ]] || printf %s '--amend') -m '[auto] Syncing common OSA files'
git commit $([[ ${review} == "__no_review__" ]] || printf %s '--amend') -m 'Updated from OpenStack Ansible Tests'
git review $(${dry_run} && printf %s '-n')
)
}
@ -141,11 +141,11 @@ for proj in ${osa_projects[@]}; do
pushd $proj_dir &> /dev/null
git checkout -b osa-auto-sync-test-files
git checkout -b openstack/openstack-ansible-tests/sync-tests
# if there an open review, re-use it
open_review=$(git review --no-color -l | \
grep -v "^Found" | \
grep "\[auto\] Syncing common OSA files" | \
grep "Updated from OpenStack Ansible Tests" | \
tail -n1 | awk '{print $1}')
[[ -n ${open_review} ]] && \
echo "Using existing review #${open_review} for ${proj_dir}" && \