Skip to content

Commit

Permalink
When amending a commit, prepend a commit message instead of appending
Browse files Browse the repository at this point in the history
GitHub shows the first line by default, so it makes more sense.
  • Loading branch information
m417z committed Aug 13, 2023
1 parent 7cfe478 commit 49a6f2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def commit_deploy(pr_title):
if amend_last_commit:
assert last_commit_body is not None
current_time_iso = datetime.now().isoformat(timespec='seconds')
new_body = f'{last_commit_body.strip()}\n\n[{current_time_iso}] {pr_title}'
new_body = f'[{current_time_iso}] {pr_title}\n\n{last_commit_body}'
subprocess.check_call(git_cmd + ['commit', '--amend', '-m', new_body])
subprocess.check_call(git_cmd + ['push', '--force-with-lease'])

Expand Down

0 comments on commit 49a6f2e

Please sign in to comment.