Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

repository: maybe provide a Repository.get_delegating_role()

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

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
python
领域
security

调研方向

首先查看 Repository API 及其实现,以了解当前如何查找委派角色,以及如何表示委派树。主要任务是确定 Repository 应该要求该方法、提供单层默认实现,还是维护一棵委派树;当针对提议的角色查找及相关便利方法达成一致的 API 和行为时,即视为完成。

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

描述

I wonder if Repository.get_delegating_role(role: str) -> str would be useful

  • In my implementations I end up looking up the delegating role of a role quite a lot.
  • if this existed, Repository could also offer QOL things like Repository.get_verification_result(role, md)

The reason this does not exist is that we can't really provide a fully generic implementation: Repository does not maintain a delegation tree. So we could

  • Require all Repository implementations to provide the method OR
  • Provide a default implementation that assumes max one level of targets delegations (and require more complex implementations to provide their own) OR
  • Provide a default implementation that adds a delegation tree into Repository
主要语言
Python
星标
1.7k
派生
304
平均合并
1 天 2 小时
30 天内合并 PR
17

环境准备

从这里开始

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

theupdateframework/python-tuf 的其他 Issue

查看 theupdateframework/python-tuf 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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