Skip to content

Commit

Permalink
Add random bits in branch name to run step few times
Browse files Browse the repository at this point in the history
  • Loading branch information
thedebugger committed Jul 23, 2024
1 parent ff1c08e commit 7849428
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/branch/branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"os"
"path"
"strconv"
"math/rand"

"sigs.k8s.io/yaml"

Expand Down Expand Up @@ -91,7 +92,7 @@ func Branch(manifest model.Manifest, step int, dryrun bool, token string) error
if step > 2 {
prName = "[release-" + release + "] " + prName
}
if err := util.CreatePR(manifest, repo, "automatedBranchStep"+strconv.Itoa(step), prName, "", dryrun, token, "", "", []string{}); err != nil {
if err := util.CreatePR(manifest, repo, "automatedBranchStep"+strconv.Itoa(step)+"-"+strconv.Itoa(rand.Intn(100)), prName, "", dryrun, token, "", "", []string{}); err != nil {
return fmt.Errorf("failed PR creation: %v", err)
}
}
Expand Down
4 changes: 2 additions & 2 deletions release/trigger-branch
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION=1.19
STEP=1
VERSION=1.23
STEP=1

0 comments on commit 7849428

Please sign in to comment.