From e4fca9e7773392b38be7e1a1c8cbc391886708e4 Mon Sep 17 00:00:00 2001 From: Raj Joshi Date: Tue, 16 Jul 2024 15:40:20 -0700 Subject: [PATCH 1/5] updated help strings to reflect id support --- src/api/errors/api_error.rs | 2 +- src/config.rs | 4 ++-- src/utils/args.rs | 4 ++-- .../_cases/debug_files/debug_files-bundle-jvm-help.trycmd | 4 ++-- .../_cases/debug_files/debug_files-upload-help.trycmd | 4 ++-- tests/integration/_cases/deploys/deploys-help.trycmd | 4 ++-- tests/integration/_cases/deploys/deploys-no-subcommand.trycmd | 4 ++-- tests/integration/_cases/events/events-help.trycmd | 4 ++-- tests/integration/_cases/events/events-list-help.trycmd | 4 ++-- tests/integration/_cases/events/events-no-subcommand.trycmd | 4 ++-- tests/integration/_cases/issues/issues-help.trycmd | 4 ++-- tests/integration/_cases/issues/issues-list-help.trycmd | 4 ++-- tests/integration/_cases/monitors/monitors-list-help.trycmd | 2 +- tests/integration/_cases/projects/projects-help.trycmd | 2 +- tests/integration/_cases/projects/projects-list-help.trycmd | 2 +- .../integration/_cases/projects/projects-no-subcommand.trycmd | 2 +- tests/integration/_cases/releases/releases-help.trycmd | 4 ++-- tests/integration/_cases/releases/releases-new-help.trycmd | 4 ++-- .../integration/_cases/releases/releases-no-subcommand.trycmd | 4 ++-- .../_cases/sourcemaps/sourcemaps-explain-help.trycmd | 4 ++-- tests/integration/_cases/sourcemaps/sourcemaps-help.trycmd | 4 ++-- .../_cases/sourcemaps/sourcemaps-inject-help.trycmd | 4 ++-- .../_cases/sourcemaps/sourcemaps-no-subcommand.trycmd | 4 ++-- .../_cases/sourcemaps/sourcemaps-resolve-help.trycmd | 4 ++-- .../_cases/sourcemaps/sourcemaps-upload-help.trycmd | 4 ++-- tests/integration/_cases/upload_dif/upload_dif-help.trycmd | 4 ++-- tests/integration/_cases/upload_dsym/upload_dsym-help.trycmd | 4 ++-- .../_cases/upload_proguard/upload_proguard-help.trycmd | 4 ++-- 28 files changed, 51 insertions(+), 51 deletions(-) diff --git a/src/api/errors/api_error.rs b/src/api/errors/api_error.rs index c32b9df51b..7a62fe38cf 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..e0a77fa052 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..04e8835037 100644 --- a/src/utils/args.rs +++ b/src/utils/args.rs @@ -90,7 +90,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 +107,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..ded445cfd2 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..978a901fca 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..ede3e0fd11 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..f29affdeb6 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..4f1ae34233 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..2762b1d803 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..153812aa1d 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..aad3bb54b4 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..bc7bb92a46 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..1904d26c1f 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..713b31492f 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..52d29b4cfb 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..ee5c1a3c08 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..ebc7e93032 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..f8e8581d5b 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..655a8d3cb3 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..0540dbabc6 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..ea7e871c8e 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..07bdbeeab0 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..728aa9cfaf 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..90dcbbe761 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..53b48986a9 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..9eeacc6a73 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..83a8d6fdfb 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..21703fa44b 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. From f4eb8b866cd969b2ad2a8a599b26a0e25c0b2f9f Mon Sep 17 00:00:00 2001 From: Raj Joshi Date: Tue, 16 Jul 2024 15:40:53 -0700 Subject: [PATCH 2/5] remove extra period --- .../_cases/debug_files/debug_files-bundle-jvm-help.trycmd | 2 +- .../_cases/debug_files/debug_files-upload-help.trycmd | 2 +- tests/integration/_cases/deploys/deploys-help.trycmd | 2 +- tests/integration/_cases/deploys/deploys-no-subcommand.trycmd | 2 +- tests/integration/_cases/events/events-help.trycmd | 2 +- tests/integration/_cases/events/events-list-help.trycmd | 2 +- tests/integration/_cases/events/events-no-subcommand.trycmd | 2 +- tests/integration/_cases/issues/issues-help.trycmd | 2 +- tests/integration/_cases/issues/issues-list-help.trycmd | 2 +- tests/integration/_cases/releases/releases-help.trycmd | 2 +- tests/integration/_cases/releases/releases-new-help.trycmd | 2 +- tests/integration/_cases/releases/releases-no-subcommand.trycmd | 2 +- .../_cases/sourcemaps/sourcemaps-explain-help.trycmd | 2 +- tests/integration/_cases/sourcemaps/sourcemaps-help.trycmd | 2 +- .../integration/_cases/sourcemaps/sourcemaps-inject-help.trycmd | 2 +- .../_cases/sourcemaps/sourcemaps-no-subcommand.trycmd | 2 +- .../_cases/sourcemaps/sourcemaps-resolve-help.trycmd | 2 +- .../integration/_cases/sourcemaps/sourcemaps-upload-help.trycmd | 2 +- tests/integration/_cases/upload_dif/upload_dif-help.trycmd | 2 +- tests/integration/_cases/upload_dsym/upload_dsym-help.trycmd | 2 +- .../_cases/upload_proguard/upload_proguard-help.trycmd | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) 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 ded445cfd2..f15e79f20c 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 @@ -12,7 +12,7 @@ Options: -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 id or 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 978a901fca..3532d18bb4 100644 --- a/tests/integration/_cases/debug_files/debug_files-upload-help.trycmd +++ b/tests/integration/_cases/debug_files/debug_files-upload-help.trycmd @@ -12,7 +12,7 @@ Options: -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 id or 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 ede3e0fd11..aafcad7ba7 100644 --- a/tests/integration/_cases/deploys/deploys-help.trycmd +++ b/tests/integration/_cases/deploys/deploys-help.trycmd @@ -14,7 +14,7 @@ Options: -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 id or 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 f29affdeb6..3ac990ff2a 100644 --- a/tests/integration/_cases/deploys/deploys-no-subcommand.trycmd +++ b/tests/integration/_cases/deploys/deploys-no-subcommand.trycmd @@ -14,7 +14,7 @@ Options: -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 id or 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 4f1ae34233..bf679e2e5e 100644 --- a/tests/integration/_cases/events/events-help.trycmd +++ b/tests/integration/_cases/events/events-help.trycmd @@ -13,7 +13,7 @@ Options: -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 id or 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 2762b1d803..1ca69eeef1 100644 --- a/tests/integration/_cases/events/events-list-help.trycmd +++ b/tests/integration/_cases/events/events-list-help.trycmd @@ -10,7 +10,7 @@ Options: -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 id or 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 153812aa1d..1e204af641 100644 --- a/tests/integration/_cases/events/events-no-subcommand.trycmd +++ b/tests/integration/_cases/events/events-no-subcommand.trycmd @@ -13,7 +13,7 @@ Options: -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 id or 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 aad3bb54b4..d1494ec929 100644 --- a/tests/integration/_cases/issues/issues-help.trycmd +++ b/tests/integration/_cases/issues/issues-help.trycmd @@ -17,7 +17,7 @@ Options: -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 id or 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 bc7bb92a46..ca1eca02af 100644 --- a/tests/integration/_cases/issues/issues-list-help.trycmd +++ b/tests/integration/_cases/issues/issues-list-help.trycmd @@ -10,7 +10,7 @@ Options: -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 id or 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/releases/releases-help.trycmd b/tests/integration/_cases/releases/releases-help.trycmd index ebc7e93032..3eb50ee964 100644 --- a/tests/integration/_cases/releases/releases-help.trycmd +++ b/tests/integration/_cases/releases/releases-help.trycmd @@ -21,7 +21,7 @@ Options: -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 id or 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 f8e8581d5b..5e858a715d 100644 --- a/tests/integration/_cases/releases/releases-new-help.trycmd +++ b/tests/integration/_cases/releases/releases-new-help.trycmd @@ -14,7 +14,7 @@ Options: --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 id or 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 655a8d3cb3..ca2d129fdf 100644 --- a/tests/integration/_cases/releases/releases-no-subcommand.trycmd +++ b/tests/integration/_cases/releases/releases-no-subcommand.trycmd @@ -21,7 +21,7 @@ Options: -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 id or 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 0540dbabc6..0279c0ff83 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-explain-help.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-explain-help.trycmd @@ -16,7 +16,7 @@ Options: mapped. --header Custom headers that should be attached to all requests in key:value format. - -p, --project The project id or 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 ea7e871c8e..5d9f1a1337 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-help.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-help.trycmd @@ -16,7 +16,7 @@ Options: -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 id or 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 07bdbeeab0..e688ce2ffb 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-inject-help.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-inject-help.trycmd @@ -28,7 +28,7 @@ Options: Ignore all files and folders specified in the given ignore file, e.g. .gitignore. -p, --project - The project id or 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 728aa9cfaf..38f0b76cb9 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-no-subcommand.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-no-subcommand.trycmd @@ -16,7 +16,7 @@ Options: -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 id or 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 90dcbbe761..790a8e63a5 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-resolve-help.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-resolve-help.trycmd @@ -14,7 +14,7 @@ Options: -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 id or 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 53b48986a9..41e1d59e91 100644 --- a/tests/integration/_cases/sourcemaps/sourcemaps-upload-help.trycmd +++ b/tests/integration/_cases/sourcemaps/sourcemaps-upload-help.trycmd @@ -15,7 +15,7 @@ Options: Custom headers that should be attached to all requests in key:value format. -p, --project - The project id or 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 9eeacc6a73..2a3531b013 100644 --- a/tests/integration/_cases/upload_dif/upload_dif-help.trycmd +++ b/tests/integration/_cases/upload_dif/upload_dif-help.trycmd @@ -12,7 +12,7 @@ Options: -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 id or 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 83a8d6fdfb..d8c23b2105 100644 --- a/tests/integration/_cases/upload_dsym/upload_dsym-help.trycmd +++ b/tests/integration/_cases/upload_dsym/upload_dsym-help.trycmd @@ -12,7 +12,7 @@ Options: -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 id or 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 21703fa44b..0cfa4c1806 100644 --- a/tests/integration/_cases/upload_proguard/upload_proguard-help.trycmd +++ b/tests/integration/_cases/upload_proguard/upload_proguard-help.trycmd @@ -12,7 +12,7 @@ Options: -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 id or 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. From fb18b2390048789212cb4cb69a9b67600331ec53 Mon Sep 17 00:00:00 2001 From: Raj Joshi Date: Wed, 17 Jul 2024 07:16:41 -0700 Subject: [PATCH 3/5] id to ID --- src/api/errors/api_error.rs | 2 +- src/config.rs | 2 +- src/utils/args.rs | 8 ++++---- .../_cases/debug_files/debug_files-bundle-jvm-help.trycmd | 4 ++-- .../_cases/debug_files/debug_files-upload-help.trycmd | 4 ++-- tests/integration/_cases/deploys/deploys-help.trycmd | 4 ++-- .../_cases/deploys/deploys-no-subcommand.trycmd | 4 ++-- tests/integration/_cases/events/events-help.trycmd | 4 ++-- tests/integration/_cases/events/events-list-help.trycmd | 4 ++-- .../integration/_cases/events/events-no-subcommand.trycmd | 4 ++-- tests/integration/_cases/issues/issues-help.trycmd | 4 ++-- tests/integration/_cases/issues/issues-list-help.trycmd | 4 ++-- .../integration/_cases/monitors/monitors-list-help.trycmd | 2 +- tests/integration/_cases/projects/projects-help.trycmd | 2 +- .../integration/_cases/projects/projects-list-help.trycmd | 2 +- .../_cases/projects/projects-no-subcommand.trycmd | 2 +- tests/integration/_cases/releases/releases-help.trycmd | 4 ++-- .../integration/_cases/releases/releases-new-help.trycmd | 4 ++-- .../_cases/releases/releases-no-subcommand.trycmd | 4 ++-- .../_cases/sourcemaps/sourcemaps-explain-help.trycmd | 4 ++-- .../integration/_cases/sourcemaps/sourcemaps-help.trycmd | 4 ++-- .../_cases/sourcemaps/sourcemaps-inject-help.trycmd | 4 ++-- .../_cases/sourcemaps/sourcemaps-no-subcommand.trycmd | 4 ++-- .../_cases/sourcemaps/sourcemaps-resolve-help.trycmd | 4 ++-- .../_cases/sourcemaps/sourcemaps-upload-help.trycmd | 4 ++-- .../integration/_cases/upload_dif/upload_dif-help.trycmd | 4 ++-- .../_cases/upload_dsym/upload_dsym-help.trycmd | 4 ++-- .../_cases/upload_proguard/upload_proguard-help.trycmd | 4 ++-- 28 files changed, 52 insertions(+), 52 deletions(-) diff --git a/src/api/errors/api_error.rs b/src/api/errors/api_error.rs index 7a62fe38cf..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 ids or 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 e0a77fa052..23b26eb535 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 id or 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()), diff --git a/src/utils/args.rs b/src/utils/args.rs index 04e8835037..b7bb9b93bd 100644 --- a/src/utils/args.rs +++ b/src/utils/args.rs @@ -4,7 +4,7 @@ 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 +19,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 +90,7 @@ impl<'a: 'b, 'b> ArgExt for Command { .short('o') .value_parser(validate_org) .global(true) - .help("The organization id or slug."), + .help("The organization ID or slug."), ) } @@ -107,7 +107,7 @@ impl<'a: 'b, 'b> ArgExt for Command { } else { ArgAction::Set }) - .help("The project id or 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 f15e79f20c..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 id or 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 id or 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 3532d18bb4..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 id or 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 id or 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 aafcad7ba7..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 id or 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 id or 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 3ac990ff2a..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 id or 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 id or 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 bf679e2e5e..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 id or 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 id or 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 1ca69eeef1..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 id or 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 id or 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 1e204af641..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 id or 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 id or 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 d1494ec929..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 id or 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 id or 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 ca1eca02af..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 id or 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 id or 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 1904d26c1f..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 id or 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 713b31492f..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 id or 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 52d29b4cfb..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 id or 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 ee5c1a3c08..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 id or 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 3eb50ee964..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 id or 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 id or 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 5e858a715d..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 id or 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 id or 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 ca2d129fdf..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 id or 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 id or 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 0279c0ff83..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 id or 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 id or 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 5d9f1a1337..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 id or 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 id or 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 e688ce2ffb..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 id or 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 id or 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 38f0b76cb9..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 id or 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 id or 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 790a8e63a5..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 id or 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 id or 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 41e1d59e91..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 id or slug. + The organization ID or slug. --header Custom headers that should be attached to all requests in key:value format. -p, --project - The project id or 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 2a3531b013..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 id or 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 id or 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 d8c23b2105..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 id or 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 id or 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 0cfa4c1806..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 id or 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 id or 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. From 8209effd730c6be3938d5a5e087ebc25ef333649 Mon Sep 17 00:00:00 2001 From: Raj Joshi Date: Wed, 17 Jul 2024 10:36:00 -0400 Subject: [PATCH 4/5] Update src/config.rs Co-authored-by: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com> --- src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 23b26eb535..da56ae6de3 100644 --- a/src/config.rs +++ b/src/config.rs @@ -407,7 +407,7 @@ impl Config { .get_from(Some("defaults"), "project") .map(str::to_owned) }) - .ok_or_else(|| format_err!("A project id or 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. From 903040da9dc0d4c65e687bbbba6b2e71101491eb Mon Sep 17 00:00:00 2001 From: Raj Joshi Date: Wed, 17 Jul 2024 07:56:27 -0700 Subject: [PATCH 5/5] fmt --- src/utils/args.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/args.rs b/src/utils/args.rs index b7bb9b93bd..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 or the ID 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()) }