Skip to content

Trusted publishing: pre-fill registration fields, when possible #13661

Closed
@woodruffw

Description

@woodruffw

Originally raised by @webknjaz:

So... It just occurred to me that having to copy-and-paste some the same values for many projects was a bit of a "monkey work".
I realized that many projects have their GitHub URL in the structured metadata. And warehouse even has some classification code for showing different icons next to the links... So why not take advantage of that?
I think, warehouse could check the project's URLs for whether they point at GitHub and extract owner+repo segments from that.
Moreover, many projects have CI badges in the long description. It wouldn't be hard to extract the workflow filenames from most.
Of course the user should be urged to validate the populated values. But in general, this could be extremely useful for the end-users...

Using the structured metadata that comes with each project (specifically, the most recently uploaded release file) seems like a good approach to me, especially now that Warehouse is extracting that metadata per PEP 658 (#13649).

Pulling it from "badges" in the README might be a little riskier, particularly since people might accidentally copy those from templates/not update them from a fork. I think there'd also be diminishing returns with that approach (and we should be encouraging people to use the structured metadata, anyways).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions