fix: only send email on demand
fix: format mail as html
This commit is contained in:
parent
4cd2e8216f
commit
ccd7e952cc
|
@ -56,7 +56,7 @@ pub fn send_notification(
|
|||
"PR-tracker: {pr_number}: {pr_title} has reached {:?}",
|
||||
branches
|
||||
))
|
||||
.header(ContentType::TEXT_PLAIN)
|
||||
.header(ContentType::TEXT_HTML)
|
||||
.body(body)
|
||||
.unwrap();
|
||||
|
||||
|
|
|
@ -201,6 +201,7 @@ async fn update_subscribers<S>(_request: Request<S>) -> http_types::Result<Respo
|
|||
println!("{:#?}", val);
|
||||
let to_do = ¤t - &val;
|
||||
println!("They will be notified for: {:#?}", to_do);
|
||||
if !to_do.is_empty() {
|
||||
send_notification(
|
||||
&file_name,
|
||||
&to_do,
|
||||
|
@ -210,6 +211,7 @@ async fn update_subscribers<S>(_request: Request<S>) -> http_types::Result<Respo
|
|||
)?;
|
||||
}
|
||||
}
|
||||
}
|
||||
if !remaining {
|
||||
println!("Removing {}", dir_name);
|
||||
remove_dir_all(dir_path)?;
|
||||
|
|
Loading…
Reference in a new issue