Skip to content

using chartpress with pre-commit #38

Closed
@rokroskar

Description

@rokroskar

I've started using chartpress --reset with the pre-commit package and it works very nicely to prevent accidental commits of modified chart values. It would be great to have the .pre-commit.hooks.yaml definition as a part of chartpress so one could simply include it like any other pre-commit hook. The user of chartpress would then have a .pre-commit.config.yaml in their repo's base directory with something like:

repos:
-   repo: https://github.com/jupyterhub/chartpress
    rev: master
    hooks:
    - id: chartpress

If then you try to commit a change to the chartpress-managed values you get something like:

git commit -am 'commiting something'
black................................................(no files to check)Skipped
Flake8...............................................(no files to check)Skipped
chartpress reset.........................................................Failed
hookid: chartpress

If you want to include something like this I'll happily contribute a PR.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions