-
|
I setup my pre-commit hook to run 2 tasks in order:
Every time I want to commit changes that impact the translation files, it does this:
So I end up with changes that are not committed from the Was I wrong to assume that Now that I write this down, I wonder if the issue is that the translation files are not initially in the staged files (because intact before the pre-commit hook is triggered). This would make sense. Any way to force those to be included if changed? I can use a glob to filter them pre-commit:
parallel: false
jobs:
- name: check
run: bunx biome check --fix --files-ignore-unknown=true --colors=off --no-errors-on-unmatched --diagnostic-level=error {staged_files}
skip:
- merge
- rebase
stage_fixed: true
- name: lingui
run: bun lingui:extract
skip:
- merge
- rebase
stage_fixed: true |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hey! If pre-commit:
parallel: false
jobs:
- name: lingui
run: bun lingui:extract && git add * # the right glob here |
Beta Was this translation helpful? Give feedback.
Hey! If
lingui:extractgenerates new files the will not appear in the staged files list. You can manually add them: