From 407fcd498775228a333f532a9ed9c34bc85869be Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Sat, 15 Jul 2023 13:18:43 -0400 Subject: [PATCH] [F] Fix override author --- tools/accept_upstream.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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('"', '\\"')