From 83eb7a3dffc75cc2f8986035809bdca895446c6b Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 11 Apr 2021 11:52:16 +0800 Subject: [PATCH] build-integration-branch: define variables for pr_number and friends so they can be reused later. Signed-off-by: Kefu Chai --- src/script/build-integration-branch | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/script/build-integration-branch b/src/script/build-integration-branch index e0cf9f4544f6..6bedd7d16223 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()) -- 2.47.3