fix: pycurl error

This commit is contained in:
2026-06-03 14:10:27 +02:00
parent a6280b6799
commit 0749622166
+9 -2
View File
@@ -37,13 +37,20 @@ DEFAULT_CONFIG = {
"userPingServer": "matrix.org"
}
}
def getPRTitle(PRnumber):
buf = io.BytesIO()
with pycurl.Curl() as c:
c.setopt(c.URL, "https://api.github.com/repos/NixOS/nixpkgs/pulls/" + str(PRnumber))
c = pycurl.Curl()
c.setopt(
c.URL,
f"https://api.github.com/repos/NixOS/nixpkgs/pulls/{PRnumber}"
)
c.setopt(c.USERAGENT, "pycurl")
c.setopt(c.WRITEDATA, buf)
c.perform()
c.close()
return json.loads(buf.getvalue())["title"]
def load_config():