diff options
author | Jan <sentrycraft123@gmail.com> | 2024-06-18 23:11:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 23:11:33 +0200 |
commit | 98b953d5c81b31857ca695b92e89d65504957872 (patch) | |
tree | 48a949e965954feac6cd5e99198eb5badc49461e /src-tauri/src/github/pull_requests.rs | |
parent | 8991b7ade7174376ee007dbff7797cc7e65cec02 (diff) | |
download | FlightCore-98b953d5c81b31857ca695b92e89d65504957872.tar.gz FlightCore-98b953d5c81b31857ca695b92e89d65504957872.zip |
fix: Check for MSVC build if multiple artifacts are available (#949)
Needed with a planned PR into NorthstarLauncher
Diffstat (limited to 'src-tauri/src/github/pull_requests.rs')
-rw-r--r-- | src-tauri/src/github/pull_requests.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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<String, St ) .unwrap(); + let multiple_artifacts = artifacts_response.artifacts.len() > 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 |