-
Notifications
You must be signed in to change notification settings - Fork 649
Record who published crate versions #1561
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
Conversation
field to the versions table. Also updates the schema.rb to reflect this table change. published by is a foreign key referencing the users table.
in the new field.
match the Version Struct correctly. Fixes test in the same file broken by this change
creation of the new versions in the krate publish controller and in the update-downloads bin
by adding in user_id arguments to pass it through. Unsure if this is the best way to solve this issue in the tests.
Ugh github is being weird, it won't let me comment on lines. So here's my review:
I'm taking a look at what problems you might have encountered when trying to add the full struct of EncodableOwner to EncodableVersion now... |
Ok, so for including the information with the EncodableVersion:
Does that make sense? Would that solve whatever problems you were running into or no? Please ask more questions if I've guessed wrong! |
I think moving your changes on |
published by is a nullable field now.
be part of their own builders.rs file and this PR accidentally merged them back into the all.rs file when trying to resolve the merge conflict. This commit removes them from all.rs so that it reflects master, and then makes the minimal changes needed to the models in builders.rs to reflect the new database updates.
☔ The latest upstream changes (presumably #1615) made this pull request unmergeable. Please resolve the merge conflicts. |
Always pass None for the moment
And use it in places where there's only one version
When we need published_by
Hi @Andy-Bell, I hope you don't mind, but I'm planning on building off what you've started here for the time-sensitive requiring of verified email addresses to publish crates, so I finished the last piece of returning an Because I've now contributed some stuff to this PR, I think someone else should review and merge this, at least my commits. Yours look great to me, thank you so much! |
I incorporated this PR into #1621, so it's going to get merged when that gets merged. Thank you @Andy-Bell!!! |
This PR is designed to address #1478.
I believe it answers all the check boxes listed there, but I am not 100% happy on how I have fixed the tests in the last commit here (there may not need to be the passing of the user_id values quite as much?).
Also the EncodableVersion just provides the ID of the Owner, not the full struct of EncodableOwner, as I could not work out how to do that cleanly - any insight would be appreciated