[Dev] Add lefthook command to update packages on checkout/merge (#6820)

* [Dev] Add lefthook command to update packages on checkout/merge

* Modify post-checkout to only run on branch checkout

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>

---------

Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
This commit is contained in:
NightKev 2025-12-03 20:02:31 -06:00 committed by GitHub
parent 8ae79450d4
commit af2bad96f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,3 +19,12 @@ post-merge:
commands:
update-submodules:
run: pnpm update-submodules
update-packages:
run: pnpm i
post-checkout:
commands:
update-packages:
# cf https://git-scm.com/docs/githooks#_post_checkout:
# The 3rd argument is 1 for branch checkouts and 0 for file checkouts.
run: if test {3} -eq "1"; then pnpm i; fi