Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion tool/services/github_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ def create_pull_request(self, target_remote, target_branch, current_branch):

git_push()

title, body = prompt_for_pr_content(get_commit_msgs(base))
pre_title = current_branch.replace("-", " ")
title, body = prompt_for_pr_content(get_commit_msgs(base), title=pre_title)

opts = {
"title": title,
Expand Down
5 changes: 3 additions & 2 deletions tool/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ def get_remote_url(remote):
return remote, url.decode("utf-8").strip()


def prompt_for_pr_content(commit_msgs):
def prompt_for_pr_content(commit_msgs, title=None):
t = tempfile.NamedTemporaryFile(delete=False, prefix='gh.')
try:
template = "Title of this PR\n\nPR body:\n{}".format(commit_msgs)
title = title or "Title of this PR"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

template = f"{title}\n\n{commit_msgs}\n\n"
template_b = template.encode("utf-8")
t.write(template_b)
t.flush()
Expand Down