* feat: add _run_hook helper and eight hook inputs
* fix(_run_hook): default snippet to empty when arg unset
* feat: wire add/commit hooks into _main
* feat: wire tag and push hooks into _main
* test: verify failing hook aborts the action
* docs: document hooks system in README
* test: tighten failing-hook assertion
* docs(hooks): note set -eu semantics for snippet authors
* refactor(hooks): rename action inputs to suffix with _hook
* refactor(hooks): include _hook suffix in event identifier
* docs(hooks): add notes about security implications of hooks
* 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
* 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 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.