From c45fba464ff3442d7dfa5f65092311b4b8d73757 Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Tue, 8 Jun 2021 15:35:34 -0400 Subject: Check if the name is null I'm not sure if it's a good strategy to use GitHub usernames and username@github.com addresses for this purpose, as we really need to be able to reach someone when we process their submissions. However, for the time being at least don't output None. Signed-off-by: Konstantin Ryabitsev --- b4/pr.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/b4/pr.py b/b4/pr.py index 8da4d9b..0dc2bab 100644 --- a/b4/pr.py +++ b/b4/pr.py @@ -466,7 +466,9 @@ def get_pr_from_github(ghurl: str): resp = req.get(apiurl) if resp.status_code == 200: udata = resp.json() - uname = udata.get('name', ulogin) + uname = udata.get('name') + if not uname: + uname = ulogin uemail = udata.get('email') if not uemail: uemail = fake_email -- cgit v1.2.3