(username string)
| 75 | } |
| 76 | |
| 77 | func getUserByUsername(username string) (*gitlab.User, error) { |
| 78 | users, err := getUsers(&gitlab.ListUsersOptions{ |
| 79 | Username: gitlab.String(username), |
| 80 | }) |
| 81 | if err != nil { |
| 82 | return nil, err |
| 83 | } |
| 84 | if len(users) < 1 { |
| 85 | return nil, fmt.Errorf("%s username not found", username) |
| 86 | } |
| 87 | return users[0], nil |
| 88 | } |
| 89 | |
| 90 | func getNamespaceID(id string) (int, error) { |
| 91 | git, err := newGitlabClient() |
no test coverage detected