diff --git a/tools/accept_upstream.py b/tools/accept_upstream.py index bc8226df..8aacd673 100755 --- a/tools/accept_upstream.py +++ b/tools/accept_upstream.py @@ -53,7 +53,8 @@ if __name__ == '__main__': # Fetch commit information commits = http.get(f'https://api.github.com/repos/{upstream}/pulls/{pr}/commits').json() - author = json.loads(os.environ.get("override_author")) or commits[-1]['commit']['author'] + override_author = os.environ.get("override_author") + author = json.loads(override_author) if override_author else commits[-1]['commit']['author'] # Create commit message title = info["title"].replace('"', '\\"')