Github Enterprise integration #8278
Replies: 5 comments 4 replies
-
I"m interested in this as well as my company uses an Enterprise instance of Github in the cloud and this would make leadership much more amenable to collaboration if it was tied to our own instance. |
Beta Was this translation helpful? Give feedback.
-
We would also really like this! In vscode we use Copilot with github enterprise, but in Zed I haven't found a way of enabling this. |
Beta Was this translation helpful? Give feedback.
-
I could set this up in earlier versions but after I signed out for once, I cannot do this anymore. Does anyone know how to do that. |
Beta Was this translation helpful? Give feedback.
-
GitHub Enterprise Cloud (also with Data Residency) just needs you to set the Base URL (eg. foobar.ghe.com, where foobar is the GitHub Enterprise). Zed just need to expose this in the settings, as they use the same API schema for GitHub.com and GHE.com. The only odd-ball would be GitHub Enterprise Server, which uses a different set of APIs, but I don't think they've launched things like GitHub Copilot for GitHub Enterprise Server anyway. I hope this can be solved soon, as I'd love to use Zed as my default editor at work. |
Beta Was this translation helpful? Give feedback.
-
Link to potentially relevant source code If I inferred correctly, I think exposing the the base url out and then instantiate a client from the impl CopilotChat {
pub fn global(cx: &App) -> Option<gpui::Entity<Self>> {
cx.try_global::<GlobalCopilotChat>()
.map(|model| model.0.clone())
}
pub fn new(fs: Arc<dyn Fs>, client: Arc<dyn HttpClient>, cx: &App) -> Self {
let config_paths = copilot_chat_config_paths();
let resolve_config_path = {
let fs = fs.clone();
async move {
for config_path in config_paths.iter() {
if fs.metadata(config_path).await.is_ok_and(|v| v.is_some()) {
return config_path.clone();
}
}
config_paths[0].clone()
}
};
cx.spawn(|cx| async move {
let config_file = resolve_config_path.await;
let mut config_file_rx = watch_config_file(cx.background_executor(), fs, config_file);
while let Some(contents) = config_file_rx.next().await {
let oauth_token = extract_oauth_token(contents);
cx.update(|cx| {
if let Some(this) = Self::global(cx).as_ref() {
this.update(cx, |this, cx| {
this.oauth_token = oauth_token;
cx.notify();
});
}
})?;
}
anyhow::Ok(())
})
.detach_and_log_err(cx);
Self {
oauth_token: None,
api_token: None,
client,
}
} |
Beta Was this translation helpful? Give feedback.
-
Local collaboration is currently tied to the public instance of GitHub [^1].
[^1] https://zed.dev/docs/local-collaboration
Beta Was this translation helpful? Give feedback.
All reactions