Prefer names over github logins when filling co-authors (#24693)
Follow-up of https://github.com/zed-industries/zed/pull/24575 Release Notes: - N/A
This commit is contained in:
parent
e851abd2ec
commit
636253d2dc
1 changed files with 14 additions and 2 deletions
|
@ -789,7 +789,14 @@ impl GitPanel {
|
||||||
let email = participant.user.email.clone().unwrap();
|
let email = participant.user.email.clone().unwrap();
|
||||||
|
|
||||||
if !existing_co_authors.contains(&email.as_ref()) {
|
if !existing_co_authors.contains(&email.as_ref()) {
|
||||||
new_co_authors.push((participant.user.github_login.clone(), email))
|
new_co_authors.push((
|
||||||
|
participant
|
||||||
|
.user
|
||||||
|
.name
|
||||||
|
.clone()
|
||||||
|
.unwrap_or_else(|| participant.user.github_login.clone()),
|
||||||
|
email,
|
||||||
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -797,7 +804,12 @@ impl GitPanel {
|
||||||
if let Some(user) = room.local_participant_user(cx) {
|
if let Some(user) = room.local_participant_user(cx) {
|
||||||
if let Some(email) = user.email.clone() {
|
if let Some(email) = user.email.clone() {
|
||||||
if !existing_co_authors.contains(&email.as_ref()) {
|
if !existing_co_authors.contains(&email.as_ref()) {
|
||||||
new_co_authors.push((user.github_login.clone(), email.clone()))
|
new_co_authors.push((
|
||||||
|
user.name
|
||||||
|
.clone()
|
||||||
|
.unwrap_or_else(|| user.github_login.clone()),
|
||||||
|
email.clone(),
|
||||||
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue