Skip to content

Commit

Permalink
Merge pull request #57 from igdianov/main
Browse files Browse the repository at this point in the history
fix(pr): reset base branch name for each rule url
  • Loading branch information
jenkins-x-bot authored Oct 21, 2022
2 parents fe357a6 + c8771b9 commit f9dcec6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/cmd/pr/pr.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ func (o *Options) Run() error {
}
}

BaseBranchName := o.BaseBranchName

for i := range o.UpdateConfig.Spec.Rules {
rule := &o.UpdateConfig.Spec.Rules[i]
err = o.FindURLs(rule)
Expand Down Expand Up @@ -165,6 +167,8 @@ func (o *Options) Run() error {

// lets clear the branch name so we create a new one each time in a loop
o.BranchName = ""
// lets reset the base branch name each time in a loop to avoid side effects when reusing pull requests
o.BaseBranchName = BaseBranchName

source := ""
details := &scm.PullRequest{
Expand Down

0 comments on commit f9dcec6

Please sign in to comment.