Skip to content

Add containerized pre-commit hook#191

Merged
Nepo26 merged 4 commits intonorwoodj:masterfrom
Labelbox:add-docker-to-pre-commit-hooks
Oct 21, 2023
Merged

Add containerized pre-commit hook#191
Nepo26 merged 4 commits intonorwoodj:masterfrom
Labelbox:add-docker-to-pre-commit-hooks

Conversation

@lhriley
Copy link
Copy Markdown
Contributor

@lhriley lhriley commented Aug 15, 2023

Simple PR that adds support for using the pre-build Docker container image rather than requiring users to install the binary or build the golang package from source.

Tested locally and works with this .pre-commit-config.yaml:

---
repos:
  - repo: https://github.com/Labelbox/helm-docs
    rev:  65f1d83 # add-docker-to-pre-commit-hooks
    hooks:
      - id: helm-docs-container
        args:
          # Make the tool search for charts only under the `charts` directory
          - --chart-search-root=charts

Related:
pre-commit/pre-commit#2968

@Nepo26
Copy link
Copy Markdown
Collaborator

Nepo26 commented Aug 29, 2023

Hm seems nice. Will look into it by the end of the next week.

@Nepo26 Nepo26 self-requested a review September 10, 2023 03:34
@Nepo26 Nepo26 self-assigned this Sep 10, 2023
@Nepo26 Nepo26 added this to the General Cleanup milestone Sep 10, 2023
@Nepo26 Nepo26 added the enhancement New feature or request label Sep 10, 2023
@Nepo26
Copy link
Copy Markdown
Collaborator

Nepo26 commented Sep 10, 2023

If possible also add to the README the description of how to define the use of the container and how it should be ran.

@lhriley
Copy link
Copy Markdown
Contributor Author

lhriley commented Oct 16, 2023

@Nepo26 I pushed up changes to the README as requested. There were some whitespace issues that were cleaned up by my editor that makes the diff a bit messy.

@Nepo26
Copy link
Copy Markdown
Collaborator

Nepo26 commented Oct 21, 2023

Just tested here and didn't see any problem.

Thanks @lhriley - looks great :)

@Nepo26 Nepo26 closed this Oct 21, 2023
@Nepo26 Nepo26 reopened this Oct 21, 2023
@Nepo26 Nepo26 merged commit eadcfd7 into norwoodj:master Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants