diff --git a/src/api/errors/api_error.rs b/src/api/errors/api_error.rs index c32b9df51b..12ab158ee7 100644 --- a/src/api/errors/api_error.rs +++ b/src/api/errors/api_error.rs @@ -24,7 +24,7 @@ pub(in crate::api) enum ApiErrorKind { OrganizationNotFound, #[error("resource not found")] ResourceNotFound, - #[error("Project not found. Please check that you entered the project and organization slugs correctly.")] + #[error("Project not found. Please check that you entered the project and organization IDs or slugs correctly.")] ProjectNotFound, #[error("release not found")] ReleaseNotFound, diff --git a/src/config.rs b/src/config.rs index ad08308b9e..da56ae6de3 100644 --- a/src/config.rs +++ b/src/config.rs @@ -339,7 +339,7 @@ impl Config { .get_from(Some("defaults"), "org") .map(str::to_owned) .ok_or_else(|| { - format_err!("An organization slug is required (provide with --org)") + format_err!("An organization ID or slug is required (provide with --org)") }), (None, Some(cli_org)) => Ok(cli_org), (Some(token_org), None) => Ok(token_org.to_string()), @@ -407,7 +407,7 @@ impl Config { .get_from(Some("defaults"), "project") .map(str::to_owned) }) - .ok_or_else(|| format_err!("A project slug is required (provide with --project)")) + .ok_or_else(|| format_err!("A project ID or slug is required (provide with --project)")) } /// Return the default pipeline env. diff --git a/src/utils/args.rs b/src/utils/args.rs index d017437e5f..a35899fad8 100644 --- a/src/utils/args.rs +++ b/src/utils/args.rs @@ -4,7 +4,10 @@ use clap::{Arg, ArgAction, Command}; fn validate_org(v: &str) -> Result { if v.contains('/') || v == "." || v == ".." || v.contains(' ') { - Err("Invalid value for organization. Use the URL slug and not the name!".to_string()) + Err( + "Invalid value for organization. Use the URL slug or the ID and not the name!" + .to_string(), + ) } else { Ok(v.to_owned()) } @@ -19,7 +22,7 @@ pub fn validate_project(v: &str) -> Result { || v.contains('\t') || v.contains('\r') { - Err("Invalid value for project. Use the URL slug and not the name!".to_string()) + Err("Invalid value for project. Use the URL slug or the ID and not the name!".to_string()) } else { Ok(v.to_owned()) } @@ -90,7 +93,7 @@ impl<'a: 'b, 'b> ArgExt for Command { .short('o') .value_parser(validate_org) .global(true) - .help("The organization slug"), + .help("The organization ID or slug."), ) } @@ -107,7 +110,7 @@ impl<'a: 'b, 'b> ArgExt for Command { } else { ArgAction::Set }) - .help("The project slug."), + .help("The project ID or slug."), ) } diff --git a/tests/integration/_cases/debug_files/debug_files-bundle-jvm-help.trycmd b/tests/integration/_cases/debug_files/debug_files-bundle-jvm-help.trycmd index f2fd106357..2962493ad7 100644 --- a/tests/integration/_cases/debug_files/debug_files-bundle-jvm-help.trycmd +++ b/tests/integration/_cases/debug_files/debug_files-bundle-jvm-help.trycmd @@ -9,10 +9,10 @@ Arguments: The directory containing source files to bundle. Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. --output The path to the output folder. --debug-id Debug ID (UUID) to use for the source bundle. diff --git a/tests/integration/_cases/debug_files/debug_files-upload-help.trycmd b/tests/integration/_cases/debug_files/debug_files-upload-help.trycmd index c59aa7a39b..b7f7fe405e 100644 --- a/tests/integration/_cases/debug_files/debug_files-upload-help.trycmd +++ b/tests/integration/_cases/debug_files/debug_files-upload-help.trycmd @@ -9,10 +9,10 @@ Arguments: [PATH]... A path to search recursively for symbol files. Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. -t, --type Only consider debug information files of the given type. By default, all types are considered. [possible values: bcsymbolmap, diff --git a/tests/integration/_cases/deploys/deploys-help.trycmd b/tests/integration/_cases/deploys/deploys-help.trycmd index 1940845ff7..cc77ac306f 100644 --- a/tests/integration/_cases/deploys/deploys-help.trycmd +++ b/tests/integration/_cases/deploys/deploys-help.trycmd @@ -11,10 +11,10 @@ Commands: help Print this message or the help of the given subcommand(s) Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. -r, --release The release slug. --log-level Set the log output verbosity. [possible values: trace, debug, info, diff --git a/tests/integration/_cases/deploys/deploys-no-subcommand.trycmd b/tests/integration/_cases/deploys/deploys-no-subcommand.trycmd index 0f49ae80f7..9f4c08e90d 100644 --- a/tests/integration/_cases/deploys/deploys-no-subcommand.trycmd +++ b/tests/integration/_cases/deploys/deploys-no-subcommand.trycmd @@ -11,10 +11,10 @@ Commands: help Print this message or the help of the given subcommand(s) Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. -r, --release The release slug. --log-level Set the log output verbosity. [possible values: trace, debug, info, diff --git a/tests/integration/_cases/events/events-help.trycmd b/tests/integration/_cases/events/events-help.trycmd index 94b65b182f..738b9a1820 100644 --- a/tests/integration/_cases/events/events-help.trycmd +++ b/tests/integration/_cases/events/events-help.trycmd @@ -10,10 +10,10 @@ Commands: help Print this message or the help of the given subcommand(s) Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. --log-level Set the log output verbosity. [possible values: trace, debug, info, warn, error] diff --git a/tests/integration/_cases/events/events-list-help.trycmd b/tests/integration/_cases/events/events-list-help.trycmd index bd953bf8a6..27f15ebf91 100644 --- a/tests/integration/_cases/events/events-list-help.trycmd +++ b/tests/integration/_cases/events/events-list-help.trycmd @@ -6,11 +6,11 @@ List all events in your organization. Usage: sentry-cli[EXE] events list [OPTIONS] Options: - -o, --org The organization slug + -o, --org The organization ID or slug. -U, --show-user Display the Users column. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. -T, --show-tags Display the Tags column. --auth-token Use the given Sentry auth token. --max-rows Maximum number of rows to print. diff --git a/tests/integration/_cases/events/events-no-subcommand.trycmd b/tests/integration/_cases/events/events-no-subcommand.trycmd index 05b40a9404..4554a27e3e 100644 --- a/tests/integration/_cases/events/events-no-subcommand.trycmd +++ b/tests/integration/_cases/events/events-no-subcommand.trycmd @@ -10,10 +10,10 @@ Commands: help Print this message or the help of the given subcommand(s) Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. --log-level Set the log output verbosity. [possible values: trace, debug, info, warn, error] diff --git a/tests/integration/_cases/issues/issues-help.trycmd b/tests/integration/_cases/issues/issues-help.trycmd index 6fa1e23016..49276100d4 100644 --- a/tests/integration/_cases/issues/issues-help.trycmd +++ b/tests/integration/_cases/issues/issues-help.trycmd @@ -14,10 +14,10 @@ Commands: help Print this message or the help of the given subcommand(s) Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. -s, --status Select all issues matching a given status. [possible values: resolved, muted, unresolved] diff --git a/tests/integration/_cases/issues/issues-list-help.trycmd b/tests/integration/_cases/issues/issues-list-help.trycmd index 3603d7e036..fa8a11285b 100644 --- a/tests/integration/_cases/issues/issues-list-help.trycmd +++ b/tests/integration/_cases/issues/issues-list-help.trycmd @@ -7,10 +7,10 @@ Usage: sentry-cli[EXE] issues list [OPTIONS] Options: --max-rows Maximum number of rows to print. - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --pages Maximum number of pages to fetch (100 issues/page). [default: 5] --auth-token Use the given Sentry auth token. --query Query to pass at the request. An example is "is:unresolved" diff --git a/tests/integration/_cases/monitors/monitors-list-help.trycmd b/tests/integration/_cases/monitors/monitors-list-help.trycmd index 5f7b022f87..4af5dd25c9 100644 --- a/tests/integration/_cases/monitors/monitors-list-help.trycmd +++ b/tests/integration/_cases/monitors/monitors-list-help.trycmd @@ -6,7 +6,7 @@ List all monitors for an organization. Usage: sentry-cli[EXE] monitors list [OPTIONS] Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. --auth-token Use the given Sentry auth token. diff --git a/tests/integration/_cases/projects/projects-help.trycmd b/tests/integration/_cases/projects/projects-help.trycmd index 2f7fc56791..04b276c31c 100644 --- a/tests/integration/_cases/projects/projects-help.trycmd +++ b/tests/integration/_cases/projects/projects-help.trycmd @@ -10,7 +10,7 @@ Commands: help Print this message or the help of the given subcommand(s) Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. --auth-token Use the given Sentry auth token. diff --git a/tests/integration/_cases/projects/projects-list-help.trycmd b/tests/integration/_cases/projects/projects-list-help.trycmd index 0f267f7308..98780258da 100644 --- a/tests/integration/_cases/projects/projects-list-help.trycmd +++ b/tests/integration/_cases/projects/projects-list-help.trycmd @@ -6,7 +6,7 @@ List all projects for an organization. Usage: sentry-cli[EXE] projects list [OPTIONS] Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. --auth-token Use the given Sentry auth token. diff --git a/tests/integration/_cases/projects/projects-no-subcommand.trycmd b/tests/integration/_cases/projects/projects-no-subcommand.trycmd index 8fdf879c46..f7d043caf0 100644 --- a/tests/integration/_cases/projects/projects-no-subcommand.trycmd +++ b/tests/integration/_cases/projects/projects-no-subcommand.trycmd @@ -10,7 +10,7 @@ Commands: help Print this message or the help of the given subcommand(s) Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. --auth-token Use the given Sentry auth token. diff --git a/tests/integration/_cases/releases/releases-help.trycmd b/tests/integration/_cases/releases/releases-help.trycmd index 67b6a80666..54b7f05a35 100644 --- a/tests/integration/_cases/releases/releases-help.trycmd +++ b/tests/integration/_cases/releases/releases-help.trycmd @@ -18,10 +18,10 @@ Commands: help Print this message or the help of the given subcommand(s) Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. --log-level Set the log output verbosity. [possible values: trace, debug, info, warn, error] diff --git a/tests/integration/_cases/releases/releases-new-help.trycmd b/tests/integration/_cases/releases/releases-new-help.trycmd index e4354da012..9ba1627d83 100644 --- a/tests/integration/_cases/releases/releases-new-help.trycmd +++ b/tests/integration/_cases/releases/releases-new-help.trycmd @@ -9,12 +9,12 @@ Arguments: The version of the release Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --url Optional URL to the release for information purposes. --finalize Immediately finalize the release. (sets it to released) --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. --log-level Set the log output verbosity. [possible values: trace, debug, info, warn, error] diff --git a/tests/integration/_cases/releases/releases-no-subcommand.trycmd b/tests/integration/_cases/releases/releases-no-subcommand.trycmd index 014757c651..08b701c0ad 100644 --- a/tests/integration/_cases/releases/releases-no-subcommand.trycmd +++ b/tests/integration/_cases/releases/releases-no-subcommand.trycmd @@ -18,10 +18,10 @@ Commands: help Print this message or the help of the given subcommand(s) Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. --log-level Set the log output verbosity. [possible values: trace, debug, info, warn, error] diff --git a/tests/integration/_cases/sourcemaps/sourcemaps-explain-help.trycmd b/tests/integration/_cases/sourcemaps/sourcemaps-explain-help.trycmd index 41eb0d7b34..8e5e18bd04 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-explain-help.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-explain-help.trycmd @@ -11,12 +11,12 @@ Arguments: Options: --frame Position of the frame that should be used for source map resolution. [default: 0] - -o, --org The organization slug + -o, --org The organization ID or slug. -f, --force Force full validation flow, even when event is already source mapped. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. -r, --release The release slug. --log-level Set the log output verbosity. [possible values: trace, debug, info, diff --git a/tests/integration/_cases/sourcemaps/sourcemaps-help.trycmd b/tests/integration/_cases/sourcemaps/sourcemaps-help.trycmd index e7f253b362..c8df51b64a 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-help.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-help.trycmd @@ -13,10 +13,10 @@ Commands: help Print this message or the help of the given subcommand(s) Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. -r, --release The release slug. --log-level Set the log output verbosity. [possible values: trace, debug, info, diff --git a/tests/integration/_cases/sourcemaps/sourcemaps-inject-help.trycmd b/tests/integration/_cases/sourcemaps/sourcemaps-inject-help.trycmd index 548b2249f2..72dbe59672 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-inject-help.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-inject-help.trycmd @@ -18,7 +18,7 @@ Options: Ignores all files and folders matching the given glob -o, --org - The organization slug + The organization ID or slug. --header Custom headers that should be attached to all requests @@ -28,7 +28,7 @@ Options: Ignore all files and folders specified in the given ignore file, e.g. .gitignore. -p, --project - The project slug. + The project ID or slug. --auth-token Use the given Sentry auth token. diff --git a/tests/integration/_cases/sourcemaps/sourcemaps-no-subcommand.trycmd b/tests/integration/_cases/sourcemaps/sourcemaps-no-subcommand.trycmd index 5564393c3c..b80d85b353 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-no-subcommand.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-no-subcommand.trycmd @@ -13,10 +13,10 @@ Commands: help Print this message or the help of the given subcommand(s) Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. -r, --release The release slug. --log-level Set the log output verbosity. [possible values: trace, debug, info, diff --git a/tests/integration/_cases/sourcemaps/sourcemaps-resolve-help.trycmd b/tests/integration/_cases/sourcemaps/sourcemaps-resolve-help.trycmd index 39d45f29c3..ce5a1efe63 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-resolve-help.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-resolve-help.trycmd @@ -10,11 +10,11 @@ Arguments: Options: -l, --line Line number for minified source. - -o, --org The organization slug + -o, --org The organization ID or slug. -c, --column Column number for minified source. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. -r, --release The release slug. --log-level Set the log output verbosity. [possible values: trace, debug, info, diff --git a/tests/integration/_cases/sourcemaps/sourcemaps-upload-help.trycmd b/tests/integration/_cases/sourcemaps/sourcemaps-upload-help.trycmd index 71fea36867..a6734bc447 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-upload-help.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-upload-help.trycmd @@ -10,12 +10,12 @@ Arguments: Options: -o, --org - The organization slug + The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. -p, --project - The project slug. + The project ID or slug. -u, --url-prefix The URL prefix to prepend to all filenames. --auth-token diff --git a/tests/integration/_cases/upload_dif/upload_dif-help.trycmd b/tests/integration/_cases/upload_dif/upload_dif-help.trycmd index 3324794351..2775f2ae28 100644 --- a/tests/integration/_cases/upload_dif/upload_dif-help.trycmd +++ b/tests/integration/_cases/upload_dif/upload_dif-help.trycmd @@ -9,10 +9,10 @@ Arguments: [PATH]... A path to search recursively for symbol files. Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. -t, --type Only consider debug information files of the given type. By default, all types are considered. [possible values: bcsymbolmap, diff --git a/tests/integration/_cases/upload_dsym/upload_dsym-help.trycmd b/tests/integration/_cases/upload_dsym/upload_dsym-help.trycmd index ce7698b177..fc07d840c5 100644 --- a/tests/integration/_cases/upload_dsym/upload_dsym-help.trycmd +++ b/tests/integration/_cases/upload_dsym/upload_dsym-help.trycmd @@ -9,10 +9,10 @@ Arguments: [PATH]... A path to search recursively for symbol files. Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. -t, --type Only consider debug information files of the given type. By default, all types are considered. [possible values: bcsymbolmap, diff --git a/tests/integration/_cases/upload_proguard/upload_proguard-help.trycmd b/tests/integration/_cases/upload_proguard/upload_proguard-help.trycmd index a7c2e90eba..5d51561b66 100644 --- a/tests/integration/_cases/upload_proguard/upload_proguard-help.trycmd +++ b/tests/integration/_cases/upload_proguard/upload_proguard-help.trycmd @@ -9,10 +9,10 @@ Arguments: [PATH]... The path to the mapping files. Options: - -o, --org The organization slug + -o, --org The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project slug. + -p, --project The project ID or slug. --auth-token Use the given Sentry auth token. --version Optionally associate the mapping files with a human readable version.