Merge pull request 'Make code testable' (#2) from 1-testable into master
Some checks failed
build / build (push) Failing after 13m7s

This commit is contained in:
Torjus Håkestad 2024-10-05 23:59:07 +00:00
commit 53c60c77f5
9 changed files with 25364 additions and 53 deletions

View File

@ -1,7 +1,7 @@
import typer
import requests
from typing import Annotated
from rich.console import Console
from nixprstatus.pr import pr_merge_status
app = typer.Typer()
@ -12,64 +12,30 @@ DEFAULT_HEADERS = {
BRANCHES = ["nixos-unstable-small", "nixos-unstable", "nixos-24.05"]
def commit_in_branch(commit_sha: str, branch: str) -> bool:
url = f"https://api.github.com/repos/NixOS/nixpkgs/compare/{branch}...{commit_sha}"
commit_response = requests.get(url, headers=DEFAULT_HEADERS)
commit_response.raise_for_status()
status = commit_response.json().get("status")
if status in ["identical", "behind"]:
return True
return False
@app.command()
def pr(
pr: str,
branch: Annotated[str | None, typer.Option(help="Check specific branch")] = None,
pr: int,
branches: Annotated[
list[str] | None, typer.Option(help="Check specific branch")
] = None,
):
"""Get status of pull request"""
url = f"https://api.github.com/repos/NixOS/nixpkgs/pulls/{pr}"
typer.echo(f"branch {branch}")
pr_response = requests.get(url, headers=DEFAULT_HEADERS)
pr_response.raise_for_status()
pr_data = pr_response.json()
console = Console()
merged = pr_data["merged"]
if branch and not merged:
console.print(f":x: {branch}")
return
commit_sha = pr_data.get("merge_commit_sha")
# Check only specified branch
if branch:
in_branch = commit_in_branch(commit_sha, branch)
if in_branch:
console.print(f":white_check_mark: {branch}", highlight=False)
if branches:
status = pr_merge_status(pr, branches)
else:
console.print(f":x: {branch}", highlight=False)
return
status = pr_merge_status(pr)
merged = ":white_check_mark: merged" if status.merged else ":x: merged"
console.print(merged, highlight=False)
if not merged:
console.print(":x: master", highlight=False)
for branch in BRANCHES:
console.print(f":x: {branch}", highlight=False)
return
console.print(":white_check_mark: master", highlight=False)
for b in BRANCHES:
in_branch = commit_in_branch(commit_sha, b)
if in_branch:
console.print(f":white_check_mark: {b}", highlight=False)
else:
console.print(f":x: {b}", highlight=False)
for branch in status.branches:
output = (
f":white_check_mark: {branch}"
if status.branches[branch]
else f":x: {branch}"
)
console.print(output, highlight=False)
def main():

45
nixprstatus/pr.py Normal file
View File

@ -0,0 +1,45 @@
import requests
from pydantic import BaseModel
DEFAULT_HEADERS = {
"Accept": "application/vnd.github.text+json",
}
DEFAULT_BRANCHES = ["master", "nixos-unstable-small", "nixos-unstable", "nixos-24.05"]
class PRStatus(BaseModel):
merged: bool
branches: dict[str, bool]
def commit_in_branch(commit_sha: str, branch: str) -> bool:
url = f"https://api.github.com/repos/NixOS/nixpkgs/compare/{branch}...{commit_sha}"
commit_response = requests.get(url, headers=DEFAULT_HEADERS)
commit_response.raise_for_status()
status = commit_response.json().get("status")
if status in ["identical", "behind"]:
return True
return False
def pr_merge_status(pr: int, branches: list[str] = DEFAULT_BRANCHES) -> PRStatus:
url = f"https://api.github.com/repos/NixOS/nixpkgs/pulls/{pr}"
pr_response = requests.get(url, headers=DEFAULT_HEADERS)
pr_response.raise_for_status()
pr_data = pr_response.json()
merged = pr_data["merged"]
if merged is False:
return PRStatus(merged=False, branches={branch: False for branch in branches})
commit_sha = pr_data.get("merge_commit_sha")
results = {}
for branch in branches:
in_branch = commit_in_branch(commit_sha, branch)
results[branch] = in_branch
return PRStatus(merged=True, branches=results)

137
poetry.lock generated
View File

@ -1,5 +1,16 @@
# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
[[package]]
name = "annotated-types"
version = "0.7.0"
description = "Reusable constraint types to use with typing.Annotated"
optional = false
python-versions = ">=3.8"
files = [
{file = "annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53"},
{file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"},
]
[[package]]
name = "asttokens"
version = "2.4.1"
@ -364,6 +375,130 @@ files = [
[package.extras]
tests = ["pytest"]
[[package]]
name = "pydantic"
version = "2.9.2"
description = "Data validation using Python type hints"
optional = false
python-versions = ">=3.8"
files = [
{file = "pydantic-2.9.2-py3-none-any.whl", hash = "sha256:f048cec7b26778210e28a0459867920654d48e5e62db0958433636cde4254f12"},
{file = "pydantic-2.9.2.tar.gz", hash = "sha256:d155cef71265d1e9807ed1c32b4c8deec042a44a50a4188b25ac67ecd81a9c0f"},
]
[package.dependencies]
annotated-types = ">=0.6.0"
pydantic-core = "2.23.4"
typing-extensions = [
{version = ">=4.12.2", markers = "python_version >= \"3.13\""},
{version = ">=4.6.1", markers = "python_version < \"3.13\""},
]
[package.extras]
email = ["email-validator (>=2.0.0)"]
timezone = ["tzdata"]
[[package]]
name = "pydantic-core"
version = "2.23.4"
description = "Core functionality for Pydantic validation and serialization"
optional = false
python-versions = ">=3.8"
files = [
{file = "pydantic_core-2.23.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:b10bd51f823d891193d4717448fab065733958bdb6a6b351967bd349d48d5c9b"},
{file = "pydantic_core-2.23.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4fc714bdbfb534f94034efaa6eadd74e5b93c8fa6315565a222f7b6f42ca1166"},
{file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:63e46b3169866bd62849936de036f901a9356e36376079b05efa83caeaa02ceb"},
{file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed1a53de42fbe34853ba90513cea21673481cd81ed1be739f7f2efb931b24916"},
{file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:cfdd16ab5e59fc31b5e906d1a3f666571abc367598e3e02c83403acabc092e07"},
{file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:255a8ef062cbf6674450e668482456abac99a5583bbafb73f9ad469540a3a232"},
{file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4a7cd62e831afe623fbb7aabbb4fe583212115b3ef38a9f6b71869ba644624a2"},
{file = "pydantic_core-2.23.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f09e2ff1f17c2b51f2bc76d1cc33da96298f0a036a137f5440ab3ec5360b624f"},
{file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:e38e63e6f3d1cec5a27e0afe90a085af8b6806ee208b33030e65b6516353f1a3"},
{file = "pydantic_core-2.23.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:0dbd8dbed2085ed23b5c04afa29d8fd2771674223135dc9bc937f3c09284d071"},
{file = "pydantic_core-2.23.4-cp310-none-win32.whl", hash = "sha256:6531b7ca5f951d663c339002e91aaebda765ec7d61b7d1e3991051906ddde119"},
{file = "pydantic_core-2.23.4-cp310-none-win_amd64.whl", hash = "sha256:7c9129eb40958b3d4500fa2467e6a83356b3b61bfff1b414c7361d9220f9ae8f"},
{file = "pydantic_core-2.23.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:77733e3892bb0a7fa797826361ce8a9184d25c8dffaec60b7ffe928153680ba8"},
{file = "pydantic_core-2.23.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1b84d168f6c48fabd1f2027a3d1bdfe62f92cade1fb273a5d68e621da0e44e6d"},
{file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:df49e7a0861a8c36d089c1ed57d308623d60416dab2647a4a17fe050ba85de0e"},
{file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ff02b6d461a6de369f07ec15e465a88895f3223eb75073ffea56b84d9331f607"},
{file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:996a38a83508c54c78a5f41456b0103c30508fed9abcad0a59b876d7398f25fd"},
{file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d97683ddee4723ae8c95d1eddac7c192e8c552da0c73a925a89fa8649bf13eea"},
{file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:216f9b2d7713eb98cb83c80b9c794de1f6b7e3145eef40400c62e86cee5f4e1e"},
{file = "pydantic_core-2.23.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6f783e0ec4803c787bcea93e13e9932edab72068f68ecffdf86a99fd5918878b"},
{file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:d0776dea117cf5272382634bd2a5c1b6eb16767c223c6a5317cd3e2a757c61a0"},
{file = "pydantic_core-2.23.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d5f7a395a8cf1621939692dba2a6b6a830efa6b3cee787d82c7de1ad2930de64"},
{file = "pydantic_core-2.23.4-cp311-none-win32.whl", hash = "sha256:74b9127ffea03643e998e0c5ad9bd3811d3dac8c676e47db17b0ee7c3c3bf35f"},
{file = "pydantic_core-2.23.4-cp311-none-win_amd64.whl", hash = "sha256:98d134c954828488b153d88ba1f34e14259284f256180ce659e8d83e9c05eaa3"},
{file = "pydantic_core-2.23.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f3e0da4ebaef65158d4dfd7d3678aad692f7666877df0002b8a522cdf088f231"},
{file = "pydantic_core-2.23.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f69a8e0b033b747bb3e36a44e7732f0c99f7edd5cea723d45bc0d6e95377ffee"},
{file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:723314c1d51722ab28bfcd5240d858512ffd3116449c557a1336cbe3919beb87"},
{file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bb2802e667b7051a1bebbfe93684841cc9351004e2badbd6411bf357ab8d5ac8"},
{file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d18ca8148bebe1b0a382a27a8ee60350091a6ddaf475fa05ef50dc35b5df6327"},
{file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:33e3d65a85a2a4a0dc3b092b938a4062b1a05f3a9abde65ea93b233bca0e03f2"},
{file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:128585782e5bfa515c590ccee4b727fb76925dd04a98864182b22e89a4e6ed36"},
{file = "pydantic_core-2.23.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:68665f4c17edcceecc112dfed5dbe6f92261fb9d6054b47d01bf6371a6196126"},
{file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:20152074317d9bed6b7a95ade3b7d6054845d70584216160860425f4fbd5ee9e"},
{file = "pydantic_core-2.23.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9261d3ce84fa1d38ed649c3638feefeae23d32ba9182963e465d58d62203bd24"},
{file = "pydantic_core-2.23.4-cp312-none-win32.whl", hash = "sha256:4ba762ed58e8d68657fc1281e9bb72e1c3e79cc5d464be146e260c541ec12d84"},
{file = "pydantic_core-2.23.4-cp312-none-win_amd64.whl", hash = "sha256:97df63000f4fea395b2824da80e169731088656d1818a11b95f3b173747b6cd9"},
{file = "pydantic_core-2.23.4-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:7530e201d10d7d14abce4fb54cfe5b94a0aefc87da539d0346a484ead376c3cc"},
{file = "pydantic_core-2.23.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:df933278128ea1cd77772673c73954e53a1c95a4fdf41eef97c2b779271bd0bd"},
{file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cb3da3fd1b6a5d0279a01877713dbda118a2a4fc6f0d821a57da2e464793f05"},
{file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:42c6dcb030aefb668a2b7009c85b27f90e51e6a3b4d5c9bc4c57631292015b0d"},
{file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:696dd8d674d6ce621ab9d45b205df149399e4bb9aa34102c970b721554828510"},
{file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2971bb5ffe72cc0f555c13e19b23c85b654dd2a8f7ab493c262071377bfce9f6"},
{file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8394d940e5d400d04cad4f75c0598665cbb81aecefaca82ca85bd28264af7f9b"},
{file = "pydantic_core-2.23.4-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:0dff76e0602ca7d4cdaacc1ac4c005e0ce0dcfe095d5b5259163a80d3a10d327"},
{file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:7d32706badfe136888bdea71c0def994644e09fff0bfe47441deaed8e96fdbc6"},
{file = "pydantic_core-2.23.4-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:ed541d70698978a20eb63d8c5d72f2cc6d7079d9d90f6b50bad07826f1320f5f"},
{file = "pydantic_core-2.23.4-cp313-none-win32.whl", hash = "sha256:3d5639516376dce1940ea36edf408c554475369f5da2abd45d44621cb616f769"},
{file = "pydantic_core-2.23.4-cp313-none-win_amd64.whl", hash = "sha256:5a1504ad17ba4210df3a045132a7baeeba5a200e930f57512ee02909fc5c4cb5"},
{file = "pydantic_core-2.23.4-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:d4488a93b071c04dc20f5cecc3631fc78b9789dd72483ba15d423b5b3689b555"},
{file = "pydantic_core-2.23.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:81965a16b675b35e1d09dd14df53f190f9129c0202356ed44ab2728b1c905658"},
{file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffa2ebd4c8530079140dd2d7f794a9d9a73cbb8e9d59ffe24c63436efa8f271"},
{file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:61817945f2fe7d166e75fbfb28004034b48e44878177fc54d81688e7b85a3665"},
{file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:29d2c342c4bc01b88402d60189f3df065fb0dda3654744d5a165a5288a657368"},
{file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5e11661ce0fd30a6790e8bcdf263b9ec5988e95e63cf901972107efc49218b13"},
{file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9d18368b137c6295db49ce7218b1a9ba15c5bc254c96d7c9f9e924a9bc7825ad"},
{file = "pydantic_core-2.23.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ec4e55f79b1c4ffb2eecd8a0cfba9955a2588497d96851f4c8f99aa4a1d39b12"},
{file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:374a5e5049eda9e0a44c696c7ade3ff355f06b1fe0bb945ea3cac2bc336478a2"},
{file = "pydantic_core-2.23.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5c364564d17da23db1106787675fc7af45f2f7b58b4173bfdd105564e132e6fb"},
{file = "pydantic_core-2.23.4-cp38-none-win32.whl", hash = "sha256:d7a80d21d613eec45e3d41eb22f8f94ddc758a6c4720842dc74c0581f54993d6"},
{file = "pydantic_core-2.23.4-cp38-none-win_amd64.whl", hash = "sha256:5f5ff8d839f4566a474a969508fe1c5e59c31c80d9e140566f9a37bba7b8d556"},
{file = "pydantic_core-2.23.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:a4fa4fc04dff799089689f4fd502ce7d59de529fc2f40a2c8836886c03e0175a"},
{file = "pydantic_core-2.23.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0a7df63886be5e270da67e0966cf4afbae86069501d35c8c1b3b6c168f42cb36"},
{file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcedcd19a557e182628afa1d553c3895a9f825b936415d0dbd3cd0bbcfd29b4b"},
{file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f54b118ce5de9ac21c363d9b3caa6c800341e8c47a508787e5868c6b79c9323"},
{file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:86d2f57d3e1379a9525c5ab067b27dbb8a0642fb5d454e17a9ac434f9ce523e3"},
{file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:de6d1d1b9e5101508cb37ab0d972357cac5235f5c6533d1071964c47139257df"},
{file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1278e0d324f6908e872730c9102b0112477a7f7cf88b308e4fc36ce1bdb6d58c"},
{file = "pydantic_core-2.23.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9a6b5099eeec78827553827f4c6b8615978bb4b6a88e5d9b93eddf8bb6790f55"},
{file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:e55541f756f9b3ee346b840103f32779c695a19826a4c442b7954550a0972040"},
{file = "pydantic_core-2.23.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a5c7ba8ffb6d6f8f2ab08743be203654bb1aaa8c9dcb09f82ddd34eadb695605"},
{file = "pydantic_core-2.23.4-cp39-none-win32.whl", hash = "sha256:37b0fe330e4a58d3c58b24d91d1eb102aeec675a3db4c292ec3928ecd892a9a6"},
{file = "pydantic_core-2.23.4-cp39-none-win_amd64.whl", hash = "sha256:1498bec4c05c9c787bde9125cfdcc63a41004ff167f495063191b863399b1a29"},
{file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:f455ee30a9d61d3e1a15abd5068827773d6e4dc513e795f380cdd59932c782d5"},
{file = "pydantic_core-2.23.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1e90d2e3bd2c3863d48525d297cd143fe541be8bbf6f579504b9712cb6b643ec"},
{file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e203fdf807ac7e12ab59ca2bfcabb38c7cf0b33c41efeb00f8e5da1d86af480"},
{file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e08277a400de01bc72436a0ccd02bdf596631411f592ad985dcee21445bd0068"},
{file = "pydantic_core-2.23.4-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f220b0eea5965dec25480b6333c788fb72ce5f9129e8759ef876a1d805d00801"},
{file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:d06b0c8da4f16d1d1e352134427cb194a0a6e19ad5db9161bf32b2113409e728"},
{file = "pydantic_core-2.23.4-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ba1a0996f6c2773bd83e63f18914c1de3c9dd26d55f4ac302a7efe93fb8e7433"},
{file = "pydantic_core-2.23.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:9a5bce9d23aac8f0cf0836ecfc033896aa8443b501c58d0602dbfd5bd5b37753"},
{file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:78ddaaa81421a29574a682b3179d4cf9e6d405a09b99d93ddcf7e5239c742e21"},
{file = "pydantic_core-2.23.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:883a91b5dd7d26492ff2f04f40fbb652de40fcc0afe07e8129e8ae779c2110eb"},
{file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:88ad334a15b32a791ea935af224b9de1bf99bcd62fabf745d5f3442199d86d59"},
{file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:233710f069d251feb12a56da21e14cca67994eab08362207785cf8c598e74577"},
{file = "pydantic_core-2.23.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:19442362866a753485ba5e4be408964644dd6a09123d9416c54cd49171f50744"},
{file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:624e278a7d29b6445e4e813af92af37820fafb6dcc55c012c834f9e26f9aaaef"},
{file = "pydantic_core-2.23.4-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f5ef8f42bec47f21d07668a043f077d507e5bf4e668d5c6dfe6aaba89de1a5b8"},
{file = "pydantic_core-2.23.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:aea443fffa9fbe3af1a9ba721a87f926fe548d32cab71d188a6ede77d0ff244e"},
{file = "pydantic_core-2.23.4.tar.gz", hash = "sha256:2584f7cf844ac4d970fba483a717dbe10c1c1c96a969bf65d61ffe94df1b2863"},
]
[package.dependencies]
typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0"
[[package]]
name = "pygments"
version = "2.18.0"
@ -532,4 +667,4 @@ files = [
[metadata]
lock-version = "2.0"
python-versions = "^3.12"
content-hash = "63b5e4c863dada0a142924b2c90aa34d71bab6ff8a418e19130a4a9d26db5e6d"
content-hash = "fe84b0646831111f9ab9ccb6d779eb5e06fac3b7581cf480741bb3c319bd9470"

View File

@ -10,6 +10,7 @@ readme = "README.md"
python = "^3.12"
requests = "^2.32.3"
typer = "^0.12.5"
pydantic = "^2.9.2"
[tool.poetry.scripts]

View File

@ -0,0 +1,180 @@
{
"url": "https://api.github.com/repos/NixOS/nixpkgs/compare/master...2c5fac3edf2d00d948253e392ec1604b29b38f14",
"html_url": "https://github.com/NixOS/nixpkgs/compare/master...2c5fac3edf2d00d948253e392ec1604b29b38f14",
"permalink_url": "https://github.com/NixOS/nixpkgs/compare/NixOS:64046f0...NixOS:2c5fac3",
"diff_url": "https://github.com/NixOS/nixpkgs/compare/master...2c5fac3edf2d00d948253e392ec1604b29b38f14.diff",
"patch_url": "https://github.com/NixOS/nixpkgs/compare/master...2c5fac3edf2d00d948253e392ec1604b29b38f14.patch",
"base_commit": {
"sha": "64046f018f169b026bb4a4b206e5b0dfe18b0401",
"node_id": "C_kwDOAEVQ_NoAKDY0MDQ2ZjAxOGYxNjliMDI2YmI0YTRiMjA2ZTViMGRmZTE4YjA0MDE",
"commit": {
"author": {
"name": "lassulus",
"email": "github@lassul.us",
"date": "2024-10-05T22:34:39Z"
},
"committer": {
"name": "GitHub",
"email": "noreply@github.com",
"date": "2024-10-05T22:34:39Z"
},
"message": "writers: add writeNim and writeNimBin (#338857)",
"tree": {
"sha": "4ee4a6bc6b2ac2f6775d73483bb1a2fb5247b9e5",
"url": "https://api.github.com/repos/NixOS/nixpkgs/git/trees/4ee4a6bc6b2ac2f6775d73483bb1a2fb5247b9e5"
},
"url": "https://api.github.com/repos/NixOS/nixpkgs/git/commits/64046f018f169b026bb4a4b206e5b0dfe18b0401",
"comment_count": 0,
"verification": {
"verified": true,
"reason": "valid",
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsFcBAABCAAQBQJnAb7/CRC1aQ7uu5UhlAAAcAMQAFu2ArPp+KOxfx9lcIGDUAbq\nV2ILtISGUy3PoA/1thdBfdItToKxk8hB3Hxgu6OTn8a3IG3IAKMYmFv5VyNt5sWg\n+6EhuhCwmKUHhJflNOk1Hv49QIcAJ7nnu94RohXvToZetNrwDT3rcyIzG9uOVM5k\n5Q50/WaJ5O6GSWYGRJYLVG6Ko2Vdm79zD+EHGgmd28DQw8l4gV+EHdTQx+pOnrZt\nEPCKNxyi0ijdiN/x4xMQGyCrjZAyEklXcI4DUcVdn06IUGLhCfrOb4XG6QeIW0q6\nlkw36zDdM133f0JidAuE78ARZqGg7jN5YWSt+ec8hGactdE+0xjA66oHEx3sK5PZ\n8qd6FF4UkOk5tbEOdoap9kVBVRMQrf0DRMWD8+TBnDotPyBwjxRUA2mqT8FatXUs\nPuhUqZJyh2kMHHUOTn4ZuOFziX4nTv/f08H8BCt6wCLqvMO3FpQMDxb0u0LlO5kE\nwanK2z7yzdo0BOn620LZ3MjPnM4xv0zHI0WjLBs/vKxmxLojmt3aJtDfXMjM/mBm\nMVj39tYer+wa94UDKsSWf1/1fvmBVrXRCEurUAhAstapYaTYYdyVQs1OaQLMtYaD\n1k45+7m4xIrWQ/jgoBmHTqth6XXM8QAY0iHy15KPNGxbR6iFgbny7+qZP4o2AmFX\n1qBIKa2D2vKroxc1/c6H\n=Nzlo\n-----END PGP SIGNATURE-----\n",
"payload": "tree 4ee4a6bc6b2ac2f6775d73483bb1a2fb5247b9e5\nparent 5f821de20c900edf3e4067246f70add908a9dc97\nparent ca23669cf857ea1914bbdd411f87ee88999d4479\nauthor lassulus <github@lassul.us> 1728167679 +0100\ncommitter GitHub <noreply@github.com> 1728167679 +0100\n\nwriters: add writeNim and writeNimBin (#338857)\n\n"
}
},
"url": "https://api.github.com/repos/NixOS/nixpkgs/commits/64046f018f169b026bb4a4b206e5b0dfe18b0401",
"html_url": "https://github.com/NixOS/nixpkgs/commit/64046f018f169b026bb4a4b206e5b0dfe18b0401",
"comments_url": "https://api.github.com/repos/NixOS/nixpkgs/commits/64046f018f169b026bb4a4b206e5b0dfe18b0401/comments",
"author": {
"login": "Lassulus",
"id": 621759,
"node_id": "MDQ6VXNlcjYyMTc1OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/621759?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Lassulus",
"html_url": "https://github.com/Lassulus",
"followers_url": "https://api.github.com/users/Lassulus/followers",
"following_url": "https://api.github.com/users/Lassulus/following{/other_user}",
"gists_url": "https://api.github.com/users/Lassulus/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Lassulus/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Lassulus/subscriptions",
"organizations_url": "https://api.github.com/users/Lassulus/orgs",
"repos_url": "https://api.github.com/users/Lassulus/repos",
"events_url": "https://api.github.com/users/Lassulus/events{/privacy}",
"received_events_url": "https://api.github.com/users/Lassulus/received_events",
"type": "User",
"site_admin": false
},
"committer": {
"login": "web-flow",
"id": 19864447,
"node_id": "MDQ6VXNlcjE5ODY0NDQ3",
"avatar_url": "https://avatars.githubusercontent.com/u/19864447?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/web-flow",
"html_url": "https://github.com/web-flow",
"followers_url": "https://api.github.com/users/web-flow/followers",
"following_url": "https://api.github.com/users/web-flow/following{/other_user}",
"gists_url": "https://api.github.com/users/web-flow/gists{/gist_id}",
"starred_url": "https://api.github.com/users/web-flow/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/web-flow/subscriptions",
"organizations_url": "https://api.github.com/users/web-flow/orgs",
"repos_url": "https://api.github.com/users/web-flow/repos",
"events_url": "https://api.github.com/users/web-flow/events{/privacy}",
"received_events_url": "https://api.github.com/users/web-flow/received_events",
"type": "User",
"site_admin": false
},
"parents": [
{
"sha": "5f821de20c900edf3e4067246f70add908a9dc97",
"url": "https://api.github.com/repos/NixOS/nixpkgs/commits/5f821de20c900edf3e4067246f70add908a9dc97",
"html_url": "https://github.com/NixOS/nixpkgs/commit/5f821de20c900edf3e4067246f70add908a9dc97"
},
{
"sha": "ca23669cf857ea1914bbdd411f87ee88999d4479",
"url": "https://api.github.com/repos/NixOS/nixpkgs/commits/ca23669cf857ea1914bbdd411f87ee88999d4479",
"html_url": "https://github.com/NixOS/nixpkgs/commit/ca23669cf857ea1914bbdd411f87ee88999d4479"
}
]
},
"merge_base_commit": {
"sha": "2c5fac3edf2d00d948253e392ec1604b29b38f14",
"node_id": "C_kwDOAEVQ_NoAKDJjNWZhYzNlZGYyZDAwZDk0ODI1M2UzOTJlYzE2MDRiMjliMzhmMTQ",
"commit": {
"author": {
"name": "Thomas Gerbet",
"email": "thomas@gerbet.me",
"date": "2024-09-30T18:58:09Z"
},
"committer": {
"name": "Bjørn Forsman",
"email": "bjorn.forsman@gmail.com",
"date": "2024-10-01T06:56:48Z"
},
"message": "wireshark: 4.2.6 -> 4.2.7\n\nFixes CVE-2024-8250.\nhttps://www.wireshark.org/security/wnpa-sec-2024-11.html\n\nChanges:\nhttps://www.wireshark.org/docs/relnotes/wireshark-4.2.7.html",
"tree": {
"sha": "35384ecd1601439a960f3ef76a1974bb7784523f",
"url": "https://api.github.com/repos/NixOS/nixpkgs/git/trees/35384ecd1601439a960f3ef76a1974bb7784523f"
},
"url": "https://api.github.com/repos/NixOS/nixpkgs/git/commits/2c5fac3edf2d00d948253e392ec1604b29b38f14",
"comment_count": 0,
"verification": {
"verified": false,
"reason": "unsigned",
"signature": null,
"payload": null
}
},
"url": "https://api.github.com/repos/NixOS/nixpkgs/commits/2c5fac3edf2d00d948253e392ec1604b29b38f14",
"html_url": "https://github.com/NixOS/nixpkgs/commit/2c5fac3edf2d00d948253e392ec1604b29b38f14",
"comments_url": "https://api.github.com/repos/NixOS/nixpkgs/commits/2c5fac3edf2d00d948253e392ec1604b29b38f14/comments",
"author": {
"login": "LeSuisse",
"id": 737767,
"node_id": "MDQ6VXNlcjczNzc2Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/737767?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/LeSuisse",
"html_url": "https://github.com/LeSuisse",
"followers_url": "https://api.github.com/users/LeSuisse/followers",
"following_url": "https://api.github.com/users/LeSuisse/following{/other_user}",
"gists_url": "https://api.github.com/users/LeSuisse/gists{/gist_id}",
"starred_url": "https://api.github.com/users/LeSuisse/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LeSuisse/subscriptions",
"organizations_url": "https://api.github.com/users/LeSuisse/orgs",
"repos_url": "https://api.github.com/users/LeSuisse/repos",
"events_url": "https://api.github.com/users/LeSuisse/events{/privacy}",
"received_events_url": "https://api.github.com/users/LeSuisse/received_events",
"type": "User",
"site_admin": false
},
"committer": {
"login": "bjornfor",
"id": 133602,
"node_id": "MDQ6VXNlcjEzMzYwMg==",
"avatar_url": "https://avatars.githubusercontent.com/u/133602?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bjornfor",
"html_url": "https://github.com/bjornfor",
"followers_url": "https://api.github.com/users/bjornfor/followers",
"following_url": "https://api.github.com/users/bjornfor/following{/other_user}",
"gists_url": "https://api.github.com/users/bjornfor/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bjornfor/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bjornfor/subscriptions",
"organizations_url": "https://api.github.com/users/bjornfor/orgs",
"repos_url": "https://api.github.com/users/bjornfor/repos",
"events_url": "https://api.github.com/users/bjornfor/events{/privacy}",
"received_events_url": "https://api.github.com/users/bjornfor/received_events",
"type": "User",
"site_admin": false
},
"parents": [
{
"sha": "92bdb0b4e0f698cdde010c2254cdb2afee6e07c3",
"url": "https://api.github.com/repos/NixOS/nixpkgs/commits/92bdb0b4e0f698cdde010c2254cdb2afee6e07c3",
"html_url": "https://github.com/NixOS/nixpkgs/commit/92bdb0b4e0f698cdde010c2254cdb2afee6e07c3"
}
]
},
"status": "behind",
"ahead_by": 0,
"behind_by": 1773,
"total_commits": 0,
"commits": [
],
"files": [
]
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,180 @@
{
"url": "https://api.github.com/repos/NixOS/nixpkgs/compare/nixos-unstable...2c5fac3edf2d00d948253e392ec1604b29b38f14",
"html_url": "https://github.com/NixOS/nixpkgs/compare/nixos-unstable...2c5fac3edf2d00d948253e392ec1604b29b38f14",
"permalink_url": "https://github.com/NixOS/nixpkgs/compare/NixOS:bc947f5...NixOS:2c5fac3",
"diff_url": "https://github.com/NixOS/nixpkgs/compare/nixos-unstable...2c5fac3edf2d00d948253e392ec1604b29b38f14.diff",
"patch_url": "https://github.com/NixOS/nixpkgs/compare/nixos-unstable...2c5fac3edf2d00d948253e392ec1604b29b38f14.patch",
"base_commit": {
"sha": "bc947f541ae55e999ffdb4013441347d83b00feb",
"node_id": "C_kwDOAEVQ_NoAKGJjOTQ3ZjU0MWFlNTVlOTk5ZmZkYjQwMTM0NDEzNDdkODNiMDBmZWI",
"commit": {
"author": {
"name": "Masum Reza",
"email": "50095635+JohnRTitor@users.noreply.github.com",
"date": "2024-10-04T05:06:13Z"
},
"committer": {
"name": "GitHub",
"email": "noreply@github.com",
"date": "2024-10-04T05:06:13Z"
},
"message": "alpaca: 2.0.3 -> 2.0.5 (#345070)",
"tree": {
"sha": "3e7376cebbaf8793c39bb68447950f1045fd4ea5",
"url": "https://api.github.com/repos/NixOS/nixpkgs/git/trees/3e7376cebbaf8793c39bb68447950f1045fd4ea5"
},
"url": "https://api.github.com/repos/NixOS/nixpkgs/git/commits/bc947f541ae55e999ffdb4013441347d83b00feb",
"comment_count": 0,
"verification": {
"verified": true,
"reason": "valid",
"signature": "-----BEGIN PGP SIGNATURE-----\n\nwsFcBAABCAAQBQJm/3fFCRC1aQ7uu5UhlAAA2JMQAIz5pfsohrsrdPgPxlZVDuaQ\nVPLlM82MOpkq958U90OnXyC4ZlIX2+YwvCUkuRjYjMv9VlHMHU6olHy/jvt5VF/g\nckoaAMztOsPqgyKUXiMew83j8L8EBqVQQZ3W2Br9EnzG2RNEDUQdP5c6Fwc4tccl\nmb3PPb15Nm0lFnitwUO78KxILhrekjdxxrKC/wUihaL/gH4CzdkReVZJ6FPbq9l6\n/HTTDW+amrpOr2XLQ2dC5Cy/nvZS+MPjduNSPsf5a5/ElKmNltbPFChTY0pnv/dq\nrH1zDsohfbtk5WgcmLhiIOpvO86yLfa82sPUJA65GuAW7gYGbMsN6Sh3CnfY7sxb\n7x5r7/sSodxG4t2lML571JfX2aFCeNKgeYomViRu1ZGyHg3LJAN8jKi1JIyVCpH1\nkiTOmQQWzPJRC2COvMGSdXVc7h4CuInev7MmDDiubJDkFYyT8DBzpqVxUTmni13p\ndwr6QAWZZpjnxZxVFnYLlTSifLUIazEJTqaNWnCCc99hyWAo+f5njUlT+9fPLoKE\nHAgMmC55sOzOXnLLgPIoZe2g3wtHNELY3Y6wq7hfS2K9GCxJnJ3mttiUypnyHEuR\n/dVGOlES5p7xWUZ+zEYOp+cLnMWudB5X5cf/ojooLQJc8CL8gIfOD7KOrKewf2Yi\nUUUYH6/erCgoQE2klAaS\n=Hu+V\n-----END PGP SIGNATURE-----\n",
"payload": "tree 3e7376cebbaf8793c39bb68447950f1045fd4ea5\nparent 674acd883193175de91d37a6b3ea8c814d12c8bb\nparent e229318f7d34f4988a815e6d10b8fb0f7e0e2974\nauthor Masum Reza <50095635+JohnRTitor@users.noreply.github.com> 1728018373 +0530\ncommitter GitHub <noreply@github.com> 1728018373 +0530\n\nalpaca: 2.0.3 -> 2.0.5 (#345070)\n\n"
}
},
"url": "https://api.github.com/repos/NixOS/nixpkgs/commits/bc947f541ae55e999ffdb4013441347d83b00feb",
"html_url": "https://github.com/NixOS/nixpkgs/commit/bc947f541ae55e999ffdb4013441347d83b00feb",
"comments_url": "https://api.github.com/repos/NixOS/nixpkgs/commits/bc947f541ae55e999ffdb4013441347d83b00feb/comments",
"author": {
"login": "JohnRTitor",
"id": 50095635,
"node_id": "MDQ6VXNlcjUwMDk1NjM1",
"avatar_url": "https://avatars.githubusercontent.com/u/50095635?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/JohnRTitor",
"html_url": "https://github.com/JohnRTitor",
"followers_url": "https://api.github.com/users/JohnRTitor/followers",
"following_url": "https://api.github.com/users/JohnRTitor/following{/other_user}",
"gists_url": "https://api.github.com/users/JohnRTitor/gists{/gist_id}",
"starred_url": "https://api.github.com/users/JohnRTitor/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/JohnRTitor/subscriptions",
"organizations_url": "https://api.github.com/users/JohnRTitor/orgs",
"repos_url": "https://api.github.com/users/JohnRTitor/repos",
"events_url": "https://api.github.com/users/JohnRTitor/events{/privacy}",
"received_events_url": "https://api.github.com/users/JohnRTitor/received_events",
"type": "User",
"site_admin": false
},
"committer": {
"login": "web-flow",
"id": 19864447,
"node_id": "MDQ6VXNlcjE5ODY0NDQ3",
"avatar_url": "https://avatars.githubusercontent.com/u/19864447?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/web-flow",
"html_url": "https://github.com/web-flow",
"followers_url": "https://api.github.com/users/web-flow/followers",
"following_url": "https://api.github.com/users/web-flow/following{/other_user}",
"gists_url": "https://api.github.com/users/web-flow/gists{/gist_id}",
"starred_url": "https://api.github.com/users/web-flow/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/web-flow/subscriptions",
"organizations_url": "https://api.github.com/users/web-flow/orgs",
"repos_url": "https://api.github.com/users/web-flow/repos",
"events_url": "https://api.github.com/users/web-flow/events{/privacy}",
"received_events_url": "https://api.github.com/users/web-flow/received_events",
"type": "User",
"site_admin": false
},
"parents": [
{
"sha": "674acd883193175de91d37a6b3ea8c814d12c8bb",
"url": "https://api.github.com/repos/NixOS/nixpkgs/commits/674acd883193175de91d37a6b3ea8c814d12c8bb",
"html_url": "https://github.com/NixOS/nixpkgs/commit/674acd883193175de91d37a6b3ea8c814d12c8bb"
},
{
"sha": "e229318f7d34f4988a815e6d10b8fb0f7e0e2974",
"url": "https://api.github.com/repos/NixOS/nixpkgs/commits/e229318f7d34f4988a815e6d10b8fb0f7e0e2974",
"html_url": "https://github.com/NixOS/nixpkgs/commit/e229318f7d34f4988a815e6d10b8fb0f7e0e2974"
}
]
},
"merge_base_commit": {
"sha": "2c5fac3edf2d00d948253e392ec1604b29b38f14",
"node_id": "C_kwDOAEVQ_NoAKDJjNWZhYzNlZGYyZDAwZDk0ODI1M2UzOTJlYzE2MDRiMjliMzhmMTQ",
"commit": {
"author": {
"name": "Thomas Gerbet",
"email": "thomas@gerbet.me",
"date": "2024-09-30T18:58:09Z"
},
"committer": {
"name": "Bjørn Forsman",
"email": "bjorn.forsman@gmail.com",
"date": "2024-10-01T06:56:48Z"
},
"message": "wireshark: 4.2.6 -> 4.2.7\n\nFixes CVE-2024-8250.\nhttps://www.wireshark.org/security/wnpa-sec-2024-11.html\n\nChanges:\nhttps://www.wireshark.org/docs/relnotes/wireshark-4.2.7.html",
"tree": {
"sha": "35384ecd1601439a960f3ef76a1974bb7784523f",
"url": "https://api.github.com/repos/NixOS/nixpkgs/git/trees/35384ecd1601439a960f3ef76a1974bb7784523f"
},
"url": "https://api.github.com/repos/NixOS/nixpkgs/git/commits/2c5fac3edf2d00d948253e392ec1604b29b38f14",
"comment_count": 0,
"verification": {
"verified": false,
"reason": "unsigned",
"signature": null,
"payload": null
}
},
"url": "https://api.github.com/repos/NixOS/nixpkgs/commits/2c5fac3edf2d00d948253e392ec1604b29b38f14",
"html_url": "https://github.com/NixOS/nixpkgs/commit/2c5fac3edf2d00d948253e392ec1604b29b38f14",
"comments_url": "https://api.github.com/repos/NixOS/nixpkgs/commits/2c5fac3edf2d00d948253e392ec1604b29b38f14/comments",
"author": {
"login": "LeSuisse",
"id": 737767,
"node_id": "MDQ6VXNlcjczNzc2Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/737767?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/LeSuisse",
"html_url": "https://github.com/LeSuisse",
"followers_url": "https://api.github.com/users/LeSuisse/followers",
"following_url": "https://api.github.com/users/LeSuisse/following{/other_user}",
"gists_url": "https://api.github.com/users/LeSuisse/gists{/gist_id}",
"starred_url": "https://api.github.com/users/LeSuisse/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LeSuisse/subscriptions",
"organizations_url": "https://api.github.com/users/LeSuisse/orgs",
"repos_url": "https://api.github.com/users/LeSuisse/repos",
"events_url": "https://api.github.com/users/LeSuisse/events{/privacy}",
"received_events_url": "https://api.github.com/users/LeSuisse/received_events",
"type": "User",
"site_admin": false
},
"committer": {
"login": "bjornfor",
"id": 133602,
"node_id": "MDQ6VXNlcjEzMzYwMg==",
"avatar_url": "https://avatars.githubusercontent.com/u/133602?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bjornfor",
"html_url": "https://github.com/bjornfor",
"followers_url": "https://api.github.com/users/bjornfor/followers",
"following_url": "https://api.github.com/users/bjornfor/following{/other_user}",
"gists_url": "https://api.github.com/users/bjornfor/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bjornfor/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bjornfor/subscriptions",
"organizations_url": "https://api.github.com/users/bjornfor/orgs",
"repos_url": "https://api.github.com/users/bjornfor/repos",
"events_url": "https://api.github.com/users/bjornfor/events{/privacy}",
"received_events_url": "https://api.github.com/users/bjornfor/received_events",
"type": "User",
"site_admin": false
},
"parents": [
{
"sha": "92bdb0b4e0f698cdde010c2254cdb2afee6e07c3",
"url": "https://api.github.com/repos/NixOS/nixpkgs/commits/92bdb0b4e0f698cdde010c2254cdb2afee6e07c3",
"html_url": "https://github.com/NixOS/nixpkgs/commit/92bdb0b4e0f698cdde010c2254cdb2afee6e07c3"
}
]
},
"status": "behind",
"ahead_by": 0,
"behind_by": 918,
"total_commits": 0,
"commits": [
],
"files": [
]
}

443
tests/fixtures/pulls_345583.json vendored Normal file
View File

@ -0,0 +1,443 @@
{
"url": "https://api.github.com/repos/NixOS/nixpkgs/pulls/345583",
"id": 2099869862,
"node_id": "PR_kwDOAEVQ_M59KXim",
"html_url": "https://github.com/NixOS/nixpkgs/pull/345583",
"diff_url": "https://github.com/NixOS/nixpkgs/pull/345583.diff",
"patch_url": "https://github.com/NixOS/nixpkgs/pull/345583.patch",
"issue_url": "https://api.github.com/repos/NixOS/nixpkgs/issues/345583",
"number": 345583,
"state": "closed",
"locked": false,
"title": "wireshark: 4.2.6 -> 4.2.7",
"user": {
"login": "LeSuisse",
"id": 737767,
"node_id": "MDQ6VXNlcjczNzc2Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/737767?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/LeSuisse",
"html_url": "https://github.com/LeSuisse",
"followers_url": "https://api.github.com/users/LeSuisse/followers",
"following_url": "https://api.github.com/users/LeSuisse/following{/other_user}",
"gists_url": "https://api.github.com/users/LeSuisse/gists{/gist_id}",
"starred_url": "https://api.github.com/users/LeSuisse/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LeSuisse/subscriptions",
"organizations_url": "https://api.github.com/users/LeSuisse/orgs",
"repos_url": "https://api.github.com/users/LeSuisse/repos",
"events_url": "https://api.github.com/users/LeSuisse/events{/privacy}",
"received_events_url": "https://api.github.com/users/LeSuisse/received_events",
"type": "User",
"site_admin": false
},
"body": "## Description of changes\r\n\r\nFixes CVE-2024-8250.\r\nhttps://www.wireshark.org/security/wnpa-sec-2024-11.html\r\n\r\nChanges:\r\nhttps://www.wireshark.org/docs/relnotes/wireshark-4.2.7.html\r\n<!--\r\nFor package updates please link to a changelog or describe changes, this helps your fellow maintainers discover breaking updates.\r\nFor new packages please briefly describe the package or provide a link to its homepage.\r\n-->\r\n\r\n## Things done\r\n\r\n<!-- Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers. -->\r\n\r\n- Built on platform(s)\r\n - [x] x86_64-linux\r\n - [ ] aarch64-linux\r\n - [ ] x86_64-darwin\r\n - [ ] aarch64-darwin\r\n- For non-Linux: Is sandboxing enabled in `nix.conf`? (See [Nix manual](https://nixos.org/manual/nix/stable/command-ref/conf-file.html))\r\n - [ ] `sandbox = relaxed`\r\n - [ ] `sandbox = true`\r\n- [ ] Tested, as applicable:\r\n - [NixOS test(s)](https://nixos.org/manual/nixos/unstable/index.html#sec-nixos-tests) (look inside [nixos/tests](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests))\r\n - and/or [package tests](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-tests)\r\n - or, for functions and \"core\" functionality, tests in [lib/tests](https://github.com/NixOS/nixpkgs/blob/master/lib/tests) or [pkgs/test](https://github.com/NixOS/nixpkgs/blob/master/pkgs/test)\r\n - made sure NixOS tests are [linked](https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#linking-nixos-module-tests-to-a-package) to the relevant packages\r\n- [x] Tested compilation of all packages that depend on this change using `nix-shell -p nixpkgs-review --run \"nixpkgs-review rev HEAD\"`. Note: all changes have to be committed, also see [nixpkgs-review usage](https://github.com/Mic92/nixpkgs-review#usage)\r\n- [x] Tested basic functionality of all binary files (usually in `./result/bin/`)\r\n- [24.11 Release Notes](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2411.section.md) (or backporting [23.11](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2311.section.md) and [24.05](https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2405.section.md) Release notes)\r\n - [ ] (Package updates) Added a release notes entry if the change is major or breaking\r\n - [ ] (Module updates) Added a release notes entry if the change is significant\r\n - [ ] (Module addition) Added a release notes entry if adding a new NixOS module\r\n- [x] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md).\r\n\r\n<!--\r\nTo help with the large amounts of pull requests, we would appreciate your\r\nreviews of other pull requests, especially simple package updates. Just leave a\r\ncomment describing what you have tested in the relevant package/service.\r\nReviewing helps to reduce the average time-to-merge for everyone.\r\nThanks a lot if you do!\r\n\r\nList of open PRs: https://github.com/NixOS/nixpkgs/pulls\r\nReviewing guidelines: https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#reviewing-contributions\r\n-->\r\n\r\nResult of `nixpkgs-review` run on x86_64-linux [1](https://github.com/Mic92/nixpkgs-review)\r\n<details>\r\n <summary>4 packages marked as broken and skipped:</summary>\r\n <ul>\r\n <li>python311Packages.dissect-cobaltstrike</li>\r\n <li>python311Packages.dissect-cobaltstrike.dist</li>\r\n <li>python312Packages.dissect-cobaltstrike</li>\r\n <li>python312Packages.dissect-cobaltstrike.dist</li>\r\n </ul>\r\n</details>\r\n<details>\r\n <summary>24 packages built:</summary>\r\n <ul>\r\n <li>compactor</li>\r\n <li>credslayer</li>\r\n <li>credslayer.dist</li>\r\n <li>dbmonster</li>\r\n <li>haka</li>\r\n <li>hfinger</li>\r\n <li>hfinger.dist</li>\r\n <li>ostinato</li>\r\n <li>python311Packages.manuf</li>\r\n <li>python311Packages.manuf.dist</li>\r\n <li>python311Packages.pyshark</li>\r\n <li>python311Packages.pyshark.dist</li>\r\n <li>python312Packages.manuf</li>\r\n <li>python312Packages.manuf.dist</li>\r\n <li>python312Packages.pyshark</li>\r\n <li>python312Packages.pyshark.dist</li>\r\n <li>qtwirediff</li>\r\n <li>termshark</li>\r\n <li>tshark</li>\r\n <li>tshark.dev</li>\r\n <li>wifite2</li>\r\n <li>wifite2.dist</li>\r\n <li>wireshark</li>\r\n <li>wireshark.dev</li>\r\n </ul>\r\n</details>\r\n\r\n---\r\n\r\nAdd a :+1: [reaction] to [pull requests you find important].\r\n\r\n[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/\r\n[pull requests you find important]: https://github.com/NixOS/nixpkgs/pulls?q=is%3Aopen+sort%3Areactions-%2B1-desc\r\n",
"created_at": "2024-09-30T19:26:00Z",
"updated_at": "2024-10-01T08:26:57Z",
"closed_at": "2024-10-01T06:56:48Z",
"merged_at": "2024-10-01T06:56:48Z",
"merge_commit_sha": "2c5fac3edf2d00d948253e392ec1604b29b38f14",
"assignee": null,
"assignees": [
],
"requested_reviewers": [
{
"login": "fpletz",
"id": 114159,
"node_id": "MDQ6VXNlcjExNDE1OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/114159?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fpletz",
"html_url": "https://github.com/fpletz",
"followers_url": "https://api.github.com/users/fpletz/followers",
"following_url": "https://api.github.com/users/fpletz/following{/other_user}",
"gists_url": "https://api.github.com/users/fpletz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/fpletz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fpletz/subscriptions",
"organizations_url": "https://api.github.com/users/fpletz/orgs",
"repos_url": "https://api.github.com/users/fpletz/repos",
"events_url": "https://api.github.com/users/fpletz/events{/privacy}",
"received_events_url": "https://api.github.com/users/fpletz/received_events",
"type": "User",
"site_admin": false
}
],
"requested_teams": [
],
"labels": [
{
"id": 126506420,
"node_id": "MDU6TGFiZWwxMjY1MDY0MjA=",
"url": "https://api.github.com/repos/NixOS/nixpkgs/labels/1.severity:%20security",
"name": "1.severity: security",
"color": "e11d21",
"default": false,
"description": null
},
{
"id": 731734101,
"node_id": "MDU6TGFiZWw3MzE3MzQxMDE=",
"url": "https://api.github.com/repos/NixOS/nixpkgs/labels/10.rebuild-linux:%2011-100",
"name": "10.rebuild-linux: 11-100",
"color": "fbca04",
"default": false,
"description": null
},
{
"id": 731735423,
"node_id": "MDU6TGFiZWw3MzE3MzU0MjM=",
"url": "https://api.github.com/repos/NixOS/nixpkgs/labels/10.rebuild-darwin:%2011-100",
"name": "10.rebuild-darwin: 11-100",
"color": "fbca04",
"default": false,
"description": null
},
{
"id": 6984924132,
"node_id": "LA_kwDOAEVQ_M8AAAABoFV75A",
"url": "https://api.github.com/repos/NixOS/nixpkgs/labels/backport%20release-24.05",
"name": "backport release-24.05",
"color": "0fafaa",
"default": false,
"description": "Backport PR automatically"
}
],
"milestone": null,
"draft": false,
"commits_url": "https://api.github.com/repos/NixOS/nixpkgs/pulls/345583/commits",
"review_comments_url": "https://api.github.com/repos/NixOS/nixpkgs/pulls/345583/comments",
"review_comment_url": "https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}",
"comments_url": "https://api.github.com/repos/NixOS/nixpkgs/issues/345583/comments",
"statuses_url": "https://api.github.com/repos/NixOS/nixpkgs/statuses/64a0ed1ab2dbbf66d7674d5d5787537341d961b0",
"head": {
"label": "LeSuisse:wireshark-4.2.7",
"ref": "wireshark-4.2.7",
"sha": "64a0ed1ab2dbbf66d7674d5d5787537341d961b0",
"user": {
"login": "LeSuisse",
"id": 737767,
"node_id": "MDQ6VXNlcjczNzc2Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/737767?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/LeSuisse",
"html_url": "https://github.com/LeSuisse",
"followers_url": "https://api.github.com/users/LeSuisse/followers",
"following_url": "https://api.github.com/users/LeSuisse/following{/other_user}",
"gists_url": "https://api.github.com/users/LeSuisse/gists{/gist_id}",
"starred_url": "https://api.github.com/users/LeSuisse/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LeSuisse/subscriptions",
"organizations_url": "https://api.github.com/users/LeSuisse/orgs",
"repos_url": "https://api.github.com/users/LeSuisse/repos",
"events_url": "https://api.github.com/users/LeSuisse/events{/privacy}",
"received_events_url": "https://api.github.com/users/LeSuisse/received_events",
"type": "User",
"site_admin": false
},
"repo": {
"id": 330208195,
"node_id": "MDEwOlJlcG9zaXRvcnkzMzAyMDgxOTU=",
"name": "nixpkgs",
"full_name": "LeSuisse/nixpkgs",
"private": false,
"owner": {
"login": "LeSuisse",
"id": 737767,
"node_id": "MDQ6VXNlcjczNzc2Nw==",
"avatar_url": "https://avatars.githubusercontent.com/u/737767?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/LeSuisse",
"html_url": "https://github.com/LeSuisse",
"followers_url": "https://api.github.com/users/LeSuisse/followers",
"following_url": "https://api.github.com/users/LeSuisse/following{/other_user}",
"gists_url": "https://api.github.com/users/LeSuisse/gists{/gist_id}",
"starred_url": "https://api.github.com/users/LeSuisse/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LeSuisse/subscriptions",
"organizations_url": "https://api.github.com/users/LeSuisse/orgs",
"repos_url": "https://api.github.com/users/LeSuisse/repos",
"events_url": "https://api.github.com/users/LeSuisse/events{/privacy}",
"received_events_url": "https://api.github.com/users/LeSuisse/received_events",
"type": "User",
"site_admin": false
},
"html_url": "https://github.com/LeSuisse/nixpkgs",
"description": "Nix Packages collection",
"fork": true,
"url": "https://api.github.com/repos/LeSuisse/nixpkgs",
"forks_url": "https://api.github.com/repos/LeSuisse/nixpkgs/forks",
"keys_url": "https://api.github.com/repos/LeSuisse/nixpkgs/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/LeSuisse/nixpkgs/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/LeSuisse/nixpkgs/teams",
"hooks_url": "https://api.github.com/repos/LeSuisse/nixpkgs/hooks",
"issue_events_url": "https://api.github.com/repos/LeSuisse/nixpkgs/issues/events{/number}",
"events_url": "https://api.github.com/repos/LeSuisse/nixpkgs/events",
"assignees_url": "https://api.github.com/repos/LeSuisse/nixpkgs/assignees{/user}",
"branches_url": "https://api.github.com/repos/LeSuisse/nixpkgs/branches{/branch}",
"tags_url": "https://api.github.com/repos/LeSuisse/nixpkgs/tags",
"blobs_url": "https://api.github.com/repos/LeSuisse/nixpkgs/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/LeSuisse/nixpkgs/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/LeSuisse/nixpkgs/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/LeSuisse/nixpkgs/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/LeSuisse/nixpkgs/statuses/{sha}",
"languages_url": "https://api.github.com/repos/LeSuisse/nixpkgs/languages",
"stargazers_url": "https://api.github.com/repos/LeSuisse/nixpkgs/stargazers",
"contributors_url": "https://api.github.com/repos/LeSuisse/nixpkgs/contributors",
"subscribers_url": "https://api.github.com/repos/LeSuisse/nixpkgs/subscribers",
"subscription_url": "https://api.github.com/repos/LeSuisse/nixpkgs/subscription",
"commits_url": "https://api.github.com/repos/LeSuisse/nixpkgs/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/LeSuisse/nixpkgs/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/LeSuisse/nixpkgs/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/LeSuisse/nixpkgs/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/LeSuisse/nixpkgs/contents/{+path}",
"compare_url": "https://api.github.com/repos/LeSuisse/nixpkgs/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/LeSuisse/nixpkgs/merges",
"archive_url": "https://api.github.com/repos/LeSuisse/nixpkgs/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/LeSuisse/nixpkgs/downloads",
"issues_url": "https://api.github.com/repos/LeSuisse/nixpkgs/issues{/number}",
"pulls_url": "https://api.github.com/repos/LeSuisse/nixpkgs/pulls{/number}",
"milestones_url": "https://api.github.com/repos/LeSuisse/nixpkgs/milestones{/number}",
"notifications_url": "https://api.github.com/repos/LeSuisse/nixpkgs/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/LeSuisse/nixpkgs/labels{/name}",
"releases_url": "https://api.github.com/repos/LeSuisse/nixpkgs/releases{/id}",
"deployments_url": "https://api.github.com/repos/LeSuisse/nixpkgs/deployments",
"created_at": "2021-01-16T16:40:54Z",
"updated_at": "2024-05-30T20:02:25Z",
"pushed_at": "2024-10-03T13:24:28Z",
"git_url": "git://github.com/LeSuisse/nixpkgs.git",
"ssh_url": "git@github.com:LeSuisse/nixpkgs.git",
"clone_url": "https://github.com/LeSuisse/nixpkgs.git",
"svn_url": "https://github.com/LeSuisse/nixpkgs",
"homepage": "",
"size": 4437697,
"stargazers_count": 1,
"watchers_count": 1,
"language": "Nix",
"has_issues": false,
"has_projects": true,
"has_downloads": true,
"has_wiki": false,
"has_pages": false,
"has_discussions": false,
"forks_count": 0,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 0,
"license": {
"key": "mit",
"name": "MIT License",
"spdx_id": "MIT",
"url": "https://api.github.com/licenses/mit",
"node_id": "MDc6TGljZW5zZTEz"
},
"allow_forking": true,
"is_template": false,
"web_commit_signoff_required": false,
"topics": [
],
"visibility": "public",
"forks": 0,
"open_issues": 0,
"watchers": 1,
"default_branch": "master"
}
},
"base": {
"label": "NixOS:master",
"ref": "master",
"sha": "c1e68f011844844605548984e3c8cd1a9379d78f",
"user": {
"login": "NixOS",
"id": 487568,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjQ4NzU2OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/487568?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/NixOS",
"html_url": "https://github.com/NixOS",
"followers_url": "https://api.github.com/users/NixOS/followers",
"following_url": "https://api.github.com/users/NixOS/following{/other_user}",
"gists_url": "https://api.github.com/users/NixOS/gists{/gist_id}",
"starred_url": "https://api.github.com/users/NixOS/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NixOS/subscriptions",
"organizations_url": "https://api.github.com/users/NixOS/orgs",
"repos_url": "https://api.github.com/users/NixOS/repos",
"events_url": "https://api.github.com/users/NixOS/events{/privacy}",
"received_events_url": "https://api.github.com/users/NixOS/received_events",
"type": "Organization",
"site_admin": false
},
"repo": {
"id": 4542716,
"node_id": "MDEwOlJlcG9zaXRvcnk0NTQyNzE2",
"name": "nixpkgs",
"full_name": "NixOS/nixpkgs",
"private": false,
"owner": {
"login": "NixOS",
"id": 487568,
"node_id": "MDEyOk9yZ2FuaXphdGlvbjQ4NzU2OA==",
"avatar_url": "https://avatars.githubusercontent.com/u/487568?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/NixOS",
"html_url": "https://github.com/NixOS",
"followers_url": "https://api.github.com/users/NixOS/followers",
"following_url": "https://api.github.com/users/NixOS/following{/other_user}",
"gists_url": "https://api.github.com/users/NixOS/gists{/gist_id}",
"starred_url": "https://api.github.com/users/NixOS/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NixOS/subscriptions",
"organizations_url": "https://api.github.com/users/NixOS/orgs",
"repos_url": "https://api.github.com/users/NixOS/repos",
"events_url": "https://api.github.com/users/NixOS/events{/privacy}",
"received_events_url": "https://api.github.com/users/NixOS/received_events",
"type": "Organization",
"site_admin": false
},
"html_url": "https://github.com/NixOS/nixpkgs",
"description": "Nix Packages collection & NixOS",
"fork": false,
"url": "https://api.github.com/repos/NixOS/nixpkgs",
"forks_url": "https://api.github.com/repos/NixOS/nixpkgs/forks",
"keys_url": "https://api.github.com/repos/NixOS/nixpkgs/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/NixOS/nixpkgs/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/NixOS/nixpkgs/teams",
"hooks_url": "https://api.github.com/repos/NixOS/nixpkgs/hooks",
"issue_events_url": "https://api.github.com/repos/NixOS/nixpkgs/issues/events{/number}",
"events_url": "https://api.github.com/repos/NixOS/nixpkgs/events",
"assignees_url": "https://api.github.com/repos/NixOS/nixpkgs/assignees{/user}",
"branches_url": "https://api.github.com/repos/NixOS/nixpkgs/branches{/branch}",
"tags_url": "https://api.github.com/repos/NixOS/nixpkgs/tags",
"blobs_url": "https://api.github.com/repos/NixOS/nixpkgs/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/NixOS/nixpkgs/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/NixOS/nixpkgs/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/NixOS/nixpkgs/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/NixOS/nixpkgs/statuses/{sha}",
"languages_url": "https://api.github.com/repos/NixOS/nixpkgs/languages",
"stargazers_url": "https://api.github.com/repos/NixOS/nixpkgs/stargazers",
"contributors_url": "https://api.github.com/repos/NixOS/nixpkgs/contributors",
"subscribers_url": "https://api.github.com/repos/NixOS/nixpkgs/subscribers",
"subscription_url": "https://api.github.com/repos/NixOS/nixpkgs/subscription",
"commits_url": "https://api.github.com/repos/NixOS/nixpkgs/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/NixOS/nixpkgs/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/NixOS/nixpkgs/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/NixOS/nixpkgs/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/NixOS/nixpkgs/contents/{+path}",
"compare_url": "https://api.github.com/repos/NixOS/nixpkgs/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/NixOS/nixpkgs/merges",
"archive_url": "https://api.github.com/repos/NixOS/nixpkgs/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/NixOS/nixpkgs/downloads",
"issues_url": "https://api.github.com/repos/NixOS/nixpkgs/issues{/number}",
"pulls_url": "https://api.github.com/repos/NixOS/nixpkgs/pulls{/number}",
"milestones_url": "https://api.github.com/repos/NixOS/nixpkgs/milestones{/number}",
"notifications_url": "https://api.github.com/repos/NixOS/nixpkgs/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/NixOS/nixpkgs/labels{/name}",
"releases_url": "https://api.github.com/repos/NixOS/nixpkgs/releases{/id}",
"deployments_url": "https://api.github.com/repos/NixOS/nixpkgs/deployments",
"created_at": "2012-06-04T02:49:46Z",
"updated_at": "2024-10-05T22:47:49Z",
"pushed_at": "2024-10-05T22:34:39Z",
"git_url": "git://github.com/NixOS/nixpkgs.git",
"ssh_url": "git@github.com:NixOS/nixpkgs.git",
"clone_url": "https://github.com/NixOS/nixpkgs.git",
"svn_url": "https://github.com/NixOS/nixpkgs",
"homepage": "",
"size": 4520403,
"stargazers_count": 17638,
"watchers_count": 17638,
"language": "Nix",
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": false,
"has_pages": false,
"has_discussions": false,
"forks_count": 13796,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 15342,
"license": {
"key": "mit",
"name": "MIT License",
"spdx_id": "MIT",
"url": "https://api.github.com/licenses/mit",
"node_id": "MDc6TGljZW5zZTEz"
},
"allow_forking": true,
"is_template": false,
"web_commit_signoff_required": false,
"topics": [
"hacktoberfest",
"linux",
"nix",
"nixos",
"nixpkgs"
],
"visibility": "public",
"forks": 13796,
"open_issues": 15342,
"watchers": 17638,
"default_branch": "master"
}
},
"_links": {
"self": {
"href": "https://api.github.com/repos/NixOS/nixpkgs/pulls/345583"
},
"html": {
"href": "https://github.com/NixOS/nixpkgs/pull/345583"
},
"issue": {
"href": "https://api.github.com/repos/NixOS/nixpkgs/issues/345583"
},
"comments": {
"href": "https://api.github.com/repos/NixOS/nixpkgs/issues/345583/comments"
},
"review_comments": {
"href": "https://api.github.com/repos/NixOS/nixpkgs/pulls/345583/comments"
},
"review_comment": {
"href": "https://api.github.com/repos/NixOS/nixpkgs/pulls/comments{/number}"
},
"commits": {
"href": "https://api.github.com/repos/NixOS/nixpkgs/pulls/345583/commits"
},
"statuses": {
"href": "https://api.github.com/repos/NixOS/nixpkgs/statuses/64a0ed1ab2dbbf66d7674d5d5787537341d961b0"
}
},
"author_association": "CONTRIBUTOR",
"auto_merge": null,
"active_lock_reason": null,
"merged": true,
"mergeable": null,
"rebaseable": null,
"mergeable_state": "unknown",
"merged_by": {
"login": "bjornfor",
"id": 133602,
"node_id": "MDQ6VXNlcjEzMzYwMg==",
"avatar_url": "https://avatars.githubusercontent.com/u/133602?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bjornfor",
"html_url": "https://github.com/bjornfor",
"followers_url": "https://api.github.com/users/bjornfor/followers",
"following_url": "https://api.github.com/users/bjornfor/following{/other_user}",
"gists_url": "https://api.github.com/users/bjornfor/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bjornfor/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bjornfor/subscriptions",
"organizations_url": "https://api.github.com/users/bjornfor/orgs",
"repos_url": "https://api.github.com/users/bjornfor/repos",
"events_url": "https://api.github.com/users/bjornfor/events{/privacy}",
"received_events_url": "https://api.github.com/users/bjornfor/received_events",
"type": "User",
"site_admin": false
},
"comments": 2,
"review_comments": 0,
"maintainer_can_modify": false,
"commits": 1,
"additions": 2,
"deletions": 2,
"changed_files": 1
}

55
tests/test_pr.py Normal file
View File

@ -0,0 +1,55 @@
import unittest
import unittest.mock
import requests
import json
from nixprstatus.pr import commit_in_branch, pr_merge_status
def mocked_requests_get(*args, **kwargs):
class MockedResponse:
def __init__(self, json_data, status_code):
self.json_data = json_data
self.status_code = status_code
def json(self):
return json.loads(self.json_data)
def raise_for_status(self):
if self.status_code not in [200, 201]:
raise requests.exceptions.HTTPError()
if "pulls" in args[0]:
pr = args[0].split("/")[-1]
with open(f"tests/fixtures/pulls_{pr}.json") as f:
data = f.read()
return MockedResponse(data, 200)
elif "compare" in args[0]:
branch, commit_sha = args[0].split("/")[-1].split("...")
with open(f"tests/fixtures/compare_{branch}_{commit_sha}.json") as f:
data = f.read()
return MockedResponse(data, 200)
class TestPRMergeStatus(unittest.TestCase):
@unittest.mock.patch("requests.get", side_effect=mocked_requests_get)
def test_pr_merge_status_345583(self, mock_get):
pr = 345583
branches = ["master", "nixos-unstable", "nixos-24.05"]
res = pr_merge_status(pr, branches)
self.assertTrue(res.merged)
self.assertTrue(res.branches["master"])
self.assertTrue(res.branches["nixos-unstable"])
self.assertFalse(res.branches["nixos-24.05"])
class TestCommitInBranch(unittest.TestCase):
@unittest.mock.patch("requests.get", side_effect=mocked_requests_get)
def test_commit_in_branch_2c5fac3e(self, mock_get):
commit_sha = "2c5fac3edf2d00d948253e392ec1604b29b38f14"
res = commit_in_branch(commit_sha, "master")
self.assertTrue(res)
res = commit_in_branch(commit_sha, "nixos-24.05")
self.assertFalse(res)