Skip to content

Commit

Permalink
fix(v0.1.2): optional field custom_branch_only
Browse files Browse the repository at this point in the history
  • Loading branch information
emhagman committed Nov 27, 2023
1 parent 247be58 commit 389f716
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dbterra"
version = "0.1.0"
version = "0.1.2"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/remote/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl<'a> DbtCloudClient<'a> {
}

pub fn delete_job(&self, job: &Job) -> Result<Response<Job>, Box<dyn Error>> {
let url = format!(
let url = format!(
"https://cloud.getdbt.com/api/v2/accounts/{}/jobs/{}/",
self.config.account_id,
job.id.expect("id is required to update a job"),
Expand Down
2 changes: 1 addition & 1 deletion src/remote/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub struct Triggers {
pub github_webhook: bool,
pub git_provider_webhook: bool,
pub schedule: bool,
pub custom_branch_only: bool,
pub custom_branch_only: Option<bool>,
}

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
Expand Down
4 changes: 2 additions & 2 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl RemoteJob {
github_webhook: ci.run_on_pr.unwrap_or_default(),
git_provider_webhook: false,
schedule: has_schedule,
custom_branch_only: ci.custom_branch_only.unwrap_or_default(),
custom_branch_only: ci.custom_branch_only,
},
execute_steps: job.steps,
execution: Execution {
Expand Down Expand Up @@ -137,7 +137,7 @@ mod tests {
github_webhook: false,
git_provider_webhook: false,
schedule: false,
custom_branch_only: false,
custom_branch_only: None,
},
execute_steps: vec!["dbt run".to_string()],
settings: Settings {
Expand Down

0 comments on commit 389f716

Please sign in to comment.