Skip to content

Commit b5d5d4e

Browse files
authored
Fix 404s (#802)
1 parent 58f5ac8 commit b5d5d4e

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
github.com/google/go-github/v45 v45.2.0
1515
github.com/jszwedko/go-circleci v0.3.0
1616
github.com/mongodb/go-client-mongodb-atlas v0.3.0
17-
github.com/ovotech/cloud-key-client v0.4.1
17+
github.com/ovotech/cloud-key-client v0.4.2
1818
github.com/ovotech/mantle v0.32.3
1919
github.com/spf13/cobra v1.6.1
2020
github.com/spf13/viper v1.15.0

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,8 @@ github.com/openlyinc/pointy v1.1.2 h1:LywVV2BWC5Sp5v7FoP4bUD+2Yn5k0VNeRbU5vq9jUM
345345
github.com/openlyinc/pointy v1.1.2/go.mod h1:w2Sytx+0FVuMKn37xpXIAyBNhFNBIJGR/v2m7ik1WtM=
346346
github.com/ovotech/cloud-key-client v0.4.1 h1:88WT3iJKX1hs9KKyP+hCUxnFkeor15xBaPaLD/MP1h4=
347347
github.com/ovotech/cloud-key-client v0.4.1/go.mod h1:GE+dvpLfk42JW0jX2Hzs8Gocjj4vWlliZTIq9W2Z0Ns=
348+
github.com/ovotech/cloud-key-client v0.4.2 h1:NpHyTqBTyQV7uvJlcbCB1rgFhyRMHUZq82zV3/l2Gu4=
349+
github.com/ovotech/cloud-key-client v0.4.2/go.mod h1:GE+dvpLfk42JW0jX2Hzs8Gocjj4vWlliZTIq9W2Z0Ns=
348350
github.com/ovotech/mantle v0.32.3 h1:LNqEYlotYhbxcDIrU476c3B+vhAQ92kdCjeNdbaZxjU=
349351
github.com/ovotech/mantle v0.32.3/go.mod h1:bSrueYEoP2Tt3DMrXvSsia+WLM7tv5C2nc1Rdi0Mrh4=
350352
github.com/pelletier/go-buffruneio v0.2.0/go.mod h1:JkE26KsDizTr40EUHkXVtNPvgGtbSNq5BcowyYOWdKo=

pkg/location/github.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
crypto_rand "crypto/rand"
66
"encoding/base64"
77
"fmt"
8-
"strings"
8+
"net/url"
99

1010
"github.com/ovotech/cloud-key-rotator/pkg/cred"
1111

@@ -65,7 +65,7 @@ func (github GitHub) Write(serviceAccountName string, keyWrapper KeyWrapper, cre
6565
repo, _, err := client.Repositories.Get(ctx, github.Owner, github.Repo)
6666
repoID := repo.GetID()
6767
// encode forwardslash character (which is valid in GitHub environment names), otherwise it'll break a REST API call
68-
env := strings.Replace(github.Env, "/", "%2F", -1)
68+
env := url.PathEscape(github.Env)
6969

7070
if len(keyIDEnvVar) > 0 {
7171
if err = addEnvOrRepoSecret(ctx, actionsService, github.Owner, github.Repo, env, keyIDEnvVar, keyWrapper.KeyID, repoID); err != nil {

0 commit comments

Comments
 (0)