Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow ommiting org when using organization auth token #368

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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