ZIm/crates
Kirill Bulatov 0199eca289
Allow filling co-authors in the git panel's commit input (#23329)
https://github.com/user-attachments/assets/78db908e-cfe5-4803-b0dc-4f33bc457840


* starts to extract usernames out of `users/` GitHub API responses, and
pass those along with e-mails in the collab sessions as part of the
`User` data

* adjusts various prefill and seed test methods so that the new data can
be retrieved from GitHub properly

* if there's an active call, where guests have write permissions and
e-mails, allow to trigger `FillCoAuthors` action in the context of the
git panel, that will fill in `co-authored-by:` lines, using e-mail and
names (or GitHub handle names if name is absent)

* the action tries to not duplicate such entries, if any are present
already, and adds those below the rest of the commit input's text

Concerns:

* users with write permissions and no e-mails will be silently omitted
— adding odd entries that try to indicate this or raising pop-ups is
very intrusive (maybe, we can add `#`-prefixed comments?), logging seems
pointless

* it's not clear whether the data prefill will run properly on the
existing users — seems tolerable now, as it seems that we get e-mails
properly already, so we'll see GitHub handles instead of names in the
worst case. This can be prefilled better later.

* e-mails and names for a particular project may be not what the user
wants.
E.g. my `.gitconfig` has
```
[user]
    email = mail4score@gmail.com

# .....snip

[includeif "gitdir:**/work/zed/**/.git"]
    path = ~/.gitconfig.work
```

and that one has

```
[user]
    email = kirill@zed.dev
```

while my GitHub profile is configured so, that `mail4score@gmail.com` is
the public, commit e-mail.

So, when I'm a participant in a Zed session, wrong e-mail will be
picked.
The problem is, it's impossible for a host to get remote's collaborator
git metadata for a particular project, as that might not even exist on
disk for the client.

Seems that we might want to add some "project git URL <-> user name and
email" mapping in the settings(?).
The design of this is not very clear, so the PR concentrates on the
basics for now.

When https://github.com/zed-industries/zed/pull/23308 lands, most of the
issues can be solved by collaborators manually, before committing.

Release Notes:

- N/A
2025-01-18 22:57:17 +02:00
..
activity_indicator chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
anthropic chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assets chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assistant chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assistant2 assistant2: Try again with fix use of rust-analyzer with "workspace": false (#23331) 2025-01-18 20:33:24 +00:00
assistant_settings chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assistant_slash_command chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assistant_slash_commands chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assistant_tool chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
assistant_tools chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
audio chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
auto_update chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
auto_update_ui chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
breadcrumbs chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
call Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
channel Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
cli chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
client Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
clock chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
collab Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
collab_ui Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
collections chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
command_palette chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
command_palette_hooks chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
context_server chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
context_server_settings chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
copilot chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
db chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
diagnostics chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
docs_preprocessor chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
editor Fix accepting partial inline completion (#23312) 2025-01-18 10:27:12 +00:00
evals chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
extension chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
extension_api chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
extension_cli chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
extension_host chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
extensions_ui chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
feature_flags chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
feedback chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
file_finder chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
file_icons chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
fireworks chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
fs chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
fsevent chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
fuzzy chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
git git: Implement commit creation (#23263) 2025-01-17 18:51:20 +00:00
git_hosting_providers chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
git_ui Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
go_to_line chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
google_ai chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
gpui Delay hiding git blame tooltip (#22644) 2025-01-18 20:52:14 +00:00
gpui_macros chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
html_to_markdown html_to_markdown: Restore ability to publish (#23293) 2025-01-17 17:57:13 +00:00
http_client chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
image_viewer chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
indexed_docs chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
inline_completion chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
inline_completion_button chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
install_cli chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
journal chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language_extension chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language_model chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language_model_selector chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language_models chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language_selector chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
language_tools chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
languages chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
livekit_client chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
livekit_client_macos chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
livekit_server chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
lmstudio chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
lsp Revert "lsp: Parse LSP messages on background thread - again (#23122)" (#23301) 2025-01-17 15:06:10 -07:00
markdown chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
markdown_preview chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
media chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
menu chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
multi_buffer chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
node_runtime chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
notifications chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
ollama chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
open_ai chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
outline chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
outline_panel chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
paths chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
picker chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
prettier chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
project lsp: Skip computation of edits_since_save when there are no disk based diagnostics (#23269) 2025-01-18 13:28:44 -07:00
project_panel git: Implement commit creation (#23263) 2025-01-17 18:51:20 +00:00
project_symbols chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
prompt_library chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
proto Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
recent_projects terminal: Add scrollbar (#23256) 2025-01-18 17:36:41 +01:00
refineable chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
release_channel chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
remote chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
remote_server chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
repl chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
reqwest_client chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
rich_text chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
rope chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
rpc chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
search chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
semantic_index chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
semantic_version chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
session chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
settings chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
settings_ui chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
snippet chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
snippet_provider chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
snippets_ui chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
sqlez chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
sqlez_macros chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
story chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
storybook chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
streaming_diff chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
sum_tree chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
supermaven chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
supermaven_api chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
tab_switcher chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
task chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
tasks_ui chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
telemetry chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
telemetry_events chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
terminal terminal: Add scrollbar (#23256) 2025-01-18 17:36:41 +01:00
terminal_view terminal: Add scrollbar (#23256) 2025-01-18 17:36:41 +01:00
text chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
theme chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
theme_extension chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
theme_importer chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
theme_selector chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
time_format chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
title_bar chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
toolchain_selector chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
ui terminal: Add scrollbar (#23256) 2025-01-18 17:36:41 +01:00
ui_input chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
ui_macros chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
util chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
vcs_menu chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
vim chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
vim_mode_setting chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
welcome chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
workspace Allow filling co-authors in the git panel's commit input (#23329) 2025-01-18 22:57:17 +02:00
worktree git: Implement commit creation (#23263) 2025-01-17 18:51:20 +00:00
zed chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
zed_actions chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
zeta chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00