Skip to content

Commit

Permalink
fix typo (#401)
Browse files Browse the repository at this point in the history
Signed-off-by: Manabu McCloskey <[email protected]>
  • Loading branch information
nabuskey authored Oct 9, 2024
1 parent 7a9bf83 commit 12229d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/controllers/localbuild/gitea.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ func getGiteaToken(ctx context.Context, baseUrl, username, password string) (str
giteaClient.SetContext(ctx)
tokens, resp, err := giteaClient.ListAccessTokens(gitea.ListAccessTokensOptions{})
if err != nil {
return "", fmt.Errorf("listing gitea access tokens. stauts: %s error : %w", resp.Status, err)
return "", fmt.Errorf("listing gitea access tokens. status: %s error : %w", resp.Status, err)
}

for i := range tokens {
if tokens[i].Name == giteaAdminTokenName {
resp, err := giteaClient.DeleteAccessToken(tokens[i].ID)
if err != nil {
return "", fmt.Errorf("deleting gitea access tokens. stauts: %s error : %w", resp.Status, err)
return "", fmt.Errorf("deleting gitea access tokens. status: %s error : %w", resp.Status, err)
}
break
}
Expand All @@ -204,7 +204,7 @@ func getGiteaToken(ctx context.Context, baseUrl, username, password string) (str
},
})
if err != nil {
return "", fmt.Errorf("deleting gitea access tokens. stauts: %s error : %w", resp.Status, err)
return "", fmt.Errorf("deleting gitea access tokens. status: %s error : %w", resp.Status, err)
}

return token.Token, nil
Expand Down

0 comments on commit 12229d4

Please sign in to comment.