Skip to content

Commit

Permalink
feat(run): add branch argument (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
Malinskiy committed Sep 18, 2024
1 parent 6ed8acb commit 9c1643e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub trait RapiClient {
test_app: Option<PathBuf>,
name: Option<String>,
link: Option<String>,
branch: Option<String>,
platform: String,
os_version: Option<String>,
system_image: Option<String>,
Expand Down Expand Up @@ -129,6 +130,7 @@ impl RapiClient for RapiReqwestClient {
test_app: Option<PathBuf>,
name: Option<String>,
link: Option<String>,
branch: Option<String>,
platform: String,
os_version: Option<String>,
system_image: Option<String>,
Expand Down Expand Up @@ -261,6 +263,7 @@ impl RapiClient for RapiReqwestClient {
language: None,
link: link.clone(),
name: name.clone(),
branch: branch.clone(),
os_version: os_version.clone(),
project: project.clone(),
pull_file_config: pull_file_config
Expand Down Expand Up @@ -576,6 +579,8 @@ struct CreateRunRequest {
link: Option<String>,
#[serde(rename = "name", default)]
name: Option<String>,
#[serde(rename = "branch", default)]
branch: Option<String>,
#[serde(rename = "os_version", default)]
os_version: Option<String>,
#[serde(rename = "project", default)]
Expand Down
1 change: 1 addition & 0 deletions src/cli/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ If you are interesting in library testing then please use advance mode with --li
&api_args.api_key,
common.name,
common.link,
common.branch,
present_wait,
common.isolated,
common.ignore_test_failures,
Expand Down
1 change: 1 addition & 0 deletions src/cli/ios/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ If you provide any single or two of these parameters, the others will be inferre
&api_args.api_key,
common.name,
common.link,
common.branch,
present_wait,
common.isolated,
common.ignore_test_failures,
Expand Down
6 changes: 6 additions & 0 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ Please be aware that if you use the 'annotation' filter type on Android, you sho
)]
link: Option<String>,

#[arg(
long,
help = "Branch for run, for example it could be git branch like develop or feature/about-screen"
)]
branch: Option<String>,

#[arg(
long,
help = "When tests fail and this option is true then cli will exit with code 0. By default, cli will exit with code 1 in case of test failures and 0 for passing tests"
Expand Down
2 changes: 2 additions & 0 deletions src/interactor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ impl TriggerTestRunInteractor {
api_key: &str,
name: Option<String>,
link: Option<String>,
branch: Option<String>,
wait: bool,
isolated: Option<bool>,
ignore_test_failures: Option<bool>,
Expand Down Expand Up @@ -151,6 +152,7 @@ impl TriggerTestRunInteractor {
test_application,
name,
link,
branch,
platform,
os_version,
system_image,
Expand Down

0 comments on commit 9c1643e

Please sign in to comment.