Skip to content

Commit

Permalink
feat: Allow ommiting org when using organization auth token (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
lforst authored Aug 8, 2023
1 parent cee09b7 commit fb69aab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/bundler-plugin-core/src/debug-id-upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface DebugIdUploadPluginOptions {
sentryCliOptions: {
url: string;
authToken: string;
org: string;
org?: string;
project: string;
vcsRemote: string;
silent: boolean;
Expand Down
4 changes: 2 additions & 2 deletions packages/bundler-plugin-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export function sentryUnpluginFactory({
logger.warn(
"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/"
);
} else if (!options.org) {
} else if (!options.org && !options.authToken.startsWith("sntrys_")) {
logger.warn(
"No organization slug provided. Will not create release. Please set the `org` option to your Sentry organization slug."
);
Expand Down Expand Up @@ -247,7 +247,7 @@ export function sentryUnpluginFactory({
logger.warn(
"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/"
);
} else if (!options.org) {
} else if (!options.org && !options.authToken.startsWith("sntrys_")) {
logger.warn(
"No org provided. Will not upload source maps. Please set the `org` option to your Sentry organization slug."
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface ReleaseManagementPluginOptions {
sentryCliOptions: {
url: string;
authToken: string;
org: string;
org?: string;
project: string;
vcsRemote: string;
silent: boolean;
Expand Down

0 comments on commit fb69aab

Please sign in to comment.