Skip to content

Commit

Permalink
refactor: update the auth.token missing value comment in sentry.prope…
Browse files Browse the repository at this point in the history
…rties
  • Loading branch information
byCedric committed Mar 15, 2023
1 parent 0c24e22 commit 50644d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugin/build/withSentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const withSentry = (config) => {
}
return config;
};
const missingAuthTokenMessage = `# no auth.token found, falling back to SENTRY_AUTH_TOKEN environment variable`;
const missingAuthTokenMessage = `# Configured through SENTRY_AUTH_TOKEN environment variable`;
const missingProjectMessage = `# no project found, falling back to SENTRY_PROJECT environment variable`;
const missingOrgMessage = `# no org found, falling back to SENTRY_ORG environment variable`;
function getSentryProperties(config) {
Expand Down Expand Up @@ -62,7 +62,7 @@ function buildSentryPropertiesString(sentryHookConfig) {
return `defaults.url=${url}
${organization ? `defaults.org=${organization}` : missingOrgMessage}
${project ? `defaults.project=${project}` : missingProjectMessage}
${authToken ? `auth.token=${authToken}` : missingAuthTokenMessage}
${authToken ? `# Configure this value through \`SENTRY_AUTH_TOKEN\` environment variable instead. See:https://docs.expo.dev/guides/using-sentry/#app-configuration\nauth.token=${authToken}` : missingAuthTokenMessage}
`;
}
exports.default = (0, config_plugins_1.createRunOncePlugin)(withSentry, pkg.name, pkg.version);
4 changes: 2 additions & 2 deletions plugin/src/withSentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const withSentry: ConfigPlugin = (config) => {
return config;
};

const missingAuthTokenMessage = `# no auth.token found, falling back to SENTRY_AUTH_TOKEN environment variable`;
const missingAuthTokenMessage = `# Configured through SENTRY_AUTH_TOKEN environment variable`;
const missingProjectMessage = `# no project found, falling back to SENTRY_PROJECT environment variable`;
const missingOrgMessage = `# no org found, falling back to SENTRY_ORG environment variable`;

Expand Down Expand Up @@ -87,7 +87,7 @@ function buildSentryPropertiesString(sentryHookConfig: PublishHook['config']) {
return `defaults.url=${url}
${organization ? `defaults.org=${organization}` : missingOrgMessage}
${project ? `defaults.project=${project}` : missingProjectMessage}
${authToken ? `auth.token=${authToken}` : missingAuthTokenMessage}
${authToken ? `# Configure this value through \`SENTRY_AUTH_TOKEN\` environment variable instead. See:https://docs.expo.dev/guides/using-sentry/#app-configuration\nauth.token=${authToken}` : missingAuthTokenMessage}
`;
}

Expand Down

0 comments on commit 50644d9

Please sign in to comment.