-
Notifications
You must be signed in to change notification settings - Fork 602
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
Allow removing deleted organizations from crate owners #7051
Conversation
I'd appreciate some feedback. I've got a few ways I could do this and I'm not sure which is the best.
|
(paging @carols10cents for no other reason than you've helped me here before and I'd appreciate your advice, if you've got a moment) |
I'm not that deeply familiar with the team code but using I think @carols10cents's original comment explains it quite well too:
|
@Turbo87 Appreciate the feedback! I think you're right; I'm gonna add something like |
I spent an embarrassingly long time trying to figure out how I broke ratelimiting ( ETA: Yep, looks like it's just on my machine. I'll have to dig into why, but as long as it works on CI I'm content to just ignore it locally, lol. |
yeah, unfortunately that test is currently flaky (see #6952) just to manage expectations, due to RustConf review times might currently be a bit slower than usual. after 22 hours of travel I probably shouldn't be reviewing code anymore 😅 |
Oh, good, it's not just on my machine! I'm glad it passed on CI. Don't worry about it, it's not like this is urgent. (At least, I hope it's not, considering the issue's from 2019, hah.) |
Rebased onto the latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry that it took so long... 🙈
looks very good to me though. nice work! :)
@Turbo87 No worries! Thanks for the review and merge! |
Fixes #1818.
My intended solution here is:
true
, vs. in the GH API:false
)true
when deleting owners andfalse
when adding themUnfortunately the
Crate::owner_add
andCrate::owner_remove
methods are like four steps above the actual DB lookup, and they call into the exact same stack of methods to get anOwner
. I could have also created a new stack of methods but this way seems like it'll require modifying less code, which is a big positive for someone who doesn't really understand how this project works.That said, I'm not 100% confident in where I've put the branch. Right now it's right next to the error message itself but it might belong higher up, e.g. maybe in
Team::create_or_update
it should try to look up the team by name instead of passing it down to the lower-level code.Todo:
cargo test
workingowner_add
andowner_remove
, all the way down toTeam::create_or_update_github_team
, with atodo!
in place of the actual implementationOwner
s in the database should be higher up.in_db
lookup branch, wherever that should terminate