From d7f1193fa4d950256fa8f100c3029593f7ac3893 Mon Sep 17 00:00:00 2001 From: Soumil Shekdar Date: Wed, 21 Jul 2021 15:36:19 -0700 Subject: [PATCH 1/2] Fixes: #1671 --- github/AuthenticatedUser.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/github/AuthenticatedUser.py b/github/AuthenticatedUser.py index 9f9993d56a..efc331d2b6 100644 --- a/github/AuthenticatedUser.py +++ b/github/AuthenticatedUser.py @@ -973,9 +973,11 @@ def get_notifications( params = dict() if all is not github.GithubObject.NotSet: - params["all"] = all + # convert True, False to true, false for api parameters + params["all"] = str(all).lower() if isinstance(all, bool) else all if participating is not github.GithubObject.NotSet: - params["participating"] = participating + # convert True, False to true, false for api parameters + params["participating"] = str(participating).lower() if isinstance(participating, bool) else participating if since is not github.GithubObject.NotSet: params["since"] = since.strftime("%Y-%m-%dT%H:%M:%SZ") if before is not github.GithubObject.NotSet: From 2760bbbd3412155540514b2d9c277166557b84ca Mon Sep 17 00:00:00 2001 From: Soumil Shekdar Date: Wed, 21 Jul 2021 20:59:26 -0700 Subject: [PATCH 2/2] Fix #1671 Review Resolution --- github/AuthenticatedUser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/github/AuthenticatedUser.py b/github/AuthenticatedUser.py index efc331d2b6..19dfe4e442 100644 --- a/github/AuthenticatedUser.py +++ b/github/AuthenticatedUser.py @@ -974,10 +974,10 @@ def get_notifications( params = dict() if all is not github.GithubObject.NotSet: # convert True, False to true, false for api parameters - params["all"] = str(all).lower() if isinstance(all, bool) else all + params["all"] = "true" if all else "false" if participating is not github.GithubObject.NotSet: # convert True, False to true, false for api parameters - params["participating"] = str(participating).lower() if isinstance(participating, bool) else participating + params["participating"] = "true" if participating else "false" if since is not github.GithubObject.NotSet: params["since"] = since.strftime("%Y-%m-%dT%H:%M:%SZ") if before is not github.GithubObject.NotSet: