-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[FEAT]: Get Team By Name #2716
Comments
As per the API docs :
The method I've created takes a teamSlug and attempts no conversion, so we're expecting the caller to have done the work to convert to the slug format. Should the library expose a string.ToSlug() method to help the caller? e.g. string teamName = "My TEam Näme";
string teamSlug = teamName.ToSlug();
Team team = client.Organization.Team.GetByName("org", teamSlug); Then a choice of letting the caller do the work via the helper, or convert for them within the GetByName method. |
Unfortunately, I don't think that'll be safe from an API perspective. The slug is non-deterministic - for example, if you have multiple teams with the same name, then a number will be appended to the slug. |
Yup @timrogers came to the same conclusion - will leave it to the caller. |
Describe the need
The API docs specify that you can get a team by slug name, e.g.
Request
https://api.github.com/orgs/ORG/teams/TEAM_SLUG
Response
Implement the functionality for
ITeamsClient
SDK Version
No response
API Version
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: