Skip to content

Update Branch Name Template For Aggregated Fix#1238

Open
orto17 wants to merge 3 commits intojfrog:devfrom
orto17:branch-name-template-fix
Open

Update Branch Name Template For Aggregated Fix#1238
orto17 wants to merge 3 commits intojfrog:devfrom
orto17:branch-name-template-fix

Conversation

@orto17
Copy link
Contributor

@orto17 orto17 commented Mar 2, 2026

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.
  • Update documentation about new features / new supported technologies

Copy link
Collaborator

@eranturgeman eranturgeman left a comment

Choose a reason for hiding this comment

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

please open a similar PR to V3 if necessary

@orto17 orto17 added bug Something isn't working safe to test Approve running integration tests on a pull request labels Mar 8, 2026
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Mar 8, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

👍 Frogbot scanned this pull request and did not find any new security issues.


Comment on lines 535 to 549
func (gm *GitManager) GenerateAggregatedFixBranchName(baseBranch string, tech []techutils.Technology) (fixBranchName string, err error) {
branchFormat := gm.customTemplates.branchNameTemplate
if branchFormat == "" {
branchFormat = AggregatedBranchNameTemplate
}
hash, err := Md5Hash("frogbot", baseBranch, techArrayToString(tech, fixBranchTechSeparator))
if err != nil {
return "", err
}
return formatStringWithPlaceHolders(branchFormat, "", "", hash, baseBranch, false), nil
if branchFormat != AggregatedBranchNameTemplate {
return formatStringWithPlaceHolders(branchFormat, "", "", hash, "", false), nil // custom: no suffix
} else {
return formatStringWithPlaceHolders(branchFormat, "", "", hash, baseBranch, false), nil // default: append base branch
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

entire logic can be simplified

Suggested change
}
func (gm *GitManager) GenerateAggregatedFixBranchName(baseBranch string, tech []techutils.Technology) (fixBranchName string, err error) {
hash, err := Md5Hash("frogbot", baseBranch, techArrayToString(tech, fixBranchTechSeparator))
if err != nil {
return "", err
}
branchFormat := gm.customTemplates.branchNameTemplate
if branchFormat == "" {
branchFormat = AggregatedBranchNameTemplate
return formatStringWithPlaceHolders(branchFormat, "", "", hash, baseBranch, false), nil
}
return formatStringWithPlaceHolders(branchFormat, "", "", hash, "", false), nil
}

}
return formatStringWithPlaceHolders(branchFormat, "", "", hash, baseBranch, false), nil
if branchFormat != AggregatedBranchNameTemplate {
return formatStringWithPlaceHolders(branchFormat, "", "", hash, "", false), nil // custom: no suffix
Copy link
Collaborator

@eranturgeman eranturgeman Mar 11, 2026

Choose a reason for hiding this comment

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

please add comments above the rows.
or you can simply remove them as they dont add much value

Copy link
Collaborator

@eranturgeman eranturgeman left a comment

Choose a reason for hiding this comment

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

approved, but please see my comments.
Make sure all Scan Pull Requests tests pass as they all suppose to be green now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants