mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2026-03-16 01:19:02 +01:00
Lowercase all log strings (#3173)
from #3161 --------- Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@@ -80,7 +80,7 @@ func HandleAuth(c *gin.Context) {
|
||||
if server.Config.Permissions.Orgs.IsConfigured {
|
||||
teams, terr := _forge.Teams(c, tmpuser)
|
||||
if terr != nil || !server.Config.Permissions.Orgs.IsMember(teams) {
|
||||
log.Error().Err(terr).Msgf("cannot verify team membership for %s.", u.Login)
|
||||
log.Error().Err(terr).Msgf("cannot verify team membership for %s", u.Login)
|
||||
c.Redirect(303, server.Config.Server.RootPath+"/login?error=access_denied")
|
||||
return
|
||||
}
|
||||
@@ -130,7 +130,7 @@ func HandleAuth(c *gin.Context) {
|
||||
if server.Config.Permissions.Orgs.IsConfigured {
|
||||
teams, terr := _forge.Teams(c, u)
|
||||
if terr != nil || !server.Config.Permissions.Orgs.IsMember(teams) {
|
||||
log.Error().Err(terr).Msgf("cannot verify team membership for %s.", u.Login)
|
||||
log.Error().Err(terr).Msgf("cannot verify team membership for %s", u.Login)
|
||||
c.Redirect(http.StatusSeeOther, server.Config.Server.RootPath+"/login?error=access_denied")
|
||||
return
|
||||
}
|
||||
@@ -166,7 +166,7 @@ func HandleAuth(c *gin.Context) {
|
||||
continue
|
||||
}
|
||||
|
||||
log.Debug().Msgf("Synced user permission for %s %s", u.Login, dbRepo.FullName)
|
||||
log.Debug().Msgf("synced user permission for %s %s", u.Login, dbRepo.FullName)
|
||||
perm := forgeRepo.Perm
|
||||
perm.Repo = dbRepo
|
||||
perm.RepoID = dbRepo.ID
|
||||
|
||||
@@ -140,7 +140,7 @@ func LookupOrg(c *gin.Context) {
|
||||
} else if !user.Admin {
|
||||
perm, err := server.Config.Services.Membership.Get(c, user, org.Name)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("Failed to check membership")
|
||||
log.Error().Err(err).Msg("failed to check membership")
|
||||
c.Status(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ func PostRepo(c *gin.Context) {
|
||||
c.String(http.StatusConflict, "Repository is already active.")
|
||||
return
|
||||
} else if err != nil && !errors.Is(err, types.RecordNotExist) {
|
||||
msg := "Could not get repo by remote id from store."
|
||||
msg := "could not get repo by remote id from store."
|
||||
log.Error().Err(err).Msg(msg)
|
||||
c.String(http.StatusInternalServerError, msg)
|
||||
return
|
||||
@@ -115,7 +115,7 @@ func PostRepo(c *gin.Context) {
|
||||
t := token.New(token.HookToken, repo.FullName)
|
||||
sig, err := t.Sign(repo.Hash)
|
||||
if err != nil {
|
||||
msg := "Could not generate new jwt token."
|
||||
msg := "could not generate new jwt token."
|
||||
log.Error().Err(err).Msg(msg)
|
||||
c.String(http.StatusInternalServerError, msg)
|
||||
return
|
||||
@@ -139,7 +139,7 @@ func PostRepo(c *gin.Context) {
|
||||
if errors.Is(err, types.RecordNotExist) {
|
||||
org, err = forge.Org(c, user, repo.Owner)
|
||||
if err != nil {
|
||||
msg := "Could not fetch organization from forge."
|
||||
msg := "could not fetch organization from forge."
|
||||
log.Error().Err(err).Msg(msg)
|
||||
c.String(http.StatusInternalServerError, msg)
|
||||
return
|
||||
@@ -147,7 +147,7 @@ func PostRepo(c *gin.Context) {
|
||||
|
||||
err = _store.OrgCreate(org)
|
||||
if err != nil {
|
||||
msg := "Could not create organization in store."
|
||||
msg := "could not create organization in store."
|
||||
log.Error().Err(err).Msg(msg)
|
||||
c.String(http.StatusInternalServerError, msg)
|
||||
return
|
||||
@@ -158,7 +158,7 @@ func PostRepo(c *gin.Context) {
|
||||
|
||||
err = forge.Activate(c, user, repo, hookURL)
|
||||
if err != nil {
|
||||
msg := "Could not create webhook in forge."
|
||||
msg := "could not create webhook in forge."
|
||||
log.Error().Err(err).Msg(msg)
|
||||
c.String(http.StatusInternalServerError, msg)
|
||||
return
|
||||
@@ -170,7 +170,7 @@ func PostRepo(c *gin.Context) {
|
||||
err = _store.CreateRepo(repo)
|
||||
}
|
||||
if err != nil {
|
||||
msg := "Could not create/update repo in store."
|
||||
msg := "could not create/update repo in store."
|
||||
log.Error().Err(err).Msg(msg)
|
||||
c.String(http.StatusInternalServerError, msg)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user