stefanzweifel / git-auto-commit-action

Automatically commit and push changed files back to GitHub with this GitHub Action for the 80% use case.
MIT License
1.98k stars 227 forks source link

support for `git commit -m "x" --allow-empty` #165

Closed pablodz closed 3 years ago

pablodz commented 3 years ago

Currently it fails when --allow-empty is added on

          commit_options: "--no-verify --signoff --alow-empty" #https://git-scm.com/docs/git-commit  

with an error of:

tarted: bash /home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/entrypoint.sh
INPUT_REPOSITORY value: .
INPUT_STATUS_OPTIONS: 
INPUT_BRANCH value: 
Your branch is up to date with 'origin/main'.
INPUT_ADD_OPTIONS: -u
INPUT_FILE_PATTERN: docs/*
INPUT_COMMIT_OPTIONS: --no-verify --signoff --alow-empty
INPUT_COMMIT_USER_NAME: GitHub Actions
INPUT_COMMIT_USER_EMAIL: actions@github.com
INPUT_COMMIT_MESSAGE: PDOC-Automatic documentation
INPUT_COMMIT_AUTHOR: user <user@users.noreply.github.com>
error: unknown option `alow-empty'
usage: git commit [<options>] [--] <pathspec>...

    -q, --quiet           suppress summary after successful commit
    -v, --verbose         show diff in commit message template
... continues

Check here https://github.com/pablodz/pipewire_python/runs/2879798164 with more detail

stefanzweifel commented 3 years ago

You have a typo in your workflow file. The option is called --allow-empty and not --alow-empty.

-commit_options: "--no-verify --signoff --alow-empty"
+commit_options: "--no-verify --signoff --allow-empty"
pablodz commented 3 years ago

Really sorry for that, thanks @stefanzweifel 👍