From af2bad96f19baca856665f4b0d0d7f8660f05ba0 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Wed, 3 Dec 2025 20:02:31 -0600 Subject: [PATCH] [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> --- lefthook.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lefthook.yml b/lefthook.yml index 9b4be96056f..e66d56f6562 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -18,4 +18,13 @@ pre-commit: post-merge: commands: update-submodules: - run: pnpm update-submodules \ No newline at end of file + 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