Skip to content

Commit fb69aab

Browse files
author
Luca Forstner
authored
feat: Allow ommiting org when using organization auth token (#368)
1 parent cee09b7 commit fb69aab

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/bundler-plugin-core/src/debug-id-upload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ interface DebugIdUploadPluginOptions {
2727
sentryCliOptions: {
2828
url: string;
2929
authToken: string;
30-
org: string;
30+
org?: string;
3131
project: string;
3232
vcsRemote: string;
3333
silent: boolean;

packages/bundler-plugin-core/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ export function sentryUnpluginFactory({
205205
logger.warn(
206206
"No auth token provided. Will not create release. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/"
207207
);
208-
} else if (!options.org) {
208+
} else if (!options.org && !options.authToken.startsWith("sntrys_")) {
209209
logger.warn(
210210
"No organization slug provided. Will not create release. Please set the `org` option to your Sentry organization slug."
211211
);
@@ -247,7 +247,7 @@ export function sentryUnpluginFactory({
247247
logger.warn(
248248
"No auth token provided. Will not upload source maps. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/"
249249
);
250-
} else if (!options.org) {
250+
} else if (!options.org && !options.authToken.startsWith("sntrys_")) {
251251
logger.warn(
252252
"No org provided. Will not upload source maps. Please set the `org` option to your Sentry organization slug."
253253
);

packages/bundler-plugin-core/src/plugins/release-management.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ interface ReleaseManagementPluginOptions {
2121
sentryCliOptions: {
2222
url: string;
2323
authToken: string;
24-
org: string;
24+
org?: string;
2525
project: string;
2626
vcsRemote: string;
2727
silent: boolean;

0 commit comments

Comments
 (0)