Skip to content

Commit

Permalink
Fix double loop mistake in inapplicable branches
Browse files Browse the repository at this point in the history
  • Loading branch information
davegaeddert committed Nov 3, 2021
1 parent 1c6d89d commit 9aa608e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/runner/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,12 +368,16 @@ func renderCommitMessage(deps *schema.Dependencies, templateString string) (stri
func getInapplicableBranches(updates Updates) []string {
inapplicableBranches := []string{}
for _, branch := range git.GetDepsBranches() {
branchFound := false
for _, update := range updates {
if strings.HasPrefix(branch, update.branchPrefix()) {
continue
branchFound = true
break
}
}
inapplicableBranches = append(inapplicableBranches, branch)
if !branchFound {
inapplicableBranches = append(inapplicableBranches, branch)
}
}
return inapplicableBranches
}

0 comments on commit 9aa608e

Please sign in to comment.