Skip to content

Query GitHub teams directly by name #1945

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

Merged
merged 1 commit into from
Dec 11, 2019
Merged

Conversation

iliana
Copy link
Contributor

@iliana iliana commented Dec 9, 2019

I was having trouble adding the github:awslabs:tough team to one of our new crates because the awslabs org has over 100 teams.

This allows users to use the 101st-created team on their GitHub organization for staggeringly large organizations by querying the team directly.

Test data was updated by hand per guidance in #crates-io, based on similar queries I made manually, but I would greatly appreciate if someone with access to actually make these API calls tested things work. :)

Allows users to use the 101st-created team on their GitHub organization
for staggeringly large organizations by querying the team directly.
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @carols10cents (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

Copy link
Member

@carols10cents carols10cents left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh geez. I'm so embarrassed that we left this FIXME in here so long. Thank you so much for fixing it, and for figuring out how to update the recorded http data!!

I tried this out locally and it worked great-- I'll get this deployed by Friday.

id: i32, // unique GH id (needed for membership queries)
name: Option<String>, // Pretty name
}

// FIXME: we just set per_page=100 and don't bother chasing pagination
// links. A hundred teams should be enough for any org, right?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂 😂 😭

@carols10cents
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Dec 11, 2019

📌 Commit 4cc54a9 has been approved by carols10cents

bors added a commit that referenced this pull request Dec 11, 2019
Query GitHub teams directly by name

I was having trouble adding the `github:awslabs:tough` team to [one of our new crates](https://crates.io/crates/tough) because the awslabs org has over 100 teams.

This allows users to use the 101st-created team on their GitHub organization for staggeringly large organizations by querying the team directly.

Test data was updated by hand per guidance in #crates-io, based on similar queries I made manually, but I would greatly appreciate if someone with access to actually make these API calls tested things work. :)
@bors
Copy link
Contributor

bors commented Dec 11, 2019

⌛ Testing commit 4cc54a9 with merge 5a8b4ca...

@bors
Copy link
Contributor

bors commented Dec 11, 2019

☀️ Test successful - checks-travis
Approved by: carols10cents
Pushing 5a8b4ca to master...

@bors bors merged commit 4cc54a9 into rust-lang:master Dec 11, 2019
@iliana iliana deleted the unlimited-teams branch December 11, 2019 22:29
@carols10cents
Copy link
Member

I've deployed this; please try adding the team again and let me know if it doesn't work :) Thank you for the fix!!

@iliana
Copy link
Contributor Author

iliana commented Dec 13, 2019

$ cargo owner --add github:awslabs:tough olpc-cjson
    Updating crates.io index
       Owner team github:awslabs:tough has been added as an owner of crate olpc-cjson

Perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants