-
Notifications
You must be signed in to change notification settings - Fork 965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trusted publishing: pre-fill registration fields, when possible #13661
Comments
Yeah, though, it's still worth doing. It just needs to be done only if the GH URL is declared in the structured metadata, and we'd have to verify the badges against the repo extracted from the meta. Having a workflow name extracted from a link that matches the repository URL is a safe bet, right? |
Oh, I see what you mean -- I thought you were originally proposing using the URLs in badges as a separate source of information as a fallback versus structured metadata, not as an "enrichment" source for that metadata. Using it as an enrichment source makes more sense to me, although I'm still not convinced that the quality of the data is worth it:
I'll defer to the maintainers/admins here, but IMO we should start with the "baseline" here (leveraging the structured metadata), and move into heuristics later on (and primarily based on evidence that users are using badges in the way we'd need them to). (As a side note: we could encourage people to put their specific release workflows in the structured metadata, which would solve both of these problems! That could probably be done with some additional documentation on the PyPA standards site, although we'd need to come up with reusable/generic-ish URL formats for different publisher types.) |
Triaging: @jleightcap will be working on this. |
I think this is probably going to be somewhat confusingly magic. We have lots of instances of projects where the data we'd pull from here is not right (e.g. the user has forked https://github.com/pypa/sampleproject without updating metadata) and the pre-fill is going to be wrong. We can't really guarantee this is always going to be right, so I think I'd prefer to not attempt to do this. |
The intent is only to pre-fill the form, the users would still have to review it and submit.. One alternative, UX-wise, could be having suggestions instead of filling @di would this address your concern? |
Triaging: one idea that @di and I discussed here is to use a "magic link" technique instead, e.g. having the publish workflow emit a This is a bit more misuse-resistant, since the "direction" of the metadata is a canonical one (i.e. the action itself will be supplying the pre-filled values, rather than having PyPI guess at them). In this approach seems reasonable, there are two action items:
|
I think a pre-filled form with ample opportunity for confirmation should be sufficient (something that requires every field to be individually confirmed would be ideal). Using URL parameters should be fine here since these will be logged-in views. |
As constituent tasks:
|
Originally raised by @webknjaz:
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).
The text was updated successfully, but these errors were encountered: