[F] Fix override author

This commit is contained in:
Azalea Gui 2023-07-15 13:18:43 -04:00
parent 0aa0a76151
commit 407fcd4987

View file

@ -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('"', '\\"')