From 98b953d5c81b31857ca695b92e89d65504957872 Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 18 Jun 2024 23:11:33 +0200 Subject: fix: Check for MSVC build if multiple artifacts are available (#949) Needed with a planned PR into NorthstarLauncher --- src-tauri/src/github/pull_requests.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src-tauri') diff --git a/src-tauri/src/github/pull_requests.rs b/src-tauri/src/github/pull_requests.rs index bf7a8fdb..7e400c1a 100644 --- a/src-tauri/src/github/pull_requests.rs +++ b/src-tauri/src/github/pull_requests.rs @@ -48,6 +48,7 @@ struct ActionsRunsResponse { #[derive(Debug, Deserialize, Clone)] struct Artifact { id: u64, + name: String, workflow_run: WorkflowRun, } @@ -206,8 +207,14 @@ pub async fn get_launcher_download_link(commit_sha: String) -> Result 1; + // Iterate over artifacts for artifact in artifacts_response.artifacts { + if multiple_artifacts && !artifact.name.starts_with("NorthstarLauncher-MSVC") { + continue; + } + // Make sure artifact and CI run commit head sha match if artifact.workflow_run.head_sha == workflow_run.head_sha { // Download artifact -- cgit v1.2.3