From d29f1e9296124d7d62cf9f4be542d9995f347e1b Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Thu, 23 Jan 2020 09:47:35 +0900 Subject: [PATCH] Update title and body when pr exists --- dist/src/create_or_update_pull_request.py | 2 ++ src/create_or_update_pull_request.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/dist/src/create_or_update_pull_request.py b/dist/src/create_or_update_pull_request.py index 52d53ef..bb2486a 100644 --- a/dist/src/create_or_update_pull_request.py +++ b/dist/src/create_or_update_pull_request.py @@ -72,6 +72,8 @@ def create_or_update_pull_request( pull_request = github_repo.get_pulls( state="open", base=base, head=head_branch )[0] + # Update title and body + pull_request.as_issue().edit(title=title, body=body) print(f"Updated pull request #{pull_request.number} ({branch} => {base})") else: print(str(e)) diff --git a/src/create_or_update_pull_request.py b/src/create_or_update_pull_request.py index 52d53ef..bb2486a 100644 --- a/src/create_or_update_pull_request.py +++ b/src/create_or_update_pull_request.py @@ -72,6 +72,8 @@ def create_or_update_pull_request( pull_request = github_repo.get_pulls( state="open", base=base, head=head_branch )[0] + # Update title and body + pull_request.as_issue().edit(title=title, body=body) print(f"Updated pull request #{pull_request.number} ({branch} => {base})") else: print(str(e))