From: Kefu Chai Date: Sun, 11 Apr 2021 03:52:16 +0000 (+0800) Subject: build-integration-branch: define variables for pr_number and friends X-Git-Tag: v17.1.0~2297^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=83eb7a3dffc75cc2f8986035809bdca895446c6b;p=ceph-ci.git build-integration-branch: define variables for pr_number and friends so they can be reused later. Signed-off-by: Kefu Chai --- diff --git a/src/script/build-integration-branch b/src/script/build-integration-branch index e0cf9f4544f..6bedd7d1622 100755 --- a/src/script/build-integration-branch +++ b/src/script/build-integration-branch @@ -89,13 +89,11 @@ r = call(['git', 'branch', '-D', branch]) r = call(['git', 'checkout', '-b', branch]) assert not r for pr in prs: - print('--- pr %d --- pulling %s branch %s' % ( - pr['number'], - pr['head']['repo']['clone_url'], - pr['head']['ref'])) - r = call(['git', 'pull', '--no-edit', - pr['head']['repo']['clone_url'], - pr['head']['ref']]) + pr_number = pr['number'] + pr_url = pr['head']['repo']['clone_url'] + pr_ref = pr['head']['ref'] + print(f'--- pr {pr_number} --- pulling {pr_url} branch {pr_ref}') + r = call(['git', 'pull', '--no-edit', pr_url, pr_ref]) assert not r print('--- done. these PRs were included:') print('\n'.join(prtext).encode('ascii', errors='ignore').decode())