feat(repo-cache): sync pre-fetched repositories without listing the organization

Đang mở
#28 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
68/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
tooling

Hướng nghiên cứu

Bắt đầu bằng việc đọc repo_cache.sync_org() và phần xử lý SyncReport sau #27, sau đó kiểm tra cách generate-repo-overview lấy các bản ghi repository từ PyGithub. Thêm entry point đồng bộ hóa cho các repository đã được lấy trước, đồng thời giữ sync_org() làm wrapper ủy quyền. Công việc được xem là hoàn tất khi các đường dẫn và kết quả là xác định, việc phân loại trường hợp rỗng/thất bại được giữ nguyên, không có lần liệt kê tổ chức thứ hai và tài liệu thư viện được cập nhật.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

Following #27, repo_cache.sync_org() correctly reports empty repositories separately from synchronization failures. However, it always lists the organization through gh and accepts only repository-name filters.

Consumers such as generate-repo-overview already fetch the complete repository set through PyGithub. They need to synchronize those same repositories, but using sync_org() causes a second organization listing and loses the already-fetched repository records.

Proposed change

Add a high-level synchronization API that accepts repository records supplied by the caller, for example:

sync_repositories(
    *,
    org: str,
    repositories: Sequence[Repository],
    cache_dir: Path,
    workers: int = DEFAULT_SYNC_WORKERS,
    progress: Callable[[str], None] | None = None,
) -> SyncReport

sync_org() should retain its current behavior and delegate to this API after listing and filtering repositories.

Acceptance criteria

  • Callers can synchronize a pre-fetched sequence of repo_cache.Repository records without another organization-list API request.
  • The returned SyncReport preserves the post-#27 empty-repository and failure classification.
  • Checkout paths and outcome ordering remain deterministic and compatible with sync_org().
  • sync_org() behavior remains unchanged and shares the implementation.
  • The library documentation includes the pre-fetched-repository use case.

This would let downstream collectors fetch GitHub metadata once, synchronize checkouts once, and pass the resulting paths into their own processing workers.

Ngôn ngữ chính
Python
Star
1
Fork
5
Merge trung bình
23 giờ 38 phút
Pull request đã merge (30 ngày)
13

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của eclipse-score/tools

Tất cả issue của eclipse-score/tools

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.