Allow multiple prs in pr command

This commit is contained in:
2024-12-30 11:02:32 +01:00
parent d1b8c63d60
commit 7686402166
3 changed files with 11 additions and 6 deletions

View File

@@ -75,6 +75,8 @@ def get_pr(pr: int) -> dict[str, Any]:
def pr_merge_status(
pr: int, branches: list[str] = DEFAULT_BRANCHES, check_backport: bool = True
) -> PRStatus:
if not branches:
branches = DEFAULT_BRANCHES
url = f"https://api.github.com/repos/NixOS/nixpkgs/pulls/{pr}"
pr_response = requests.get(url, headers=DEFAULT_HEADERS)
pr_response.raise_for_status()