summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-06-08 15:35:34 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-06-08 15:35:34 -0400
commitc45fba464ff3442d7dfa5f65092311b4b8d73757 (patch)
tree0e64413ea9bd08c2f215b498c6b74474651d1f4c
parent06c5738498bb29c35b8042e6ed1b8148c00852d7 (diff)
downloadb4-c45fba464ff3442d7dfa5f65092311b4b8d73757.tar.gz
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 <konstantin@linuxfoundation.org>
-rw-r--r--b4/pr.py4
1 files changed, 3 insertions, 1 deletions
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