Merge pull request #3226 from gitbutlerapp/allow-action-to-be-passed-to-test-fetch-endpoint

allow action to be passed to test fetch endpoint
This commit is contained in:
Josh Junon 2024-03-19 20:20:08 +01:00 committed by GitHub
commit 734262abf2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -99,6 +99,7 @@ pub async fn git_test_fetch(
handle: tauri::AppHandle,
project_id: &str,
remote_name: &str,
action: Option<String>,
) -> Result<(), Error> {
let app = handle.state::<app::App>();
let helper = handle.state::<crate::git::credentials::Helper>();
@ -114,7 +115,7 @@ pub async fn git_test_fetch(
&project_id,
remote_name,
&helper,
Some((askpass_broker, "test".to_string())),
Some((askpass_broker, action.unwrap_or_else(|| "test".to_string()))),
)
.map_err(|e| Error::UserError {
code: Code::Unknown,