如何运行 recommit-hooks 取决于应用程序

问题描述 投票:0回答:0

我在项目中有几个应用程序

  • 项目:
    • 应用1
    • 应用程序2
    • app3

并且想要使用预提交挂钩,这将为特定应用程序运行测试

我的 .pre-commit-config.yaml 示例

repos:
  - repo: local
    hooks:
      - id: test
        name: test
        # here I want to run test_app1 or test_app2 depending on
        # changes in directories(or maybe pre-commit configs)
        entry: make test 
        language: system
        types: [python]
python django pre-commit-hook pre-commit pre-commit.com
© www.soinside.com 2019 - 2024. All rights reserved.