Skip to content

Commit

Permalink
chore(deps): bump github.com/xanzy/go-gitlab from 0.93.2 to 0.94.0 (#…
Browse files Browse the repository at this point in the history
…3363)

* chore(deps): bump github.com/xanzy/go-gitlab from 0.93.2 to 0.94.0

Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.93.2 to 0.94.0.
- [Changelog](https://github.com/xanzy/go-gitlab/blob/main/releases_test.go)
- [Commits](xanzy/go-gitlab@v0.93.2...v0.94.0)

---
updated-dependencies:
- dependency-name: github.com/xanzy/go-gitlab
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix deprecated functions

Signed-off-by: Carlos Tadeu Panato Junior <ctadeu@gmail.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Carlos Tadeu Panato Junior <ctadeu@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Carlos Tadeu Panato Junior <ctadeu@gmail.com>
  • Loading branch information
dependabot[bot] and cpanato committed Nov 15, 2023
1 parent 7c1893b commit f57aa2c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ require (
github.com/stretchr/testify v1.8.4
github.com/transparency-dev/merkle v0.0.2
github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1
github.com/xanzy/go-gitlab v0.93.2
github.com/xanzy/go-gitlab v0.94.0
go.step.sm/crypto v0.36.1
golang.org/x/crypto v0.15.0
golang.org/x/oauth2 v0.14.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -846,8 +846,8 @@ github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinC
github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk=
github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1 h1:+dBg5k7nuTE38VVdoroRsT0Z88fmvdYrI2EjzJst35I=
github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1/go.mod h1:nmuySobZb4kFgFy6BptpXp/BBw+xFSyvVPP6auoJB4k=
github.com/xanzy/go-gitlab v0.93.2 h1:kNNf3BYNYn/Zkig0B89fma12l36VLcYSGu7OnaRlRDg=
github.com/xanzy/go-gitlab v0.93.2/go.mod h1:5ryv+MnpZStBH8I/77HuQBsMbBGANtVpLWC15qOjWAw=
github.com/xanzy/go-gitlab v0.94.0 h1:GmBl2T5zqUHqyjkxFSvsT7CbelGdAH/dmBqUBqS+4BE=
github.com/xanzy/go-gitlab v0.94.0/go.mod h1:ETg8tcj4OhrB84UEgeE8dSuV/0h4BBL1uOV/qK0vlyI=
github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI=
github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs=
github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g=
Expand Down
32 changes: 16 additions & 16 deletions pkg/cosign/git/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ func (g *Gl) PutSecret(ctx context.Context, ref string, pf cosign.PassFunc) erro
}

_, passwordResp, err := client.ProjectVariables.CreateVariable(ref, &gitlab.CreateProjectVariableOptions{
Key: gitlab.String("COSIGN_PASSWORD"),
Value: gitlab.String(string(keys.Password())),
VariableType: gitlab.VariableType(gitlab.EnvVariableType),
Protected: gitlab.Bool(false),
Masked: gitlab.Bool(false),
EnvironmentScope: gitlab.String("*"),
Key: gitlab.Ptr("COSIGN_PASSWORD"),
Value: gitlab.Ptr(string(keys.Password())),
VariableType: gitlab.Ptr(gitlab.EnvVariableType),
Protected: gitlab.Ptr(false),
Masked: gitlab.Ptr(false),
EnvironmentScope: gitlab.Ptr("*"),
})
if err != nil {
ui.Warnf(ctx, "If you are using a self-hosted gitlab please set the \"GITLAB_HOST\" your server name.")
Expand All @@ -83,11 +83,11 @@ func (g *Gl) PutSecret(ctx context.Context, ref string, pf cosign.PassFunc) erro
ui.Infof(ctx, "Password written to \"COSIGN_PASSWORD\" variable")

_, privateKeyResp, err := client.ProjectVariables.CreateVariable(ref, &gitlab.CreateProjectVariableOptions{
Key: gitlab.String("COSIGN_PRIVATE_KEY"),
Value: gitlab.String(string(keys.PrivateBytes)),
VariableType: gitlab.VariableType(gitlab.EnvVariableType),
Protected: gitlab.Bool(false),
Masked: gitlab.Bool(false),
Key: gitlab.Ptr("COSIGN_PRIVATE_KEY"),
Value: gitlab.Ptr(string(keys.PrivateBytes)),
VariableType: gitlab.Ptr(gitlab.EnvVariableType),
Protected: gitlab.Ptr(false),
Masked: gitlab.Ptr(false),
})
if err != nil {
return fmt.Errorf("could not create \"COSIGN_PRIVATE_KEY\" variable: %w", err)
Expand All @@ -101,11 +101,11 @@ func (g *Gl) PutSecret(ctx context.Context, ref string, pf cosign.PassFunc) erro
ui.Infof(ctx, "Private key written to \"COSIGN_PRIVATE_KEY\" variable")

_, publicKeyResp, err := client.ProjectVariables.CreateVariable(ref, &gitlab.CreateProjectVariableOptions{
Key: gitlab.String("COSIGN_PUBLIC_KEY"),
Value: gitlab.String(string(keys.PublicBytes)),
VariableType: gitlab.VariableType(gitlab.EnvVariableType),
Protected: gitlab.Bool(false),
Masked: gitlab.Bool(false),
Key: gitlab.Ptr("COSIGN_PUBLIC_KEY"),
Value: gitlab.Ptr(string(keys.PublicBytes)),
VariableType: gitlab.Ptr(gitlab.EnvVariableType),
Protected: gitlab.Ptr(false),
Masked: gitlab.Ptr(false),
})
if err != nil {
return fmt.Errorf("could not create \"COSIGN_PUBLIC_KEY\" variable: %w", err)
Expand Down

0 comments on commit f57aa2c

Please sign in to comment.