Skip to content

Commit 1b9e810

Browse files
authored
Merge pull request ernoaapa#14 from ernoaapa/support-team-slug
Added support for using team name or url slug
2 parents 6215716 + 643d7bb commit 1b9e810

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Tool can be used for example to automatically update `.ssh/authorized_keys` file
3737
| Parameter | Description |
3838
|----------------|-----------------------------------------------------------------------------------------------------------|
3939
| --organization | Name of the organization which members keys to pick |
40-
| --team | Name of the team which members keys to pick |
40+
| --team | Name or slug of the team which members keys to pick |
4141
| --user | Name of the user which keys to pick |
4242
| --token | GitHub API token to use for communication. Without token you get only public members of the organization. |
4343
| --public-only | Return only members what are publicly members of the given organization |

fetch/github.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func resolveTeamID(client *github.Client, organizationName, teamName string) (in
8787
}
8888

8989
for _, team := range teams {
90-
if strings.EqualFold(*team.Name, teamName) {
90+
if strings.EqualFold(*team.Name, teamName) || strings.EqualFold(*team.Slug, teamName) {
9191
return *team.ID, nil
9292
}
9393
}

0 commit comments

Comments
 (0)