Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Jan 7, 2025
1 parent 902aeae commit 999d4b5
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions pkg/scm/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ package scm

import (
"github.com/AlecAivazis/survey/v2"
"gitlab.com/gitlab-org/api/client-go"

"github.com/pluralsh/oauth"
"github.com/pluralsh/plural-cli/pkg/utils"
"gitlab.com/gitlab-org/api/client-go"

Check failure on line 7 in pkg/scm/gitlab.go

View workflow job for this annotation

GitHub Actions / Lint

File is not `goimports`-ed (goimports)
)

var (
Expand Down Expand Up @@ -59,7 +58,7 @@ func (gl *Gitlab) Setup() (con Context, err error) {
}

groups, _, err := gl.Client.Groups.ListGroups(&gitlab.ListGroupsOptions{
MinAccessLevel: gitlab.AccessLevel(gitlab.DeveloperPermissions),
MinAccessLevel: gitlab.Ptr(gitlab.DeveloperPermissions),
})
if err != nil {
return
Expand Down Expand Up @@ -92,14 +91,14 @@ func (gl *Gitlab) Setup() (con Context, err error) {
return
}
opts := &gitlab.CreateProjectOptions{
Name: gitlab.String(repoName),
Visibility: gitlab.Visibility(gitlab.PrivateVisibility),
Description: gitlab.String("my plural installation repository"),
InitializeWithReadme: gitlab.Bool(true),
Name: gitlab.Ptr(repoName),
Visibility: gitlab.Ptr(gitlab.PrivateVisibility),
Description: gitlab.Ptr("my plural installation repository"),
InitializeWithReadme: gitlab.Ptr(true),
}

if org != user.Username {
opts.NamespaceID = gitlab.Int(namespaces[org])
opts.NamespaceID = gitlab.Ptr(namespaces[org])
}

utils.Highlight("\ncreating gitlab repository %s/%s...\n", org, repoName)
Expand All @@ -110,9 +109,9 @@ func (gl *Gitlab) Setup() (con Context, err error) {

utils.Highlight("Setting up a read-write deploy key for this repo...\n")
_, _, err = gl.Client.DeployKeys.AddDeployKey(repo.ID, &gitlab.AddDeployKeyOptions{
Title: gitlab.String("Plural Deploy Key"),
Key: gitlab.String(pub),
CanPush: gitlab.Bool(true),
Title: gitlab.Ptr("Plural Deploy Key"),
Key: gitlab.Ptr(pub),
CanPush: gitlab.Ptr(true),
})
if err != nil {
return
Expand Down

0 comments on commit 999d4b5

Please sign in to comment.