-
Notifications
You must be signed in to change notification settings - Fork 735
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
Add Slug to GHTeam per v3 API: https://developer.github.com/v3/orgs/t… #281
Conversation
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation. |
*/ | ||
public GHTeam getTeamBySlug(String slug) throws IOException { | ||
for (GHTeam t : listTeams()) { | ||
if(t.getSlug().equals(slug)) |
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.
Irritating that the single-team API seems to require a numeric ID rather than the “slug”.
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.
I just opened a feature request with GitHub support to allow selecting teams via :slug
key in addition to the :id
key within the API.
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.
They accepted the enhancement for selecting teams via :slug
but with the usual "we make no guarantees" line. So we may or may not see it as a feature of the API in the future.
So @jglick was that a +1? |
Yeah 🐝 insofar as I understand it. |
🐝 |
Nudge. Merge please. |
Bump. |
Nudging @kohsuke |
https://developer.github.com/v3/orgs/teams/ has a slug property for teams. This property is similar to the login property for users and organizations - a URL path friendly tokenized string (as opposed to free text in the name field).
Slug is better suited for use in automated / scripting cases when dealing with the Team API.
Admittedly, I wrote a test but could not test as the project's test harness requires super powers which I do not possess.
@reviewbybees