Skip to content

Commit d8096ca

Browse files
committed
Add random bits in branch name to run step few times
1 parent 843e8f0 commit d8096ca

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

pkg/branch/branch.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"os"
2020
"path"
2121
"strconv"
22+
"math/rand"
2223

2324
"sigs.k8s.io/yaml"
2425

@@ -91,7 +92,7 @@ func Branch(manifest model.Manifest, step int, dryrun bool, token string) error
9192
if step > 2 {
9293
prName = "[release-" + release + "] " + prName
9394
}
94-
if err := util.CreatePR(manifest, repo, "automatedBranchStep"+strconv.Itoa(step), prName, "", dryrun, token, "", "", []string{}); err != nil {
95+
if err := util.CreatePR(manifest, repo, "automatedBranchStep"+strconv.Itoa(step)+"-"+strconv.Itoa(rand.Intn(100)), prName, "", dryrun, token, "", "", []string{}); err != nil {
9596
return fmt.Errorf("failed PR creation: %v", err)
9697
}
9798
}

release/trigger-branch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
VERSION=1.19
2-
STEP=1
1+
VERSION=1.23
2+
STEP=1

0 commit comments

Comments
 (0)