From e11e231bb6b59fb3c5c5e6a235bbe93151bad129 Mon Sep 17 00:00:00 2001 From: Daniel Szoke Date: Tue, 6 Feb 2024 15:08:23 +0100 Subject: [PATCH] fix(deploys): Use `--project` argument (#1930) This commit fixes the deploys new command to use the --project argument. Previously, the --project argument was ignored; now, any projects specified with the --project argument are sent to Sentry in the request that creates the deploy (relevant API docs). ref #1927 --- src/api.rs | 2 ++ src/commands/deploys/new.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/api.rs b/src/api.rs index 5a5d9602c4..33ee5dfaeb 100644 --- a/src/api.rs +++ b/src/api.rs @@ -2610,6 +2610,8 @@ pub struct Deploy { pub started: Option>, #[serde(rename = "dateFinished")] pub finished: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + pub projects: Option>, } impl Deploy { diff --git a/src/commands/deploys/new.rs b/src/commands/deploys/new.rs index f289fc81b2..8188785d65 100644 --- a/src/commands/deploys/new.rs +++ b/src/commands/deploys/new.rs @@ -71,6 +71,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> { env: matches.get_one::("env").unwrap().to_string(), name: matches.get_one::("name").cloned(), url: matches.get_one::("url").cloned(), + projects: config.get_projects(matches).ok(), ..Default::default() };