Skip to content

Add native support for pre-commit hook #140

@mszostok

Description

@mszostok

Description

The native support for pre-commit hook was requested by external users.

To integrate with https://pre-commit.com/ the .pre-commit-hooks.yaml file needs to be added to the root for repository.

Example:

- id: codeowners-validator-docker
  name: Validate CODEOWNERS file
  description: Ensures the correctness of your CODEOWNERS file.
  language: docker_image
  # TODO: types: hardcode expected file location?
  entry:  ghcr.io/mszostok/codeowners-validator:stable
- id: codeowners-validator
  name: Validate CODEOWNERS file
  description: Ensures the correctness of your CODEOWNERS file.
  language: golang
  # TODO: types: hardcode expected file location?
  entry: codeowners-validator

To support the input parameters, the codeowners-validator CLI should accept flags or config file.

Reasons

Support https://pre-commit.com/ out of the box to simplify external user workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions