feat: add integrations

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2026-03-08 23:00:14 +01:00
parent 5a5f9a3003
commit 646581ff44
65 changed files with 7774 additions and 127 deletions

View File

@@ -902,6 +902,8 @@ async fn artifact_detail(
.platform_client
.list_release_pipelines(&session.access_token, &org, &project),
);
// Fetch artifact spec after we have the artifact_id (needs artifact_result first).
let artifact = artifact_result.map_err(|e| match e {
forage_core::platform::PlatformError::NotFound(_) => error_page(
&state,
@@ -913,6 +915,14 @@ async fn artifact_detail(
internal_error(&state, "failed to fetch artifact", &other)
}
})?;
// Fetch artifact spec now that we have the artifact_id.
let artifact_spec = state
.platform_client
.get_artifact_spec(&session.access_token, &artifact.artifact_id)
.await
.unwrap_or_default();
let projects = warn_default("list_projects", projects);
let dest_states = dest_states.unwrap_or_default();
let release_intents = release_intents.unwrap_or_default();
@@ -1034,6 +1044,7 @@ async fn artifact_detail(
context! { name => d.name, environment => d.environment }
}).collect::<Vec<_>>(),
has_release_intents => release_intents.iter().any(|ri| ri.artifact_id == artifact.artifact_id),
artifact_spec => if artifact_spec.is_empty() { None::<String> } else { Some(artifact_spec) },
},
)
.map_err(|e| {