Update title and body when pr exists

This commit is contained in:
Peter Evans 2020-01-23 09:47:35 +09:00
parent 8ee12880b0
commit d29f1e9296
2 changed files with 4 additions and 0 deletions

View file

@ -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))

View file

@ -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))