@@ -243,6 +243,37 @@ interface SourceMapsOptions {
243243 filesToDeleteAfterUpload ?: string | Array < string > ;
244244}
245245
246+ type AutoSetCommitsOptions = {
247+ /**
248+ * Automatically sets `commit` and `previousCommit`. Sets `commit` to `HEAD`
249+ * and `previousCommit` as described in the option's documentation.
250+ *
251+ * If you set this to `true`, manually specified `commit` and `previousCommit`
252+ * options will be overridden. It is best to not specify them at all if you
253+ * set this option to `true`.
254+ */
255+ auto : true ;
256+ repo ?: undefined ;
257+ commit ?: undefined ;
258+ } ;
259+
260+ type ManualSetCommitsOptions = {
261+ auto ?: false | undefined ;
262+ /**
263+ * The full repo name as defined in Sentry.
264+ *
265+ * Required if the `auto` option is not set to `true`.
266+ */
267+ repo : string ;
268+
269+ /**
270+ * The current (last) commit in the release.
271+ *
272+ * Required if the `auto` option is not set to `true`.
273+ */
274+ commit : string ;
275+ } ;
276+
246277interface ReleaseOptions {
247278 /**
248279 * Unique identifier for the release you want to create.
@@ -300,37 +331,7 @@ interface ReleaseOptions {
300331 /**
301332 * Configuration for associating the release with its commits in Sentry.
302333 */
303- setCommits ?: (
304- | {
305- /**
306- * Automatically sets `commit` and `previousCommit`. Sets `commit` to `HEAD`
307- * and `previousCommit` as described in the option's documentation.
308- *
309- * If you set this to `true`, manually specified `commit` and `previousCommit`
310- * options will be overridden. It is best to not specify them at all if you
311- * set this option to `true`.
312- */
313- auto : true ;
314- repo ?: undefined ;
315- commit ?: undefined ;
316- }
317- | {
318- auto ?: false | undefined ;
319- /**
320- * The full repo name as defined in Sentry.
321- *
322- * Required if the `auto` option is not set to `true`.
323- */
324- repo : string ;
325-
326- /**
327- * The current (last) commit in the release.
328- *
329- * Required if the `auto` option is not set to `true`.
330- */
331- commit : string ;
332- }
333- ) & {
334+ setCommits ?: ( AutoSetCommitsOptions | ManualSetCommitsOptions ) & {
334335 /**
335336 * The commit before the beginning of this release (in other words,
336337 * the last commit of the previous release).
0 commit comments