From 5e1048c6da9caee113620e049eab6357f4508890 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Tue, 21 Feb 2023 15:11:59 +0100 Subject: [PATCH] [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. --- runbot_merge/github.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/runbot_merge/github.py b/runbot_merge/github.py index e1f43781..27cf6305 100644 --- a/runbot_merge/github.py +++ b/runbot_merge/github.py @@ -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):