Looks like I hit an edge case, where approval_count was 0, which generally shouldn't be a problem.
INFO:root:Processing 213835
INFO:root:lastappdate: 2023-01-31 22:11:31
INFO:root:lastcommitdate: 2023-01-31 19:15:12
Traceback (most recent call last):
File "/nix/store/i7bzfdg5alslnxr97qh7ia0zn6gh6sf8-label-approved-0.1.0/bin/.label-approved-wrapped", line 9, in <module>
sys.exit(main())
File "/nix/store/i7bzfdg5alslnxr97qh7ia0zn6gh6sf8-label-approved-0.1.0/lib/python3.10/site-packages/label_approved/cli.py", line 147, in main
label_to_add = label_dict[pr_object.new_label]
KeyError: 0
DEBUG:urllib3.connectionpool:https://api.github.com:443 "GET /repos/NixOS/nixpkgs/issues/213835/labels HTTP/1.1" 200 None
DEBUG:github.Requester:GET https://api.github.com/repos/NixOS/nixpkgs/issues/213835/labels {'Authorization': 'token (oauth token removed)', 'User-Agent': 'PyGithub/Python'} None ==> 200 {'server': 'GitHub.com', 'date': 'Thu, 02 Feb 2023 01:27:28 GMT', 'content-type': 'application/json; charset=utf-8', 'transfer-encoding': 'chunked', 'cache-control': 'private, max-age=60, s-maxage=60', 'vary': 'Accept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding, Accept, X-Requested-With', 'etag': 'W/"b18bc22cbbf9444502d42f5d57d9894a74625a89b01eff3dd1df581ce0b67434"', 'last-modified': 'Wed, 01 Feb 2023 02:54:16 GMT', 'x-oauth-scopes': 'repo', 'x-accepted-oauth-scopes': 'repo', 'github-authentication-token-expiration': '2023-02-08 01:25:57 UTC', 'x-github-media-type': 'github.v3; format=json', 'x-github-api-version-selected': '2022-11-28', 'x-ratelimit-limit': '5000', 'x-ratelimit-remaining': '3728', 'x-ratelimit-reset': '1675301677', 'x-ratelimit-used': '1272', 'x-ratelimit-resource': 'core', 'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset', 'access-control-allow-origin': '*', 'strict-transport-security': 'max-age=31536000; includeSubdomains; preload', 'x-frame-options': 'deny', 'x-content-type-options': 'nosniff', 'x-xss-protection': '0', 'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin', 'content-security-policy': "default-src 'none'", 'content-encoding': 'gzip', 'x-github-request-id': 'E7CC:37CE:18FD4:19825:63DB1180'} [{"id":731733923,"node_id":"MDU6TGFiZWw3MzE3MzM5MjM=","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/10.rebuild-linux:%201-10","name":"10.rebuild-linux: 1-10","color":"eeffee","default":false,"description":null},{"id":731735222,"node_id":"MDU6TGFiZWw3MzE3MzUyMjI=","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/10.rebuild-darwin:%201-10","name":"10.rebuild-darwin: 1-10","color":"eeffee","default":false,"description":null},{"id":1955058051,"node_id":"MDU6TGFiZWwxOTU1MDU4MDUx","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/10.rebuild-darwin:%201","name":"10.rebuild-darwin: 1","color":"ededed","default":false,"description":null},{"id":1955058054,"node_id":"MDU6TGFiZWwxOTU1MDU4MDU0","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/10.rebuild-linux:%201","name":"10.rebuild-linux: 1","color":"ededed","default":false,"description":null},{"id":4022792890,"node_id":"LA_kwDOAEVQ_M7vxvK6","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/12.approvals:%201","name":"12.approvals: 1","color":"0E8A16","default":false,"description":""},{"id":4061482046,"node_id":"LA_kwDOAEVQ_M7yFUw-","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/12.approved-by:%20package-maintainer","name":"12.approved-by: package-maintainer","color":"0E8A16","default":false,"description":""},{"id":4826074325,"node_id":"LA_kwDOAEVQ_M8AAAABH6gM1Q","url":"https://api.github.com/repos/NixOS/nixpkgs/labels/backport%20release-22.11","name":"backport release-22.11","color":"13DBD5","default":false,"description":"Backport PR automatically"}]
DEBUG:root:PrWithApprovals(p_r=PullRequest(title="coursera-dl: fix api version problems", number=213835), new_label=0, previous_label=1)