[O] Use commits[-1] as author instead of [0]

This commit is contained in:
Azalea Gui 2023-05-09 10:48:38 -04:00
parent 953a09b686
commit 01f65d91b5
No known key found for this signature in database
GPG key ID: 788D7588559AF1D9

View file

@ -52,7 +52,7 @@ if __name__ == '__main__':
# Fetch commit information # Fetch commit information
commits = http.get(f'https://api.github.com/repos/{upstream}/pulls/{pr}/commits').json() commits = http.get(f'https://api.github.com/repos/{upstream}/pulls/{pr}/commits').json()
author = commits[0]['commit']['author'] author = commits[-1]['commit']['author']
# Create commit message # Create commit message
title = info["title"].replace('"', '\\"') title = info["title"].replace('"', '\\"')