Closed staabm closed 2 years ago
The responsible line for adding files to the commit has not been updated in the last 15 months.
However, git-status
and git-add
differs as $INPUT_FILE_PATTERN
is in quotes in git-status
; but not in git-add
.
If I remember correctly, I did this on purpose to prevent globbing. 🤔
Have to do some manual testing.
I've added a test in https://github.com/stefanzweifel/git-auto-commit-action/commit/dce7e85096193516db2ae686bd562faf5bc7f4ea to cover this scenario.
To commit all files, it seems you have to add a pattern to explictly look for neon
-files in sub folders. (Not sure what the correct technical term is here)
In your example it would be *.neon **/*.neon
- name: Commit changed files
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply phpstan-baseline changes
branch: ${{ github.head_ref }}
- file_pattern: '*.neon'
+ file_pattern: '*.neon **/*.neon'
Could you give this a try?
Thx for the investigation
Should file_pattern: '**.neon'
also work then?
@staabm Yeah that seems to work too.
Triggered a test run in a test repo with file_pattern: '**.php'
:
PHP files in the root and in a nested folder have been commited: https://github.com/stefanzweifel/git-auto-commit-action-demo-app/commit/0e9ba3a0ef5397165183aad9da0a3ed87cdb1ba7
ok cool, thank you.
from my POV this issue can be closed
Version of the Action
v4
Describe the bug it seems the action does not commit all changed files (files in subfolders are left behind).
the action properly detects that the files contain changes, as can be seen in the github action log:
.. only
M phpstan-baseline.neon
is committed, but notM scripts/phpstan-baseline.neon
To Reproduce workflow step:
Expected behavior since the pattern is
*.neon
I would expect the action to commit all changed*neon
files, no matter in which directory they are containedScreenshots n/a Used Workflow
Additional context I am pretty sure this worked in the past, and it seems to have regressed in a recent release?