Skip to content

Commit

Permalink
fix: handle special characters in commit author names
Browse files Browse the repository at this point in the history
  • Loading branch information
sekomer authored and mhkafadar committed Nov 22, 2024
1 parent 07fc60a commit 33c59f4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/webhooks/github/webhook_handlers/push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub fn handle_push_event(body: &web::Bytes) -> String {

let commit_url = &commit.url;
let commit_message = encode_text(commit.message.trim_end());
let commit_author_name = &commit.author.name;
let commit_author_name = encode_text(&commit.author.name);

commit_paragraph.push_str(&format!(
"<b>{commit_author_name}</b>: \
Expand Down
2 changes: 1 addition & 1 deletion src/webhooks/gitlab/webhook_handlers/new_branch_push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub fn new_branch_push(gitlab_event: &GitlabEvent) -> String {

let commit_url = &commit.url;
let commit_message = encode_text(commit.message.trim_end());
let commit_author_name = &commit.author.name;
let commit_author_name = encode_text(&commit.author.name);

commit_paragraph.push_str(&format!(
"<b>{commit_author_name}</b>: \
Expand Down
2 changes: 1 addition & 1 deletion src/webhooks/gitlab/webhook_handlers/push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub fn handle_push_event(body: &web::Bytes) -> String {

let commit_url = &commit.url;
let commit_message = encode_text(commit.message.trim_end());
let commit_author_name = &commit.author.name;
let commit_author_name = encode_text(&commit.author.name);

commit_paragraph.push_str(&format!(
"<b>{commit_author_name}</b>: \
Expand Down

0 comments on commit 33c59f4

Please sign in to comment.