Cannot `--amend --no-edit`
I'm rendering markdown in an Action on a cron, and want it to just amend the last commit rather than create a continuous stream of 'render' commits that don't have any value.
Unfortunately though (I've tested this), this prevents --amend --no-edit from working:
| commit -m "$INPUT_COMMIT_MESSAGE" \ | |
| --author="$INPUT_COMMIT_AUTHOR" \ | |
| ${INPUT_COMMIT_OPTIONS:+"${INPUT_COMMIT_OPTIONS_ARRAY[@]}"}; |
since the --no-edit is effectively ignored if a --message is specified.
I'm not sure what to suggest as a fix, but two options I can think of are:
- Check if
--no-editappears incommit_options; do not specify-m ..if it does; - Add an explicit
with: amend: trueconfig, which adds--amend --no-editto options and doesn't specify-m ..