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
2.03k stars 229 forks source link

commit_options doesn't work with multiple arguments #74

Closed Caellian closed 4 years ago

Caellian commented 4 years ago

Version of the Action v4.1.2

Describe the bug commit_options option treats space separated arguments as one.

To Reproduce Use commit_options with multiple arguments like described in README. I tried both --no-verify --signoff and '--no-verify --signoff' although there should be no difference. I also tried passing a sequence:

commit_options:
  - '--no-verify'
  - '--no-verify'

but that didn't work either.

Expected behaviour Arguments to be passed individually instead of being treated as one. Either the example is wrong and a yaml list should be passed.

Used Workflow

name: clang-format
env:
  CI_BUILD: true

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  format:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          submodules: true
      - name: Install clang-format
        run: |
          sudo apt-get update -m
          sudo apt-get install clang-format-9
      - name: Run clang-format
        run: clang-format-9 -i $(find -iregex "./src/.*\.[hc]pp" -or -iregex "./include/.*\.[hc]pp" -or -iregex "./test/.*\.[hc]pp" -or -iregex "./fuzz_test/.*\.[hc]pp")
      - name: Install cmake-format
        run: |
          sudo apt-get install python3
          sudo pip install --upgrade pip
          sudo pip install cmake-format
      - name: Run cmake-format
        run: cmake-format -i -c ".cmake-format.yaml" $(find -iregex "./.*\.cmake" -or -name "CMakeLists.txt")
      - uses: stefanzweifel/git-auto-commit-action@v4.1.2
        with:
          commit_message: Applied automatic formatting
          branch: ${{ github.head_ref }}
          commit_options: --no-verify --signoff
          commit_user_name: Formatting Bot

Also, here's the failed action for convenience.

stefanzweifel commented 4 years ago

Hi,

This problem has been fixed in #64 and release in v4.1.5. Please update to v4.1.5 or even better the latest version (v4.1.6).

Also see our changelog.