* Fail (and log message) if attempting to execute git commands in a directory that is not a git-repo.
* Add Test
* Code Formatting
---------
Co-authored-by: Constantin Comendant <constantin@uberagent.com>
Co-authored-by: Stefan Zweifel <stefan@stefanzweifel.dev>
* Add _set_github_output function
* Use _set_github_output in Action
* Add _log function
* Use _log in Action and fix Test Cases
* Update wording in log messages
* Update note about removal of old output syntax
Logic is now encapuslated in a single function. I don’t mind keeping it around until spring / June 2023
* fix crlf test
* add diff check before commit
* add dirty check flag (not sure if needed)
* Update test name and add more assertions
Update test name to make it clear that the Action no longer fails to detect CRLF changes.
* Add Comment to explain why we use git-diff again
* Add test to confirm content changes are commited
* Closes#241
Co-authored-by: Stefan Zweifel <hello@stefanzweifel.io>
* GitHub has deprecated set-output and now needs to add the content to the GITHUB_OUTPUT file
* Update tests too
* Fix tests and shell-format changes
* Revert yarn.lock changes
This PR adds a test to confirm, that changes to CRLF are not properly detected and that the message "Working tree clean. Nothing to commit." is displayed.
Setting `core.autocrlf` to `true` also has no effect here.
refs #241
* Expand file_pattern input
* Expand file pattern array in git-status
* Add Failing Test
* Expand INPUT_FILE_PATTERN
* Fix Shellcheck Issues
* Add test to cover file expansion works when globbing is disabled
* Add explanation to README
This test confirms the problem mentioned in #227.
If `file_pattern` contains a pattern of, for example 2 file extensions, and only files for one extensions are dirty but not for the otherone, `git-add` will throw a fatal error.
It does not throw an error if the files for the pattern already exist but are not dirty.
This new option will allow users to skip the execution of `git fetch` if it has a negative impact in their workflows.
In a future PR I will probably remove the call to git-fetch interely. It was added in #108 in relation to a problem with slashes in branch names. That problem wasn't properly fixed though.