From f7619d6a9f526816de79e3d3b90c82f06990d530 Mon Sep 17 00:00:00 2001 From: Thomas Scheel Date: Thu, 6 Feb 2020 12:49:25 +0100 Subject: [PATCH] Search by login instead of full name --- gitea-group-sync.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitea-group-sync.go b/gitea-group-sync.go index 9cf241b..8c686b9 100644 --- a/gitea-group-sync.go +++ b/gitea-group-sync.go @@ -18,8 +18,8 @@ func AddUsersToTeam(apiKeys GiteaKeys, users []Account, team int) bool { for i := 0; i < len(users); i++ { - fullusername := url.PathEscape(fmt.Sprintf("%s", users[i].Full_name)) - apiKeys.Command = "/api/v1/users/search?q=" + fullusername + "&access_token=" + userlogin := url.PathEscape(fmt.Sprintf("%s", users[i].Login)) + apiKeys.Command = "/api/v1/users/search?q=" + userlogin + "&access_token=" foundUsers := RequestSearchResults(apiKeys) for j := 0; j < len(foundUsers.Data); j++ {