Skip to content

Commit 8370e37

Browse files
committed
github_requests.py: don't need the checks for 'params' in _fix_url since the tokens are now in the headers
1 parent 3909ebd commit 8370e37

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

adabot/github_requests.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,8 @@ def _fix_kwargs(kwargs):
5858
access_token = os.environ["ADABOT_GITHUB_ACCESS_TOKEN"]
5959
basic_encoded = b64encode(str(user + ":" + access_token).encode()).decode()
6060
auth_header = "Basic {}".format(basic_encoded)
61-
62-
if "params" in kwargs:
63-
kwargs["headers"]["Authorization"] = auth_header
64-
else:
65-
kwargs["headers"] = {"Authorization": auth_header}
61+
62+
kwargs["headers"]["Authorization"] = auth_header
6663

6764
return kwargs
6865

0 commit comments

Comments
 (0)