Skip to content

Commit

Permalink
refactor: Improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
akash1810 committed Oct 23, 2024
1 parent d038baa commit 7afe69d
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,11 @@ fn make_message(pull_request: GithubPullRequest, show_pr_age: bool) -> String {
"".to_string()
};

let user = format!(
"{} {}",
if pull_request.user.login.contains("[bot]") {
"🤖"
} else {
"👤"
},
pull_request.user.login
);
let user = if pull_request.user.login.contains("[bot]") {
format!("🤖 {}", pull_request.user.login)
} else {
format!("👤 {}", pull_request.user.login)
};

format!("{}{} \n\n{}\n", message, age_output, user)
}
Expand Down

0 comments on commit 7afe69d

Please sign in to comment.