From 6004e9907d653e625dc0a04165eaaa5c385aee2d Mon Sep 17 00:00:00 2001 From: ianlv <168640168+ianlv@users.noreply.github.com> Date: Sat, 4 May 2024 20:13:43 +0800 Subject: [PATCH] Correct function names (#3681) Signed-off-by: ianlv --- pipeline/frontend/yaml/types/container_test.go | 2 +- server/forge/bitbucket/convert.go | 4 ++-- server/forge/github/convert.go | 2 +- woodpecker-go/woodpecker/global_secret.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pipeline/frontend/yaml/types/container_test.go b/pipeline/frontend/yaml/types/container_test.go index 74a38ac3b..5d8fbb0cc 100644 --- a/pipeline/frontend/yaml/types/container_test.go +++ b/pipeline/frontend/yaml/types/container_test.go @@ -141,7 +141,7 @@ func TestUnmarshalContainer(t *testing.T) { assert.EqualValues(t, want, got, "problem parsing container") } -// TestUnmarshalContainersErr unmarshals a map of containers. The order is +// TestUnmarshalContainers unmarshals a map of containers. The order is // retained and the container key may be used as the container name if a // name is not explicitly provided. func TestUnmarshalContainers(t *testing.T) { diff --git a/server/forge/bitbucket/convert.go b/server/forge/bitbucket/convert.go index c34570d54..f6eb69ef1 100644 --- a/server/forge/bitbucket/convert.go +++ b/server/forge/bitbucket/convert.go @@ -141,7 +141,7 @@ func convertUser(from *internal.Account, token *oauth2.Token) *model.User { } } -// convertTeamList is a helper function used to convert a Bitbucket team list +// convertWorkspaceList is a helper function used to convert a Bitbucket team list // structure to the Woodpecker Team structure. func convertWorkspaceList(from []*internal.Workspace) []*model.Team { var teams []*model.Team @@ -151,7 +151,7 @@ func convertWorkspaceList(from []*internal.Workspace) []*model.Team { return teams } -// convertTeam is a helper function used to convert a Bitbucket team account +// convertWorkspace is a helper function used to convert a Bitbucket team account // structure to the Woodpecker Team structure. func convertWorkspace(from *internal.Workspace) *model.Team { return &model.Team{ diff --git a/server/forge/github/convert.go b/server/forge/github/convert.go index d7dd9e531..cd9581799 100644 --- a/server/forge/github/convert.go +++ b/server/forge/github/convert.go @@ -161,7 +161,7 @@ func convertRepoHook(eventRepo *github.PushEventRepository) *model.Repo { return repo } -// covertLabels is a helper function used to convert a GitHub label list to +// convertLabels is a helper function used to convert a GitHub label list to // the common Woodpecker label structure. func convertLabels(from []*github.Label) []string { labels := make([]string, len(from)) diff --git a/woodpecker-go/woodpecker/global_secret.go b/woodpecker-go/woodpecker/global_secret.go index 7befc97e5..1e9a07031 100644 --- a/woodpecker-go/woodpecker/global_secret.go +++ b/woodpecker-go/woodpecker/global_secret.go @@ -7,7 +7,7 @@ const ( pathGlobalSecret = "%s/api/secrets/%s" ) -// GlobalOrgSecret returns an global secret by name. +// GlobalSecret returns an global secret by name. func (c *client) GlobalSecret(secret string) (*Secret, error) { out := new(Secret) uri := fmt.Sprintf(pathGlobalSecret, c.addr, secret)