Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add random bits in branch name to run step multiple times #1903

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pkg/branch/branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package branch

import (
"fmt"
"math/rand"
"os"
"path"
"strconv"
Expand Down Expand Up @@ -91,7 +92,10 @@ 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 {

// Disable linter G404: Use of weak random number generator
err := util.CreatePR(manifest, repo, "automatedBranchStep"+strconv.Itoa(step)+"-"+strconv.Itoa(rand.Intn(100)), prName, "", dryrun, token, "", "", []string{}) //nolint:all
if 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not change it now