PyGithub / PyGithub/PyGithub

repo.get_contents( ) with tag/release parameter

未关闭
#2,252 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
7.8k
派生
1.9k
平均合并
17 分钟
30 天内合并 PR
2

描述

I'm not sure if there is an existing solution and I can't find it, but I would like to load files from an old version of a particular repo. Currently I can only load the latest version of the file from master. So another parameter in repo.get_contents( ) for a version tag would be great.

For example, I would like to load the license file of version v1.53 (https://github.com/PyGithub/PyGithub/blob/v1.53/COPYING) instead of the one from the master (https://github.com/PyGithub/PyGithub/blob/master/COPYING).
repo.get_contents(path="COPYING", tag="v1.53")

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 repo.get_contents 的实现开始,检查它如何构建 GitHub contents 请求。根据提供的 v1.53 COPYING 示例验证版本选择器;完成的标准是可以加载旧标签对应的文件,同时不改变最新文件的行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
github, python
领域
api
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。