Skip to content

Commit

Permalink
Improve pre-commit.run-hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
OttoAndrey committed Nov 21, 2023
1 parent fd0b8fa commit 219ff91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ We follow [Semantic Versions](https://semver.org/).

## unreleased

- Improve `pre-commit.run-hooks` command with `params`

## 0.9.1

- Fix celery configuration
Expand Down
4 changes: 2 additions & 2 deletions saritasa_invocations/pre_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ def install(context: invoke.Context) -> None:


@invoke.task
def run_hooks(context: invoke.Context) -> None:
def run_hooks(context: invoke.Context, params: str = "") -> None:
"""Run all hooks against all files."""
printing.print_success("Running git hooks")
context.run("pre-commit run --hook-stage push --all-files")
context.run(f"pre-commit run --hook-stage push --all-files {params}")


@invoke.task
Expand Down

0 comments on commit 219ff91

Please sign in to comment.