Add watchlist command
All checks were successful
test / test (pull_request) Successful in 34s
build / build (pull_request) Successful in 2m3s

This commit is contained in:
2024-10-09 22:21:28 +02:00
parent 99e0887505
commit 06abde6f6f
7 changed files with 184 additions and 32 deletions

View File

@@ -33,6 +33,14 @@ def commits_since(first_ref: str, last_ref: str) -> int:
return commit_response.json()["behind_by"]
def get_pr(pr: int) -> dict:
url = f"https://api.github.com/repos/NixOS/nixpkgs/pulls/{pr}"
pr_response = requests.get(url, headers=DEFAULT_HEADERS)
pr_response.raise_for_status()
return pr_response.json()
def pr_merge_status(
pr: int, branches: list[str] = DEFAULT_BRANCHES, check_backport: bool = True
) -> PRStatus: