Skip to content

change only the files template #619

Answered by mrexox
hituzi-no-sippo asked this question in Q&A
Discussion options

You must be logged in to vote

Hey! I think in this case you can use custom files for each hook like this:

lint:
  files: git ls-files --cached # all files
  commands:
    hoo: &hoo
      run: echo {files}

pre-merge-commit:
  files: git diff --name-only --cached --diff-filter=ACMR
  commands:
    hoo: *hoo

pre-commit:
  files: git diff --name-only --cached --diff-filter=ACMR
  commands:
    hoo: *hoo

pre-push:
  files: git diff --name-only HEAD @{push}
    commands:
      hoo: *hoo

Please, write back if it helps!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hituzi-no-sippo
Comment options

Answer selected by hituzi-no-sippo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants