Skip to content

Commit

Permalink
Merge pull request #46 from saritasa-nest/feature/improve-pre-commit-…
Browse files Browse the repository at this point in the history
…run-hooks

Improve `pre-commit.run-hooks`
  • Loading branch information
OttoAndrey authored Nov 22, 2023
2 parents fd0b8fa + 219ff91 commit c317440
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 c317440

Please sign in to comment.