Skip to content

Commit

Permalink
Merge pull request #14 from ernoaapa/support-team-slug
Browse files Browse the repository at this point in the history
Added support for using team name or url slug
  • Loading branch information
ernoaapa authored Dec 18, 2017
2 parents 6215716 + 643d7bb commit 1b9e810
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Tool can be used for example to automatically update `.ssh/authorized_keys` file
| Parameter | Description |
|----------------|-----------------------------------------------------------------------------------------------------------|
| --organization | Name of the organization which members keys to pick |
| --team | Name of the team which members keys to pick |
| --team | Name or slug of the team which members keys to pick |
| --user | Name of the user which keys to pick |
| --token | GitHub API token to use for communication. Without token you get only public members of the organization. |
| --public-only | Return only members what are publicly members of the given organization |
Expand Down
2 changes: 1 addition & 1 deletion fetch/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func resolveTeamID(client *github.Client, organizationName, teamName string) (in
}

for _, team := range teams {
if strings.EqualFold(*team.Name, teamName) {
if strings.EqualFold(*team.Name, teamName) || strings.EqualFold(*team.Slug, teamName) {
return *team.ID, nil
}
}
Expand Down

0 comments on commit 1b9e810

Please sign in to comment.