Also pass group in drone environment
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2022-10-17 23:48:06 +02:00
parent f4b2eec979
commit 9b37ca082f

View File

@ -402,10 +402,12 @@ func TriggerTagUpdate(c *gin.Context, work *Work, repo *Repository, u *User, tag
} }
login := u.Login login := u.Login
groups := u.Groups
if u.Id != repo.IdUser { if u.Id != repo.IdUser {
user, _ := getUser(int(repo.IdUser)) user, _ := getUser(int(repo.IdUser))
if user != nil { if user != nil {
login = user.Login login = user.Login
groups = user.Groups
} }
} }
@ -414,6 +416,7 @@ func TriggerTagUpdate(c *gin.Context, work *Work, repo *Repository, u *User, tag
"REPO_URL": repo.URI, "REPO_URL": repo.URI,
"REPO_TAG": repo_tag, "REPO_TAG": repo_tag,
"LOGIN": login, "LOGIN": login,
"GROUPS": groups,
"DEST": fmt.Sprintf("%d", work.Id), "DEST": fmt.Sprintf("%d", work.Id),
}) })
if err != nil { if err != nil {