try fix again
This commit is contained in:
@@ -481,7 +481,7 @@ def open_pr(args):
|
|||||||
if push.returncode != 0:
|
if push.returncode != 0:
|
||||||
raise RuntimeError(f"git push failed:\n{push.stderr}")
|
raise RuntimeError(f"git push failed:\n{push.stderr}")
|
||||||
|
|
||||||
pulls = gitea("GET", "/pulls?state=open")
|
pulls = gitea("GET", f"/pulls?state=open&base_branch={args.base}")
|
||||||
existing = next((pr for pr in pulls if pr["head"]["ref"] == args.branch), None)
|
existing = next((pr for pr in pulls if pr["head"]["ref"] == args.branch), None)
|
||||||
if existing:
|
if existing:
|
||||||
print(f"PR #{existing['number']} already open, pushed update")
|
print(f"PR #{existing['number']} already open, pushed update")
|
||||||
|
|||||||
Reference in New Issue
Block a user