Skip to content

Commit 4373afb

Browse files
committed
fix: handle ValidationError fallback in setCommitsDefault, fix checkout@v6
- Catch ValidationError in setCommitsDefault to fall back to local git when auto-discovery fails (no local remote or no matching Sentry repo) - Fix actions/checkout@v7 → v6 (v7 doesn't exist yet)
1 parent ecec222 commit 4373afb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/sentry-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
# matching both the npm package version and Sentry release version.
2828
VERSION: ${{ github.event.release.tag_name || inputs.version }}
2929
steps:
30-
- uses: actions/checkout@v7
30+
- uses: actions/checkout@v6
3131
with:
3232
fetch-depth: 0
3333

src/commands/release/set-commits.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ async function setCommitsDefault(
142142
);
143143
return setCommitsFromLocal(org, version, cwd, depth);
144144
}
145+
if (error instanceof ValidationError) {
146+
log.warn(
147+
`Auto-discovery failed: ${error.message}. ` +
148+
"Falling back to local git history."
149+
);
150+
return setCommitsFromLocal(org, version, cwd, depth);
151+
}
145152
throw error;
146153
}
147154
}

0 commit comments

Comments
 (0)