Skip to content

Commit

Permalink
Add some debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Oded-B committed Apr 8, 2024
1 parent 506b8a0 commit 2e2a2b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/pkg/githubapi/promotion.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ func GeneratePromotionPlan(ghPrClientDetails GhPrClientDetails, config *cfg.Conf
for i := 0; i <= promotionPathConfig.ComponentPathExtraDepth; i++ {
componentPathRegexSubSstrings = append(componentPathRegexSubSstrings, "[^/]*")
}
ghPrClientDetails.PrLogger.Debugf("componentPathRegexSubSstrings: %s", componentPathRegexSubSstrings)
componentPathRegexSubString := strings.Join(componentPathRegexSubSstrings, "/")
getComponentRegexString := regexp.MustCompile("^" + promotionPathConfig.SourcePath + "(" + componentPathRegexSubString + ")/.*")
componentName := getComponentRegexString.ReplaceAllString(*changedFile.Filename, "${1}")
ghPrClientDetails.PrLogger.Debugf("componentName: %s", componentName)

getSourcePathRegexString := regexp.MustCompile("^(" + promotionPathConfig.SourcePath + ")" + componentName + "/.*")
compiledSourcePath := getSourcePathRegexString.ReplaceAllString(*changedFile.Filename, "${1}")
Expand Down

0 comments on commit 2e2a2b2

Please sign in to comment.