From 23adf06cb03868d744f370d89744b988795be623 Mon Sep 17 00:00:00 2001 From: Matiss Janis Aboltins Date: Fri, 20 Mar 2026 22:59:05 +0000 Subject: [PATCH] Add post-merge hook to auto-install dependencies (#7248) * [AI] Add post-merge hook to auto-install when yarn.lock changes Mirrors the existing post-checkout hook behavior: after a git pull or merge, if yarn.lock changed between ORIG_HEAD and HEAD, automatically runs yarn install to keep dependencies in sync. https://claude.ai/code/session_01JHoMhGANLTc1q67s1dUHrt * Add release notes for PR #7248 --------- Co-authored-by: Claude Co-authored-by: github-actions[bot] --- .husky/post-merge | 7 +++++++ upcoming-release-notes/7248.md | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100755 .husky/post-merge create mode 100644 upcoming-release-notes/7248.md diff --git a/.husky/post-merge b/.husky/post-merge new file mode 100755 index 0000000000..0d850d89fc --- /dev/null +++ b/.husky/post-merge @@ -0,0 +1,7 @@ +#!/bin/sh +# Run yarn install after pulling/merging (if yarn.lock changed) + +if git diff --name-only ORIG_HEAD HEAD | grep -q "^yarn.lock$"; then + echo "yarn.lock changed — running yarn install..." + yarn install +fi diff --git a/upcoming-release-notes/7248.md b/upcoming-release-notes/7248.md new file mode 100644 index 0000000000..294bb2952b --- /dev/null +++ b/upcoming-release-notes/7248.md @@ -0,0 +1,6 @@ +--- +category: Maintenance +authors: [MatissJanis] +--- + +Add post-merge hook to automatically install dependencies when yarn.lock changes after merges.