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-edit appears in commit_options; do not specify -m .. if it does;
- Add an explicit
with: amend: true config, which adds --amend --no-edit to options and doesn't specify -m ..
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-editfrom working:git-auto-commit-action/entrypoint.sh
Lines 86 to 88 in 5dd17c3
since the
--no-editis effectively ignored if a--messageis specified.I'm not sure what to suggest as a fix, but two options I can think of are:
--no-editappears incommit_options; do not specify-m ..if it does;with: amend: trueconfig, which adds--amend --no-editto options and doesn't specify-m ..