Skip to content

Commit

Permalink
address lint comments
Browse files Browse the repository at this point in the history
Signed-off-by: Marlon Pina Tojal <marlont@backbase.com>
  • Loading branch information
Marlon Pina Tojal committed Mar 1, 2024
1 parent 13de752 commit 6e041c7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/cosign/git/github/github.go
Expand Up @@ -153,17 +153,15 @@ func (g *Gh) PutSecret(ctx context.Context, ref string, pf cosign.PassFunc) erro
func (g *Gh) getPublicKey(ctx context.Context, client *github.Client, owner string, repo string) (*github.PublicKey, *github.Response, error) {
if len(repo) > 0 {
return client.Actions.GetRepoPublicKey(ctx, owner, repo)
} else {
return client.Actions.GetOrgPublicKey(ctx, owner)
}
return client.Actions.GetOrgPublicKey(ctx, owner)
}

func (g *Gh) createOrUpdateOrgSecret(ctx context.Context, client *github.Client, owner string, repo string, encryptedCosignPasswd *github.EncryptedSecret) (*github.Response, error) {
if len(repo) > 0 {
return client.Actions.CreateOrUpdateRepoSecret(ctx, owner, repo, encryptedCosignPasswd)
} else {
return client.Actions.CreateOrUpdateOrgSecret(ctx, owner, encryptedCosignPasswd)
}
return client.Actions.CreateOrUpdateOrgSecret(ctx, owner, encryptedCosignPasswd)
}

// NOTE: GetSecret is not implemented for GitHub
Expand Down

0 comments on commit 6e041c7

Please sign in to comment.