From 44720043ea02bc0b20862ebb2f15c46aa2f52ec4 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Wed, 11 Mar 2026 18:18:30 +0000 Subject: [PATCH 1/4] CI: Set up Node.js 24 in rebuild workflow --- .github/workflows/rebuild.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index 095c0726f2..a2248588f5 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -29,6 +29,12 @@ jobs: fetch-depth: 0 ref: ${{ env.HEAD_REF }} + - name: Set up Node.js + uses: actions/setup-node@v6 + with: + node-version: 24 + cache: 'npm' + - name: Remove label if: github.event_name == 'pull_request' env: From 6fb1c2a3004725c45e921c71220a7c32e4cf618c Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Wed, 11 Mar 2026 18:23:04 +0000 Subject: [PATCH 2/4] Fix merge in progress detection --- .github/workflows/rebuild.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index a2248588f5..116cab82b4 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -55,8 +55,12 @@ jobs: git fetch origin "$BASE_BRANCH" # Allow merge conflicts in `lib`, since rebuilding should resolve them. - git merge "origin/$BASE_BRANCH" || echo "Merge conflicts detected, continuing." - MERGE_RESULT=$? + if git merge "origin/$BASE_BRANCH"; then + MERGE_RESULT=0 + else + MERGE_RESULT=$? + echo "Merge conflicts detected, continuing." + fi if [ "$MERGE_RESULT" -ne 0 ]; then echo "merge-in-progress=true" >> $GITHUB_OUTPUT From 5f3f250f837f5ea4139247a18a69fe4049012fde Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Wed, 11 Mar 2026 18:24:00 +0000 Subject: [PATCH 3/4] Fix finishing up in progress merge --- .github/workflows/rebuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index 116cab82b4..c604c8aab3 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -114,7 +114,7 @@ jobs: # Otherwise, just commit the changes. if git rev-parse --verify MERGE_HEAD >/dev/null 2>&1; then echo "In progress merge detected, finishing it up." - git merge --continue --no-edit + git commit --no-edit else echo "No in-progress merge detected, committing changes." git commit -m "Rebuild" From 567ca73ff8a049da10768b63cac275c984d2e9fe Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Wed, 11 Mar 2026 18:40:22 +0000 Subject: [PATCH 4/4] Address review comments --- .github/workflows/rebuild.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml index c604c8aab3..f4c2230e91 100644 --- a/.github/workflows/rebuild.yml +++ b/.github/workflows/rebuild.yml @@ -34,6 +34,9 @@ jobs: with: node-version: 24 cache: 'npm' + cache-dependency-path: | + package-lock.json + pr-checks/package-lock.json - name: Remove label if: github.event_name == 'pull_request' @@ -55,11 +58,16 @@ jobs: git fetch origin "$BASE_BRANCH" # Allow merge conflicts in `lib`, since rebuilding should resolve them. - if git merge "origin/$BASE_BRANCH"; then - MERGE_RESULT=0 + git merge "origin/$BASE_BRANCH" + MERGE_RESULT=$? + + if [ "$MERGE_RESULT" -eq 0 ]; then + echo "Merge succeeded cleanly." + elif [ "$MERGE_RESULT" -eq 1 ]; then + echo "Merge conflicts detected (exit code $MERGE_RESULT), continuing." else - MERGE_RESULT=$? - echo "Merge conflicts detected, continuing." + echo "git merge failed with unexpected exit code $MERGE_RESULT." + exit 1 fi if [ "$MERGE_RESULT" -ne 0 ]; then