Skip to content

repository: maybe provide a Repository.get_delegating_role() #2552

@jku

Description

@jku

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions