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

オープン
#28 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
68/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
tooling

調査の方向性

まず repo_cache.sync_org() と #27 後の SyncReport 処理を読み、次に generate-repo-overview が PyGithub のリポジトリレコードをどのように取得しているかを調べます。事前取得済みリポジトリ用の同期エントリポイントを追加し、sync_org() は委譲する wrapper として維持します。パスと結果が決定的であり、空および失敗の分類が維持され、組織の一覧取得が二度行われず、ライブラリのドキュメントが更新されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
1
フォーク
5
平均マージ
23時間 38分
マージ済み PR(30日)
13

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

eclipse-score/tools のほかの issue

eclipse-score/tools の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。