1
1
import { Logger } from "./sentry/logger" ;
2
- import { Options as UserOptions } from "./types" ;
2
+ import { Options as UserOptions , SetCommitsOptions } from "./types" ;
3
3
import { determineReleaseName } from "./utils" ;
4
4
5
5
export type NormalizedOptions = ReturnType < typeof normalizeUserOptions > ;
@@ -26,7 +26,10 @@ export function normalizeUserOptions(userOptions: UserOptions) {
26
26
create : userOptions . release ?. create ?? true ,
27
27
finalize : userOptions . release ?. finalize ?? true ,
28
28
vcsRemote : userOptions . release ?. vcsRemote ?? process . env [ "SENTRY_VSC_REMOTE" ] ?? "origin" ,
29
- setCommits : userOptions . release ?. setCommits ,
29
+ setCommits : userOptions . release ?. setCommits as
30
+ | ( SetCommitsOptions & { shouldNotThrowOnFailure ?: boolean } )
31
+ | false
32
+ | undefined ,
30
33
} ,
31
34
bundleSizeOptimizations : userOptions . bundleSizeOptimizations ,
32
35
reactComponentAnnotation : userOptions . reactComponentAnnotation ,
@@ -48,7 +51,6 @@ export function normalizeUserOptions(userOptions: UserOptions) {
48
51
process . env [ "VERCEL_GIT_REPO_OWNER" ]
49
52
) {
50
53
options . release . setCommits = {
51
- // @ts -expect-error This is fine
52
54
shouldNotThrowOnFailure : true ,
53
55
commit : process . env [ "VERCEL_GIT_COMMIT_SHA" ] ,
54
56
previousCommit : process . env [ "VERCEL_GIT_PREVIOUS_SHA" ] ,
@@ -59,7 +61,6 @@ export function normalizeUserOptions(userOptions: UserOptions) {
59
61
} else {
60
62
options . release . setCommits = {
61
63
shouldNotThrowOnFailure : true ,
62
- // @ts -expect-error This is fine
63
64
auto : true ,
64
65
ignoreEmpty : true ,
65
66
ignoreMissing : true ,
0 commit comments