mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2026-07-27 20:29:08 +02:00
Add hooks to run shell snippets around git operations (#411)
* 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
This commit is contained in:
+32
@@ -84,6 +84,38 @@ inputs:
|
||||
description: Perform a clean git tag and push, without commiting anything
|
||||
required: false
|
||||
default: false
|
||||
before_add_hook:
|
||||
description: Shell snippet to run before `git add`.
|
||||
required: false
|
||||
default: ''
|
||||
after_add_hook:
|
||||
description: Shell snippet to run after `git add`.
|
||||
required: false
|
||||
default: ''
|
||||
before_commit_hook:
|
||||
description: Shell snippet to run before `git commit`.
|
||||
required: false
|
||||
default: ''
|
||||
after_commit_hook:
|
||||
description: Shell snippet to run after `git commit`.
|
||||
required: false
|
||||
default: ''
|
||||
before_tag_hook:
|
||||
description: Shell snippet to run before `git tag` is created.
|
||||
required: false
|
||||
default: ''
|
||||
after_tag_hook:
|
||||
description: Shell snippet to run after `git tag` is created.
|
||||
required: false
|
||||
default: ''
|
||||
before_push_hook:
|
||||
description: Shell snippet to run before `git push`.
|
||||
required: false
|
||||
default: ''
|
||||
after_push_hook:
|
||||
description: Shell snippet to run after `git push`.
|
||||
required: false
|
||||
default: ''
|
||||
disable_pull_request_target_trigger_warning:
|
||||
description: Suppress the security warning emitted when the action runs on a `pull_request_target` event.
|
||||
required: false
|
||||
|
||||
Reference in New Issue
Block a user