I'm getting the above error when setting up branch protection. I believe this might be a ghapi issue, as I can invoke the native API with the exact same values without problems.
File "C:\Users\grojan\projects\ffma-itan-dev_portal\ffma_dev_portal\github.py", line 196, in setup_branch_protection
restrictions=None,
File "c:\Users\grojan\projects\ffma-itan-dev_portal\.venv\lib\site-packages\ghapi\core.py", line 63, in __call__
return self.client(self.path, self.verb, headers=headers, route=route_p, query=query_p, data=data_p)
File "c:\Users\grojan\projects\ffma-itan-dev_portal\.venv\lib\site-packages\ghapi\core.py", line 113, in __call__
route=route or None, query=query or None, data=data or None)
File "c:\Users\grojan\projects\ffma-itan-dev_portal\.venv\lib\site-packages\fastcore\net.py", line 212, in urlsend
return urlread(req, return_json=return_json, return_headers=return_headers)
File "c:\Users\grojan\projects\ffma-itan-dev_portal\.venv\lib\site-packages\fastcore\net.py", line 113, in urlread
if 400 <= e.code < 500: raise ExceptionsHTTP[e.code](e.url, e.hdrs, e.fp) from None
fastcore.basics.HTTP422UnprocessableEntityError: HTTP Error 422: Unprocessable Entity
The same call against the native API goes through without problems
I'm getting the above error when setting up branch protection. I believe this might be a
ghapi
issue, as I can invoke the native API with the exact same values without problems.Call:
Error:
The same call against the native API goes through without problems
(
invoke_native_api
is a thin wrapper aroundrequests
)