feat(repo-cache): sync pre-fetched repositories without listing the organization
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
先阅读 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.Repositoryrecords without another organization-list API request. - The returned
SyncReportpreserves 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 分钟
- 30 天内合并 PR
- 13
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eclipse-score/tools 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
eclipse-score/tools#82 ·
维护者通常 1 天内回复
-
discussion required good first issue
难度 2/5 1-3 小时 新手友好度 67/100
eclipse-score/tools#8 ·
维护者通常 1 天内回复
-
good first issue
难度 4/5 3-5 天 新手友好度 45/100
eclipse-score/tools#55 ·
维护者通常 1 天内回复
-
repo-policy-sync
难度 5/5 一周以上 新手友好度 45/100
eclipse-score/tools#42 ·
维护者通常 1 天内回复
-
repo-policy-sync
难度 4/5 3-5 天 新手友好度 48/100
eclipse-score/tools#31 ·
维护者通常 1 天内回复
查看 eclipse-score/tools 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
NL-BioImaging/biomero#136 ·
维护者通常 1 天内回复
-
Grayscale PNGs with partial transparency can turn gray pixels white可能已有人在做 @ktz03 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
-
enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 78/100
floorianmb/tidywise#5 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
TigreGotico/phoonnx#1115 ·
维护者通常 1 天内回复