From 92494545186255f9dd99d2ab911984e21df04da4 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Thu, 8 Feb 2018 12:16:14 -0800 Subject: [PATCH] update-authors-json: Fix handling deleted GitHub accounts. Apparently, we've now had the first time one of our contributors had their account deleted (at least, the author page for the contributor who has 21 commits in python-zulip-api now 404s). --- tools/update-authors-json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/update-authors-json b/tools/update-authors-json index c6f329eded..4752ea33e3 100755 --- a/tools/update-authors-json +++ b/tools/update-authors-json @@ -85,6 +85,9 @@ def run_production() -> None: if contribs: repos_done.append(name) for contrib in contribs: + if contrib.get('author') is None: + # This happens for users who've deleted their GitHub account. + continue username = contrib.get('author').get('login') contrib_data = { 'avatar': contrib.get('author').get('avatar_url'),