mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-16 19:35:14 +00:00
Correct function names (#3681)
Signed-off-by: ianlv <sunlvyun@outlook.com>
This commit is contained in:
parent
cc0aaebe44
commit
6004e9907d
4 changed files with 5 additions and 5 deletions
|
@ -141,7 +141,7 @@ func TestUnmarshalContainer(t *testing.T) {
|
||||||
assert.EqualValues(t, want, got, "problem parsing container")
|
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
|
// retained and the container key may be used as the container name if a
|
||||||
// name is not explicitly provided.
|
// name is not explicitly provided.
|
||||||
func TestUnmarshalContainers(t *testing.T) {
|
func TestUnmarshalContainers(t *testing.T) {
|
||||||
|
|
|
@ -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.
|
// structure to the Woodpecker Team structure.
|
||||||
func convertWorkspaceList(from []*internal.Workspace) []*model.Team {
|
func convertWorkspaceList(from []*internal.Workspace) []*model.Team {
|
||||||
var teams []*model.Team
|
var teams []*model.Team
|
||||||
|
@ -151,7 +151,7 @@ func convertWorkspaceList(from []*internal.Workspace) []*model.Team {
|
||||||
return teams
|
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.
|
// structure to the Woodpecker Team structure.
|
||||||
func convertWorkspace(from *internal.Workspace) *model.Team {
|
func convertWorkspace(from *internal.Workspace) *model.Team {
|
||||||
return &model.Team{
|
return &model.Team{
|
||||||
|
|
|
@ -161,7 +161,7 @@ func convertRepoHook(eventRepo *github.PushEventRepository) *model.Repo {
|
||||||
return 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.
|
// the common Woodpecker label structure.
|
||||||
func convertLabels(from []*github.Label) []string {
|
func convertLabels(from []*github.Label) []string {
|
||||||
labels := make([]string, len(from))
|
labels := make([]string, len(from))
|
||||||
|
|
|
@ -7,7 +7,7 @@ const (
|
||||||
pathGlobalSecret = "%s/api/secrets/%s"
|
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) {
|
func (c *client) GlobalSecret(secret string) (*Secret, error) {
|
||||||
out := new(Secret)
|
out := new(Secret)
|
||||||
uri := fmt.Sprintf(pathGlobalSecret, c.addr, secret)
|
uri := fmt.Sprintf(pathGlobalSecret, c.addr, secret)
|
||||||
|
|
Loading…
Reference in a new issue