feat(vcs): clone from the repositories of your GitHub account (#1125)

The Clone Repository dialog lists GitHub next to Repository URL: the repositories of the account gh is signed in to, searchable; picking one fills URL and directory, double-click or Enter clones. Clone URL follows gh's git_protocol. Clone sources are a workbench contribution (registerCloneSource); gh_account_repos needs no project.

Closes #750
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-04 08:40:06 +08:00
1 джерело 9988ce4113
коміт a3bbbf90a4
16 files changed
+668 -55

No files matched your search

+9 -2
Переглянути файл
@@ -3,8 +3,8 @@
use crate::state::AppState;
use ide_core::{IdeError, IdeResult, RequestId};
use ide_github::{
CreatePullRequest, GhApiRequest, GhAvailability, PrDiffRevisions, PrListQuery, PrReviewComment, PullRequestDetails,
PullRequestSummary, ReviewEvent,
CreatePullRequest, GhAccountRepos, GhApiRequest, GhAvailability, PrDiffRevisions, PrListQuery, PrReviewComment,
PullRequestDetails, PullRequestSummary, ReviewEvent,
};
use std::path::PathBuf;
use tauri::ipc::Channel;
@@ -35,6 +35,13 @@ fn vcs_changed(state: &AppState, window: &Window, root: &std::path::Path) {
}
}
/// The repositories of the account gh is signed in to ("Get from Version Control" › GitHub); needs no project.
#[tauri::command]
#[specta::specta]
pub async fn gh_account_repos() -> IdeResult<GhAccountRepos> {
blocking(|| Ok(ide_github::account_repositories())).await
}
#[tauri::command]
#[specta::specta]
pub async fn gh_availability(