fix: html newline

fix: pr number templating
This commit is contained in:
Patrick 2024-07-19 23:21:54 +02:00
parent f9ff53fb14
commit 71547ae3ab
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F

View file

@ -18,19 +18,19 @@ pub fn send_notification(
last: bool, last: bool,
) -> Result<()> { ) -> Result<()> {
let mut body = format!( let mut body = format!(
"This is your friendly neighbourhood pr-tracker.\n\ "This is your friendly neighbourhood pr-tracker.<br>
PR <a href=\"https://github.com/NixOS/nixpkgs/pull/{{ pr_number }}\">#{pr_number}</a>\ PR <a href=\"https://github.com/NixOS/nixpkgs/pull/{pr_number}\">#{pr_number}</a>\
(\"{pr_title}\") has reached:\n\ (\"{pr_title}\") has reached:<br>
{:#?}\n", {:#?}<br>",
branches branches
); );
if last { if last {
body += "This is the last update you will get for this pr.\n\ body += "This is the last update you will get for this pr.<br>\
Thx for using this service\n\ Thx for using this service<br>\
Goodbye"; Goodbye";
} else { } else {
body += &format!( body += &format!(
"<a href=\"{}/unsubscribe?pr={pr_number}&email={}\">Unsubscribe from this PR</a>\n", "<a href=\"{}/unsubscribe?pr={pr_number}&email={}\">Unsubscribe from this PR</a><br>",
&CONFIG.url, &CONFIG.url,
encode(recipient) encode(recipient)
); );