-
Notifications
You must be signed in to change notification settings - Fork 647
GitHub org/team names should be treated case insensitively (fixes #1167) #1171
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
2f45ad1
to
509841c
Compare
This is working great! Tested out adding and removing teams as owners with different cases and it all worked as I expected ❤️ I also pushed a commit that I think should make clippy happy, that's a new lint I haven't run into yet! I would like to see a bit more coverage in the test though-- let me know if you're up for making this change, I'm also happy to take care of it! The current test is checking that a new team can be added as an owner when the team name has uppercase letters in it. A few more things I'd like to see the test assert on:
This can be added to the test you've added. Let me know what you think! |
Thank you for appeasing clippy, I was a bit stumped there for a bit. I'd be happy to make the testing changes as requested, I'll take a look at it soon! |
I've begun work on adding the additional tests. The check for team ownership casing works great, however I run into issues with removing the team as an owner of a crate. Making the api call causes an error in the expected response from GitHub. Just commenting to let you know I've not forgotten about this, and am working on it. |
I just wanted to get what I did have working in, which is just the check for if the team name is lowercase when asked for. I still have not been able to figure out what to do in the What I've written is the following:
And I've tried a few different things in Edit: The sort of errors I am encountering are:
|
Hey folks. This PR seems stalled out. I'm happy to pick it up and help out. But I'm not sure what the proper etiquette is here. If I can help, what's the recommended way to do so? (create my own branch? try to keep working off of this one?) |
@klnusbaum Right now it just needs a rebase. If you (or @cgati) want to do so and ping me, I will review |
@sgrif I went ahead and performed the rebase. |
bors: r+ |
Thanks @cgati <3 |
1171: GitHub org/team names should be treated case insensitively (fixes #1167) r=sgrif I believe this fixes the issue. If there are areas that I missed, I will be sure to update them as well! Example usage output: ``` # cargo owner -a github:test-cratesio:dev --index file:///development/crates.io/tmp/index-co Updating registry `file:///development/crates.io/tmp/index-co` Owner team github:test-cratesio:dev has been added as an owner of crate test-crate # cargo owner -a github:Test-Cratesio:Dev --index file:///development/crates.io/tmp/index-co Updating registry `file:///development/crates.io/tmp/index-co` error: failed to invite owners to crate test-crate: api errors: `github:Test-Cratesio:Dev` is already an owner # cargo owner -r github:Test-Cratesio:Dev --index file:///development/crates.io/tmp/index-co Updating registry `file:///development/crates.io/tmp/index-co` Owner removing ["github:Test-Cratesio:Dev"] from crate test-crate # cargo owner -a github:Test-Cratesio:Dev --index file:///development/crates.io/tmp/index-co Updating registry `file:///development/crates.io/tmp/index-co` Owner team github:test-cratesio:dev has been added as an owner of crate test-crate ```
Build succeeded |
I believe this fixes the issue. If there are areas that I missed, I will be sure to update them as well!
Example usage output: