From 104ac00d04a007f305a118733760bf9fcbe3ce4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Tue, 13 Jan 2026 16:10:01 +0100 Subject: [PATCH 01/12] Don't error on symlinks and executables when they don't have to be touched anyway Co-authored-by: Dotan Simha --- src/git.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/git.ts b/src/git.ts index a6e2a80..1306a9b 100644 --- a/src/git.ts +++ b/src/git.ts @@ -74,6 +74,12 @@ export const commitChangesFromRepo = async ({ ) { return null; } + const prevOid = await commit?.oid(); + const currentOid = await workdir?.oid(); + // Don't include files that haven't changed, and exist in both trees + if (prevOid === currentOid && !commit === !workdir) { + return null; + } if ( (await commit?.mode()) === FILE_MODES.symlink || (await workdir?.mode()) === FILE_MODES.symlink @@ -87,12 +93,6 @@ export const commitChangesFromRepo = async ({ `Unexpected executable file at ${filepath}, GitHub API only supports non-executable files and directories. You may need to add this file to .gitignore`, ); } - const prevOid = await commit?.oid(); - const currentOid = await workdir?.oid(); - // Don't include files that haven't changed, and exist in both trees - if (prevOid === currentOid && !commit === !workdir) { - return null; - } // Iterate through anything that may be a directory in either the // current commit or the working directory if ( From 6e4f77f81d4102a548f777de453fb088a10260d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Fri, 23 Jan 2026 20:42:38 +0100 Subject: [PATCH 02/12] update isomorphic-git --- package.json | 2 +- pnpm-lock.yaml | 240 ++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 230 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 1b754fe..0bd09b6 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,6 @@ "access": "public" }, "dependencies": { - "isomorphic-git": "^1.27.1" + "isomorphic-git": "^1.36.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 647a8bc..3c27168 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: isomorphic-git: - specifier: ^1.27.1 - version: 1.27.1 + specifier: ^1.36.2 + version: 1.36.2 devDependencies: '@actions/github': specifier: ^6.0.0 @@ -1589,6 +1589,10 @@ packages: resolution: {integrity: sha512-Hdw8qdNiqdJ8LqT0iK0sVzkFbzg6fhnQqqfWhBDxcHZvU75+B+ayzTy8x+k5Ix0Y92XOhOUlx74ps+bA6BeYMQ==} engines: {node: '>=8'} + available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} + babel-jest@29.7.0: resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -1686,6 +1690,18 @@ packages: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + call-bind@1.0.8: + resolution: {integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==} + engines: {node: '>= 0.4'} + + call-bound@1.0.4: + resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} + engines: {node: '>= 0.4'} + callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -1916,6 +1932,10 @@ packages: defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + dependency-graph@0.11.0: resolution: {integrity: sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==} engines: {node: '>= 0.6.0'} @@ -1965,6 +1985,10 @@ packages: resolution: {integrity: sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==} engines: {node: '>=4'} + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -1996,6 +2020,18 @@ packages: error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} + engines: {node: '>= 0.4'} + esbuild@0.24.2: resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} engines: {node: '>=18'} @@ -2198,6 +2234,10 @@ packages: flatted@3.3.1: resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + for-each@0.3.5: + resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} + engines: {node: '>= 0.4'} + foreground-child@3.3.1: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} @@ -2229,10 +2269,18 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + get-package-type@0.1.0: resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} engines: {node: '>=8.0.0'} + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} @@ -2265,6 +2313,10 @@ packages: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -2310,6 +2362,17 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} @@ -2395,6 +2458,10 @@ packages: is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + is-core-module@2.14.0: resolution: {integrity: sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==} engines: {node: '>= 0.4'} @@ -2442,6 +2509,10 @@ packages: resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} engines: {node: '>=4'} + is-typed-array@1.1.15: + resolution: {integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==} + engines: {node: '>= 0.4'} + is-unc-path@1.0.0: resolution: {integrity: sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==} engines: {node: '>=0.10.0'} @@ -2457,12 +2528,15 @@ packages: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} + isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - isomorphic-git@1.27.1: - resolution: {integrity: sha512-X32ph5zIWfT75QAqW2l3JCIqnx9/GWd17bRRehmn3qmWc34OYbSXY6Cxv0o9bIIY+CWugoN4nQFHNA+2uYf2nA==} - engines: {node: '>=12'} + isomorphic-git@1.36.2: + resolution: {integrity: sha512-YGb9qnFOEhNnky54i4gWUvUWxFaw+4+CYj4ekemcbJfLLEWPBZw1mon5CXOz2qWEL2c60LVhy0oeuYuJBpIyPw==} + engines: {node: '>=14.17'} hasBin: true isomorphic-ws@5.0.0: @@ -2785,6 +2859,10 @@ packages: resolution: {integrity: sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==} engines: {node: '>=0.10.0'} + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -3047,6 +3125,10 @@ packages: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} + possible-typed-array-names@1.1.0: + resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} + engines: {node: '>= 0.4'} + postcss-load-config@6.0.1: resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} engines: {node: '>= 18'} @@ -3254,11 +3336,16 @@ packages: set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + setimmediate@1.0.5: resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} - sha.js@2.4.11: - resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} + sha.js@2.4.12: + resolution: {integrity: sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==} + engines: {node: '>= 0.10'} hasBin: true shebang-command@1.2.0: @@ -3456,6 +3543,10 @@ packages: tmpl@1.0.5: resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} + to-buffer@1.2.2: + resolution: {integrity: sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==} + engines: {node: '>= 0.4'} + to-fast-properties@2.0.0: resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} engines: {node: '>=4'} @@ -3569,6 +3660,10 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} + typed-array-buffer@1.0.3: + resolution: {integrity: sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==} + engines: {node: '>= 0.4'} + typescript@5.5.3: resolution: {integrity: sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==} engines: {node: '>=14.17'} @@ -3669,6 +3764,10 @@ packages: resolution: {integrity: sha512-MOiaDbA5ZZgUjkeMWM5EkJp4loW5ZRoa5bc3/aeMox/PJelMhE6t7S/mLuiY43DBupyxH+S0U1bTui9kWUlmsw==} engines: {node: '>=8.15'} + which-typed-array@1.1.20: + resolution: {integrity: sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==} + engines: {node: '>= 0.4'} + which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true @@ -5761,6 +5860,10 @@ snapshots: auto-bind@4.0.0: {} + available-typed-arrays@1.0.7: + dependencies: + possible-typed-array-names: 1.1.0 + babel-jest@29.7.0(@babel/core@7.24.8): dependencies: '@babel/core': 7.24.8 @@ -5917,6 +6020,23 @@ snapshots: cac@6.7.14: {} + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bind@1.0.8: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + get-intrinsic: 1.3.0 + set-function-length: 1.2.2 + + call-bound@1.0.4: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + callsites@3.1.0: {} camel-case@4.1.2: @@ -6153,6 +6273,12 @@ snapshots: dependencies: clone: 1.0.4 + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + dependency-graph@0.11.0: {} deprecation@2.3.1: {} @@ -6186,6 +6312,12 @@ snapshots: dset@3.1.4: {} + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + eastasianwidth@0.2.0: {} ejs@3.1.10: @@ -6213,6 +6345,14 @@ snapshots: dependencies: is-arrayish: 0.2.1 + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-object-atoms@1.1.1: + dependencies: + es-errors: 1.3.0 + esbuild@0.24.2: optionalDependencies: '@esbuild/aix-ppc64': 0.24.2 @@ -6469,6 +6609,10 @@ snapshots: flatted@3.3.1: {} + for-each@0.3.5: + dependencies: + is-callable: 1.2.7 + foreground-child@3.3.1: dependencies: cross-spawn: 7.0.6 @@ -6497,8 +6641,26 @@ snapshots: get-caller-file@2.0.5: {} + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + get-package-type@0.1.0: {} + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 + get-stream@6.0.1: {} glob-parent@5.1.2: @@ -6542,6 +6704,8 @@ snapshots: merge2: 1.4.1 slash: 3.0.0 + gopd@1.2.0: {} + graceful-fs@4.2.11: {} graphemer@1.4.0: {} @@ -6590,6 +6754,16 @@ snapshots: has-flag@4.0.0: {} + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.1 + + has-symbols@1.1.0: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.1.0 + hasown@2.0.2: dependencies: function-bind: 1.1.2 @@ -6683,6 +6857,8 @@ snapshots: is-arrayish@0.2.1: {} + is-callable@1.2.7: {} + is-core-module@2.14.0: dependencies: hasown: 2.0.2 @@ -6717,6 +6893,10 @@ snapshots: dependencies: better-path-resolve: 1.0.0 + is-typed-array@1.1.15: + dependencies: + which-typed-array: 1.1.20 + is-unc-path@1.0.0: dependencies: unc-path-regex: 0.1.2 @@ -6729,9 +6909,11 @@ snapshots: is-windows@1.0.2: {} + isarray@2.0.5: {} + isexe@2.0.0: {} - isomorphic-git@1.27.1: + isomorphic-git@1.36.2: dependencies: async-lock: 1.4.1 clean-git-ref: 2.0.1 @@ -6741,8 +6923,8 @@ snapshots: minimisted: 2.0.1 pako: 1.0.11 pify: 4.0.1 - readable-stream: 3.6.2 - sha.js: 2.4.11 + readable-stream: 4.5.2 + sha.js: 2.4.12 simple-get: 4.0.1 isomorphic-ws@5.0.0(ws@8.18.0): @@ -7254,6 +7436,8 @@ snapshots: map-cache@0.2.2: {} + math-intrinsics@1.1.0: {} + merge-stream@2.0.0: {} merge2@1.4.1: {} @@ -7510,6 +7694,8 @@ snapshots: dependencies: find-up: 4.1.0 + possible-typed-array-names@1.1.0: {} + postcss-load-config@6.0.1(jiti@1.21.6)(yaml@2.4.5): dependencies: lilconfig: 3.1.3 @@ -7704,12 +7890,22 @@ snapshots: set-blocking@2.0.0: {} + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.3.0 + gopd: 1.2.0 + has-property-descriptors: 1.0.2 + setimmediate@1.0.5: {} - sha.js@2.4.11: + sha.js@2.4.12: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 + to-buffer: 1.2.2 shebang-command@1.2.0: dependencies: @@ -7902,6 +8098,12 @@ snapshots: tmpl@1.0.5: {} + to-buffer@1.2.2: + dependencies: + isarray: 2.0.5 + safe-buffer: 5.2.1 + typed-array-buffer: 1.0.3 + to-fast-properties@2.0.0: {} to-regex-range@5.0.1: @@ -8004,6 +8206,12 @@ snapshots: type-fest@0.21.3: {} + typed-array-buffer@1.0.3: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + is-typed-array: 1.1.15 + typescript@5.5.3: {} ua-parser-js@1.0.38: {} @@ -8100,6 +8308,16 @@ snapshots: load-yaml-file: 0.2.0 path-exists: 4.0.0 + which-typed-array@1.1.20: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.4 + for-each: 0.3.5 + get-proto: 1.0.1 + gopd: 1.2.0 + has-tostringtag: 1.0.2 + which@1.3.1: dependencies: isexe: 2.0.0 From 6b35465d6be9d22d321af0b3f53ca94413ad7864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Sat, 24 Jan 2026 00:01:58 +0100 Subject: [PATCH 03/12] tests --- src/test/integration/git.test.ts | 129 ++++++++++++++++++++++++++++++- 1 file changed, 128 insertions(+), 1 deletion(-) diff --git a/src/test/integration/git.test.ts b/src/test/integration/git.test.ts index 2e46c60..2f602fe 100644 --- a/src/test/integration/git.test.ts +++ b/src/test/integration/git.test.ts @@ -85,7 +85,9 @@ const makeFileChanges = async ( | "with-executable-file" | "with-ignored-symlink" | "with-included-valid-symlink" - | "with-included-invalid-symlink", + | "with-included-invalid-symlink" + | "with-unchanged-symlink" + | "with-changed-symlink", ) => { // Update an existing file await fs.promises.writeFile( @@ -164,6 +166,37 @@ const makeFileChanges = async ( path.join(repoDirectory, "some-dir", "nested"), ); } + if ( + changegroup === "with-unchanged-symlink" || + changegroup === "with-changed-symlink" + ) { + await fs.promises.mkdir(path.join(repoDirectory, "some-dir"), { + recursive: true, + }); + await fs.promises.symlink( + path.join(repoDirectory, "README.md"), + path.join(repoDirectory, "some-dir", "nested"), + ); + await git.add({ + fs, + dir: repoDirectory, + filepath: "some-dir/nested", + }); + await git.commit({ + fs, + dir: repoDirectory, + message: "Add symlink", + author: { name: "Test", email: "test@test.com" }, + }); + + if (changegroup === "with-changed-symlink") { + await fs.promises.rm(path.join(repoDirectory, "some-dir", "nested")); + await fs.promises.symlink( + path.join(repoDirectory, "LICENSE"), + path.join(repoDirectory, "some-dir", "nested"), + ); + } + } }; const makeFileChangeAssertions = async (branch: string) => { @@ -324,6 +357,100 @@ describe("git", () => { }); } + it(`should allow unchanged symlinks without throwing`, async () => { + const branch = `${TEST_BRANCH_PREFIX}-unchanged-symlink`; + branches.push(branch); + + await fs.promises.mkdir(testDir, { recursive: true }); + const repoDirectory = path.join(testDir, `repo-unchanged-symlink`); + + await new Promise((resolve, reject) => { + const p = execFile( + "git", + ["clone", process.cwd(), `repo-unchanged-symlink`], + { cwd: testDir }, + (error) => { + if (error) { + reject(error); + } else { + resolve(); + } + }, + ); + p.stdout?.pipe(process.stdout); + p.stderr?.pipe(process.stderr); + }); + + await makeFileChanges(repoDirectory, "with-unchanged-symlink"); + + // The symlink was committed locally and is unchanged in workdir. + // The tree walk should skip it since oids match. + // GitHub push may fail because local commit doesn't exist on GitHub, + // but the key is that no symlink error is thrown. + try { + await commitChangesFromRepo({ + octokit, + ...REPO, + branch, + message: { + headline: "Test commit", + body: "This is a test commit", + }, + cwd: repoDirectory, + log, + }); + + await waitForGitHubToBeReady(); + await makeFileChangeAssertions(branch); + } catch (error) { + expect((error as Error).message).not.toContain("Unexpected symlink"); + expect((error as Error).message).not.toContain("Unexpected executable"); + } + }); + + it(`should throw error when symlink is changed`, async () => { + const branch = `${TEST_BRANCH_PREFIX}-changed-symlink`; + branches.push(branch); + + await fs.promises.mkdir(testDir, { recursive: true }); + const repoDirectory = path.join(testDir, `repo-changed-symlink`); + + await new Promise((resolve, reject) => { + const p = execFile( + "git", + ["clone", process.cwd(), `repo-changed-symlink`], + { cwd: testDir }, + (error) => { + if (error) { + reject(error); + } else { + resolve(); + } + }, + ); + p.stdout?.pipe(process.stdout); + p.stderr?.pipe(process.stderr); + }); + + await makeFileChanges(repoDirectory, "with-changed-symlink"); + + await expect(() => + commitChangesFromRepo({ + octokit, + ...REPO, + branch, + message: { + headline: "Test commit", + body: "This is a test commit", + }, + cwd: repoDirectory, + log, + }), + ).rejects.toThrow( + "Unexpected symlink at some-dir/nested, GitHub API only supports files and directories. You may need to add this file to .gitignore", + ); + }); + describe(`should throw appropriate error when symlink is present`, () => { it(`and file does not exist`, async () => { const branch = `${TEST_BRANCH_PREFIX}-invalid-symlink-error`; From af4c42d867ce0d6a4a55dcd762d6b2fca6b0a258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Sat, 24 Jan 2026 23:47:32 +0100 Subject: [PATCH 04/12] setup credentials --- package.json | 3 ++- src/test/integration/git.test.ts | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0bd09b6..7b6a33d 100644 --- a/package.json +++ b/package.json @@ -91,5 +91,6 @@ }, "dependencies": { "isomorphic-git": "^1.36.2" - } + }, + "prettier": {} } diff --git a/src/test/integration/git.test.ts b/src/test/integration/git.test.ts index 2f602fe..7e6879e 100644 --- a/src/test/integration/git.test.ts +++ b/src/test/integration/git.test.ts @@ -177,6 +177,22 @@ const makeFileChanges = async ( path.join(repoDirectory, "README.md"), path.join(repoDirectory, "some-dir", "nested"), ); + await new Promise((resolve) => { + execFile( + "git", + ["config", "user.email", "test@test.com"], + { cwd: repoDirectory }, + () => resolve(), + ); + }); + await new Promise((resolve) => { + execFile( + "git", + ["config", "user.name", "Test"], + { cwd: repoDirectory }, + () => resolve(), + ); + }); await git.add({ fs, dir: repoDirectory, From 113aa276bebf8aa7a513e76c9387cf775f98c9e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Sun, 25 Jan 2026 11:25:39 +0100 Subject: [PATCH 05/12] update HEAD --- src/test/integration/git.test.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/test/integration/git.test.ts b/src/test/integration/git.test.ts index 7e6879e..d17a4c9 100644 --- a/src/test/integration/git.test.ts +++ b/src/test/integration/git.test.ts @@ -198,12 +198,21 @@ const makeFileChanges = async ( dir: repoDirectory, filepath: "some-dir/nested", }); - await git.commit({ + const newCommit = await git.commit({ fs, dir: repoDirectory, message: "Add symlink", author: { name: "Test", email: "test@test.com" }, }); + // In detached HEAD state, isomorphic-git doesn't update HEAD after commit. + // Use writeRef to update HEAD to point to the new commit. + await git.writeRef({ + fs, + dir: repoDirectory, + ref: "HEAD", + value: newCommit, + force: true, + }); if (changegroup === "with-changed-symlink") { await fs.promises.rm(path.join(repoDirectory, "some-dir", "nested")); From 0737341a08641bc367926d05817ba6b402346299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Sun, 25 Jan 2026 11:52:46 +0100 Subject: [PATCH 06/12] use `setConfig` --- src/test/integration/git.test.ts | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/src/test/integration/git.test.ts b/src/test/integration/git.test.ts index d17a4c9..5f86216 100644 --- a/src/test/integration/git.test.ts +++ b/src/test/integration/git.test.ts @@ -177,21 +177,17 @@ const makeFileChanges = async ( path.join(repoDirectory, "README.md"), path.join(repoDirectory, "some-dir", "nested"), ); - await new Promise((resolve) => { - execFile( - "git", - ["config", "user.email", "test@test.com"], - { cwd: repoDirectory }, - () => resolve(), - ); + await git.setConfig({ + fs, + dir: repoDirectory, + path: "user.email", + value: "test@test.com", }); - await new Promise((resolve) => { - execFile( - "git", - ["config", "user.name", "Test"], - { cwd: repoDirectory }, - () => resolve(), - ); + await git.setConfig({ + fs, + dir: repoDirectory, + path: "user.name", + value: "Test", }); await git.add({ fs, @@ -205,7 +201,7 @@ const makeFileChanges = async ( author: { name: "Test", email: "test@test.com" }, }); // In detached HEAD state, isomorphic-git doesn't update HEAD after commit. - // Use writeRef to update HEAD to point to the new commit. + // Use writeRef to update HEAD to point to the new commit (until https://github.com/changesets/ghcommit/pull/46 is merged) await git.writeRef({ fs, dir: repoDirectory, From 294bf35e4c23443abf0d43abee20b6562d466643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Sun, 25 Jan 2026 11:58:39 +0100 Subject: [PATCH 07/12] remove try/catch --- src/test/integration/git.test.ts | 35 ++++++++++++-------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/src/test/integration/git.test.ts b/src/test/integration/git.test.ts index 5f86216..044455c 100644 --- a/src/test/integration/git.test.ts +++ b/src/test/integration/git.test.ts @@ -404,29 +404,20 @@ describe("git", () => { await makeFileChanges(repoDirectory, "with-unchanged-symlink"); - // The symlink was committed locally and is unchanged in workdir. - // The tree walk should skip it since oids match. - // GitHub push may fail because local commit doesn't exist on GitHub, - // but the key is that no symlink error is thrown. - try { - await commitChangesFromRepo({ - octokit, - ...REPO, - branch, - message: { - headline: "Test commit", - body: "This is a test commit", - }, - cwd: repoDirectory, - log, - }); + await commitChangesFromRepo({ + octokit, + ...REPO, + branch, + message: { + headline: "Test commit", + body: "This is a test commit", + }, + cwd: repoDirectory, + log, + }); - await waitForGitHubToBeReady(); - await makeFileChangeAssertions(branch); - } catch (error) { - expect((error as Error).message).not.toContain("Unexpected symlink"); - expect((error as Error).message).not.toContain("Unexpected executable"); - } + await waitForGitHubToBeReady(); + await makeFileChangeAssertions(branch); }); it(`should throw error when symlink is changed`, async () => { From 432488d45c2b386866fc6125b5acb8aa1f7b1417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Sun, 25 Jan 2026 20:16:44 +0100 Subject: [PATCH 08/12] push after commit --- src/test/integration/git.test.ts | 50 +++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 10 deletions(-) diff --git a/src/test/integration/git.test.ts b/src/test/integration/git.test.ts index 044455c..b4c7806 100644 --- a/src/test/integration/git.test.ts +++ b/src/test/integration/git.test.ts @@ -88,6 +88,7 @@ const makeFileChanges = async ( | "with-included-invalid-symlink" | "with-unchanged-symlink" | "with-changed-symlink", + branch: string, ) => { // Update an existing file await fs.promises.writeFile( @@ -210,6 +211,25 @@ const makeFileChanges = async ( force: true, }); + // Push the commit with symlink to GitHub so the API can use it as base. + // Using native git since isomorphic-git push requires explicit auth setup. + await new Promise((resolve, reject) => { + const p = execFile( + "git", + ["push", "origin", `HEAD:refs/heads/${branch}`], + { cwd: repoDirectory }, + (error) => { + if (error) { + reject(error); + } else { + resolve(); + } + }, + ); + p.stdout?.pipe(process.stdout); + p.stderr?.pipe(process.stderr); + }); + if (changegroup === "with-changed-symlink") { await fs.promises.rm(path.join(repoDirectory, "some-dir", "nested")); await fs.promises.symlink( @@ -344,7 +364,7 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, group); + await makeFileChanges(repoDirectory, group, branch); // Push the changes await commitChangesFromRepo({ @@ -402,7 +422,9 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, "with-unchanged-symlink"); + await makeFileChanges(repoDirectory, "with-unchanged-symlink", branch); + + await waitForGitHubToBeReady(); await commitChangesFromRepo({ octokit, @@ -444,7 +466,7 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, "with-changed-symlink"); + await makeFileChanges(repoDirectory, "with-changed-symlink", branch); await expect(() => commitChangesFromRepo({ @@ -489,7 +511,11 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, "with-included-invalid-symlink"); + await makeFileChanges( + repoDirectory, + "with-included-invalid-symlink", + branch, + ); // Push the changes await expect(() => @@ -534,7 +560,11 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, "with-included-valid-symlink"); + await makeFileChanges( + repoDirectory, + "with-included-valid-symlink", + branch, + ); // Push the changes await expect(() => @@ -580,7 +610,7 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, "with-executable-file"); + await makeFileChanges(repoDirectory, "with-executable-file", branch); // Push the changes await expect(() => @@ -625,7 +655,7 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - makeFileChanges(repoDirectory, "standard"); + makeFileChanges(repoDirectory, "standard", branch); // Determine the previous commit hash const gitLog = await git.log({ @@ -692,7 +722,7 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, "standard"); + await makeFileChanges(repoDirectory, "standard", branch); // Push the changes await commitChangesFromRepo({ @@ -760,7 +790,7 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, "standard"); + await makeFileChanges(repoDirectory, "standard", branch); // Push the changes await commitChangesFromRepo({ @@ -825,7 +855,7 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, "standard"); + await makeFileChanges(repoDirectory, "standard", branch); // Push the changes await commitChangesFromRepo({ From ded81ce6164e046a9f98959937b6f531edfeb8d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Mon, 26 Jan 2026 01:02:32 +0100 Subject: [PATCH 09/12] try different remote --- src/test/integration/git.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/integration/git.test.ts b/src/test/integration/git.test.ts index b4c7806..55e680a 100644 --- a/src/test/integration/git.test.ts +++ b/src/test/integration/git.test.ts @@ -213,10 +213,13 @@ const makeFileChanges = async ( // Push the commit with symlink to GitHub so the API can use it as base. // Using native git since isomorphic-git push requires explicit auth setup. + // Note: origin points to the local clone source (process.cwd()), not GitHub, + // so we push directly to GitHub using the token. + const githubUrl = `https://x-access-token:${ENV.GITHUB_TOKEN}@github.com/${REPO.owner}/${REPO.repo}.git`; await new Promise((resolve, reject) => { const p = execFile( "git", - ["push", "origin", `HEAD:refs/heads/${branch}`], + ["push", githubUrl, `HEAD:refs/heads/${branch}`], { cwd: repoDirectory }, (error) => { if (error) { From 8d7f0d37e0bf2a49651d756594a3eb9f6dc7d4f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Mon, 26 Jan 2026 01:10:42 +0100 Subject: [PATCH 10/12] tweak test helper --- src/test/integration/git.test.ts | 49 ++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/src/test/integration/git.test.ts b/src/test/integration/git.test.ts index 55e680a..1aa6e8e 100644 --- a/src/test/integration/git.test.ts +++ b/src/test/integration/git.test.ts @@ -78,8 +78,7 @@ const expectParentHasOid = async ({ expect(commit.parents.nodes).toEqual([{ oid }]); }; -const makeFileChanges = async ( - repoDirectory: string, +async function makeFileChanges( changegroup: | "standard" | "with-executable-file" @@ -88,8 +87,9 @@ const makeFileChanges = async ( | "with-included-invalid-symlink" | "with-unchanged-symlink" | "with-changed-symlink", - branch: string, -) => { + { dir, branch }: { dir: string; branch: string }, +): Promise { + const repoDirectory = dir; // Update an existing file await fs.promises.writeFile( path.join(repoDirectory, "LICENSE"), @@ -241,7 +241,7 @@ const makeFileChanges = async ( ); } } -}; +} const makeFileChangeAssertions = async (branch: string) => { // Expect the deleted files to not exist @@ -367,7 +367,7 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, group, branch); + await makeFileChanges(group, { dir: repoDirectory, branch }); // Push the changes await commitChangesFromRepo({ @@ -425,7 +425,10 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, "with-unchanged-symlink", branch); + await makeFileChanges("with-unchanged-symlink", { + dir: repoDirectory, + branch, + }); await waitForGitHubToBeReady(); @@ -469,7 +472,10 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, "with-changed-symlink", branch); + await makeFileChanges("with-changed-symlink", { + dir: repoDirectory, + branch, + }); await expect(() => commitChangesFromRepo({ @@ -514,11 +520,10 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges( - repoDirectory, - "with-included-invalid-symlink", + await makeFileChanges("with-included-invalid-symlink", { + dir: repoDirectory, branch, - ); + }); // Push the changes await expect(() => @@ -563,11 +568,10 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges( - repoDirectory, - "with-included-valid-symlink", + await makeFileChanges("with-included-valid-symlink", { + dir: repoDirectory, branch, - ); + }); // Push the changes await expect(() => @@ -613,7 +617,10 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, "with-executable-file", branch); + await makeFileChanges("with-executable-file", { + dir: repoDirectory, + branch, + }); // Push the changes await expect(() => @@ -658,7 +665,7 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - makeFileChanges(repoDirectory, "standard", branch); + makeFileChanges("standard", { dir: repoDirectory, branch }); // Determine the previous commit hash const gitLog = await git.log({ @@ -725,7 +732,7 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, "standard", branch); + await makeFileChanges("standard", { dir: repoDirectory, branch }); // Push the changes await commitChangesFromRepo({ @@ -793,7 +800,7 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, "standard", branch); + await makeFileChanges("standard", { dir: repoDirectory, branch }); // Push the changes await commitChangesFromRepo({ @@ -858,7 +865,7 @@ describe("git", () => { p.stderr?.pipe(process.stderr); }); - await makeFileChanges(repoDirectory, "standard", branch); + await makeFileChanges("standard", { dir: repoDirectory, branch }); // Push the changes await commitChangesFromRepo({ From e5df86c21cc1b5e8a4e7ab169d05a6d1fe82518f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Mon, 26 Jan 2026 01:11:50 +0100 Subject: [PATCH 11/12] remove isomorphic-git's workaround --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- src/test/integration/git.test.ts | 11 +---------- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 7b6a33d..b4ca871 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "access": "public" }, "dependencies": { - "isomorphic-git": "^1.36.2" + "isomorphic-git": "^1.36.3" }, "prettier": {} } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3c27168..142fa8d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: isomorphic-git: - specifier: ^1.36.2 - version: 1.36.2 + specifier: ^1.36.3 + version: 1.36.3 devDependencies: '@actions/github': specifier: ^6.0.0 @@ -2534,8 +2534,8 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - isomorphic-git@1.36.2: - resolution: {integrity: sha512-YGb9qnFOEhNnky54i4gWUvUWxFaw+4+CYj4ekemcbJfLLEWPBZw1mon5CXOz2qWEL2c60LVhy0oeuYuJBpIyPw==} + isomorphic-git@1.36.3: + resolution: {integrity: sha512-bHF1nQTjL0IfSo13BHDO8oQ6SvYNQduTAdPJdSmrJ5JwZY2fsyjLujEXav5hqPCegSCAnc75ZsBUHqT/NqR7QA==} engines: {node: '>=14.17'} hasBin: true @@ -6913,7 +6913,7 @@ snapshots: isexe@2.0.0: {} - isomorphic-git@1.36.2: + isomorphic-git@1.36.3: dependencies: async-lock: 1.4.1 clean-git-ref: 2.0.1 diff --git a/src/test/integration/git.test.ts b/src/test/integration/git.test.ts index 1aa6e8e..2a88a24 100644 --- a/src/test/integration/git.test.ts +++ b/src/test/integration/git.test.ts @@ -195,21 +195,12 @@ async function makeFileChanges( dir: repoDirectory, filepath: "some-dir/nested", }); - const newCommit = await git.commit({ + await git.commit({ fs, dir: repoDirectory, message: "Add symlink", author: { name: "Test", email: "test@test.com" }, }); - // In detached HEAD state, isomorphic-git doesn't update HEAD after commit. - // Use writeRef to update HEAD to point to the new commit (until https://github.com/changesets/ghcommit/pull/46 is merged) - await git.writeRef({ - fs, - dir: repoDirectory, - ref: "HEAD", - value: newCommit, - force: true, - }); // Push the commit with symlink to GitHub so the API can use it as base. // Using native git since isomorphic-git push requires explicit auth setup. From bec782294ec898749743d8f9c0fd546e8a1bec0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Burzy=C5=84ski?= Date: Mon, 26 Jan 2026 08:36:01 +0100 Subject: [PATCH 12/12] changeset --- .changeset/twelve-icons-approve.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/twelve-icons-approve.md diff --git a/.changeset/twelve-icons-approve.md b/.changeset/twelve-icons-approve.md new file mode 100644 index 0000000..41fd1f1 --- /dev/null +++ b/.changeset/twelve-icons-approve.md @@ -0,0 +1,5 @@ +--- +"@changesets/ghcommit": patch +--- + +Don't error on already committed symlinks and executables that stay untouched