From 952971655d6586b4588bfeb8595ae111160f2f0b Mon Sep 17 00:00:00 2001 From: Theo Ephraim Date: Tue, 21 Apr 2026 01:13:16 -0700 Subject: [PATCH] Fix includeIf regex case: git config outputs lowercase keys git config --get-regexp outputs all keys in lowercase, but our regex used ^includeIf (capital I, capital F) which never matched. This meant the checkout@v6 credential config files were never cleared, and their injected GITHUB_TOKEN auth header overrode our custom token URL. Co-Authored-By: Claude Opus 4.6 (1M context) --- .bumpy/fix-includeif-case.md | 5 +++++ packages/bumpy/src/commands/ci.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .bumpy/fix-includeif-case.md diff --git a/.bumpy/fix-includeif-case.md b/.bumpy/fix-includeif-case.md new file mode 100644 index 0000000..5912ba9 --- /dev/null +++ b/.bumpy/fix-includeif-case.md @@ -0,0 +1,5 @@ +--- +'@varlock/bumpy': patch +--- + +Fix git push auth failure caused by case-sensitive includeIf regex not matching lowercase keys from git config diff --git a/packages/bumpy/src/commands/ci.ts b/packages/bumpy/src/commands/ci.ts index 80339ba..b953ccd 100644 --- a/packages/bumpy/src/commands/ci.ts +++ b/packages/bumpy/src/commands/ci.ts @@ -251,7 +251,8 @@ function pushWithToken(rootDir: string, branch: string, config: BumpyConfig): vo const savedHeader = tryRunArgs(['git', 'config', '--local', extraHeaderKey], { cwd: rootDir }); // Collect includeIf entries that point to credential config files - const includeIfRaw = tryRunArgs(['git', 'config', '--local', '--get-regexp', '^includeIf\\.gitdir:'], { + // git config --get-regexp outputs keys in lowercase, so match accordingly + const includeIfRaw = tryRunArgs(['git', 'config', '--local', '--get-regexp', '^includeif\\.gitdir:'], { cwd: rootDir, }); const savedIncludeIfs: Array<{ key: string; value: string }> = [];