[IMP] runbot_merge: logging of gh requests

The loggers would only print the "tail" of the path, not including the
repo name, or the `/repos` prefix.

While this made logs shorter, it was not intentional and made
debugging some issues on endpoints harder than necessary as the calls
had to be adjusted mentally, which is completely unnecessary.
This commit is contained in:
Xavier Morel 2023-02-21 15:11:59 +01:00
parent 6e1fc61781
commit 5e1048c6da

View File

@ -105,12 +105,8 @@ class GH(object):
"""
:type check: bool | dict[int:Exception]
"""
r = self._session.request(
method,
'{}/repos/{}/{}'.format(self._url, self._repo, path),
params=params,
json=json
)
path = f'/repos/{self._repo}/{path}'
r = self._session.request(method, self._url + path, params=params, json=json)
self._log_gh(_gh, method, path, params, json, r)
if check:
if isinstance(check, collections.abc.Mapping):