-
-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
globbing syntax is limited #51
Comments
Thanks for writing such a detailed issue! I'm grateful when users write such detailed descriptions of their problems.
The syntax used is whatever It seems, this might be a documentation issue on our side for this Action. However, in #13, when the feature was added, I could successfully test the Action with the |
@stefanzweifel The trivial example does work. Is git being run in a bash instance? Is it making an API call to git, or is it executing a command in some shell environment? Thanks for the pointers to the pathspec; that does help. Do you know the escaping rules? Is the escaping only for workflows, so the engine doesn't choke on the arguments, or is it for the environment git is running in? EditOn the command line, git accepts multiple path specs:
Any idea why this doesn't work in the argument?
generates a "no file found" error. |
I honestly don't know how to answer that question correctly. All I can tell is that the
I don't know the escaping rules, sorry. |
I had the same issue when adding multiple files. Replacing line https://github.com/stefanzweifel/git-auto-commit-action/blob/master/entrypoint.sh#L48
by
solves the issue. Should I made a PR @stefanzweifel ? |
@cristianpb That would be great. |
In my case |
@vikyd What exactly do you wanna achieve? To add all changed markdown files use |
@vikyd you can also just do something custom, like: - name: Auto commit
run: |
git config --global user.name 'Github Bot'
git config --global user.email '[email protected]'
git add *.md
git commit -m "⬆ Commit markdown files"
git push origin HEAD:master |
Version of the Action
v4.1.0
Describe the bug
Maybe this only requires a bit more documentation. However, it's not clear which syntax file_pattern uses, and under what conditions. Is it a bash glob? Or some other language? Why are the asterixes escaped? The bash syntax
\{\*\*/PKGBUILD,\*\*/.SRCINFO\}
does not work (escaped out so Workflows doesn't complain about the syntax), and neither does\*\*/PKGBUILD \*\*/.SRCINFO
or any combination of syntax I've tried. Wrapping the glob in quotes, various permutations of escaping; I've tried several things.Curiously, I can see globbing working, except it fails somehow when actually doing the git commit. In many cases, I get errors like:
so the log message is actually getting a proper glob list, but it fails in the actual message.
It'd be great to get some documentation about what is legal glob syntax, and maybe another example of non-trivial globbing. In my case, I'm looking for the result of the bash glob pattern:
To Reproduce
Make a project in github called
globtest
Expected behavior
All changed files to be committed.
I didn't try any of that blob of steps above, so YMMV. But you get the idea.
The text was updated successfully, but these errors were encountered: