Use git config --global user.email
for email address in automatic Co-authored-by
(#32624)
Release Notes: - Automatic population of `Co-authored-by` now uses `git config --global user.email` --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com> Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
parent
e56a027bea
commit
7d708c14e4
24 changed files with 188 additions and 69 deletions
|
@ -14,7 +14,7 @@ use crate::{
|
|||
db::{
|
||||
self, BufferId, Capability, Channel, ChannelId, ChannelRole, ChannelsForUser,
|
||||
CreatedChannelMessage, Database, InviteMemberResult, MembershipUpdated, MessageId,
|
||||
NotificationId, Project, ProjectId, RejoinedProject, RemoveChannelMemberResult, ReplicaId,
|
||||
NotificationId, ProjectId, RejoinedProject, RemoveChannelMemberResult,
|
||||
RespondToChannelInvite, RoomId, ServerId, UpdatedChannelMessage, User, UserId,
|
||||
},
|
||||
executor::Executor,
|
||||
|
@ -1890,28 +1890,16 @@ async fn join_project(
|
|||
|
||||
let db = session.db().await;
|
||||
let (project, replica_id) = &mut *db
|
||||
.join_project(project_id, session.connection_id, session.user_id())
|
||||
.join_project(
|
||||
project_id,
|
||||
session.connection_id,
|
||||
session.user_id(),
|
||||
request.committer_name.clone(),
|
||||
request.committer_email.clone(),
|
||||
)
|
||||
.await?;
|
||||
drop(db);
|
||||
tracing::info!(%project_id, "join remote project");
|
||||
join_project_internal(response, session, project, replica_id)
|
||||
}
|
||||
|
||||
trait JoinProjectInternalResponse {
|
||||
fn send(self, result: proto::JoinProjectResponse) -> Result<()>;
|
||||
}
|
||||
impl JoinProjectInternalResponse for Response<proto::JoinProject> {
|
||||
fn send(self, result: proto::JoinProjectResponse) -> Result<()> {
|
||||
Response::<proto::JoinProject>::send(self, result)
|
||||
}
|
||||
}
|
||||
|
||||
fn join_project_internal(
|
||||
response: impl JoinProjectInternalResponse,
|
||||
session: Session,
|
||||
project: &mut Project,
|
||||
replica_id: &ReplicaId,
|
||||
) -> Result<()> {
|
||||
let collaborators = project
|
||||
.collaborators
|
||||
.iter()
|
||||
|
@ -1939,6 +1927,8 @@ fn join_project_internal(
|
|||
replica_id: replica_id.0 as u32,
|
||||
user_id: guest_user_id.to_proto(),
|
||||
is_host: false,
|
||||
committer_name: request.committer_name.clone(),
|
||||
committer_email: request.committer_email.clone(),
|
||||
}),
|
||||
};
|
||||
|
||||
|
@ -2567,7 +2557,6 @@ async fn get_users(
|
|||
id: user.id.to_proto(),
|
||||
avatar_url: format!("https://github.com/{}.png?size=128", user.github_login),
|
||||
github_login: user.github_login,
|
||||
email: user.email_address,
|
||||
name: user.name,
|
||||
})
|
||||
.collect();
|
||||
|
@ -2601,7 +2590,6 @@ async fn fuzzy_search_users(
|
|||
avatar_url: format!("https://github.com/{}.png?size=128", user.github_login),
|
||||
github_login: user.github_login,
|
||||
name: user.name,
|
||||
email: user.email_address,
|
||||
})
|
||||
.collect();
|
||||
response.send(proto::UsersResponse { users })?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue