Skip to content

Commit

Permalink
Print PR description update
Browse files Browse the repository at this point in the history
  • Loading branch information
sshrihar committed Sep 24, 2024
1 parent 0d1874e commit b503aa6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build_branches.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,11 @@ def update_pr_description(pr_number:str):
"""
command = ["gh", "pr", "view", pr_number, "--json", "body", "--jq", ".body"]
pr_description = subprocess.run(command, capture_output=True, text=True).stdout.strip()
print(f"Current branch PR description: {pr_description}")
hosted_url = f"{HOSTED_SITE_DOMAIN}/{pr_number}"
if hosted_url not in pr_description:
new_pr_description = f"Hosted url: [{hosted_url}](https://{hosted_url})\n" + pr_description
print(f"Updated PR description: {new_pr_description}")
command = ["gh", "pr", "edit", pr_number, "--body", new_pr_description]
subprocess.run(command)

Expand Down

0 comments on commit b503aa6

Please sign in to comment.