1
0
Fork 0

fix title

This commit is contained in:
OniriCorpe 2024-01-05 20:54:10 +01:00
parent 9fc10bbf69
commit eafc9606e4

View file

@ -230,15 +230,19 @@ class AppAutoUpdater:
if "main" in todos: if "main" in todos:
if strategy == "latest_github_release": if strategy == "latest_github_release":
title = f"Upgrade to v{new_version}"
message = f"Upgrade to v{new_version}\nChangelog: {changelog_url}" message = f"Upgrade to v{new_version}\nChangelog: {changelog_url}"
else: else:
message = f"Upgrade to v{new_version}" title = message = f"Upgrade to v{new_version}"
new_version = todos["main"]["new_version"] new_version = todos["main"]["new_version"]
new_branch = f"ci-auto-update-{new_version}" new_branch = f"ci-auto-update-{new_version}"
else: else:
message = "Upgrade sources" title = message = "Upgrade sources"
new_branch = "ci-auto-update-sources" new_branch = "ci-auto-update-sources"
print(f"Title: {title}")
print(f"Message: {message}")
try: try:
# Get the commit base for the new branch, and create it # Get the commit base for the new branch, and create it
commit_sha = self.repo.get_branch(self.base_branch).commit.sha commit_sha = self.repo.get_branch(self.base_branch).commit.sha
@ -271,7 +275,7 @@ class AppAutoUpdater:
# Open the PR # Open the PR
pr = self.repo.create_pull( pr = self.repo.create_pull(
title=message, body=message, head=new_branch, base=self.base_branch title=title, body=message, head=new_branch, base=self.base_branch
) )
print("Created PR " + self.repo.full_name + " updated with PR #" + str(pr.id)) print("Created PR " + self.repo.full_name + " updated with PR #" + str(pr.id))