Skip to content

Commit

Permalink
fix: update root node branch name on changing base branch
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusZdroba committed Dec 17, 2024
1 parent 8ce9666 commit 6c37616
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,21 @@ class SnykToolWindowPanel(

val newContainerTreeNodeText = getNewContainerTreeNodeText(settings, containerResultsCount, addHMLPostfix)
newContainerTreeNodeText?.let { rootContainerIssuesTreeNode.userObject = it }

val newRootTreeNodeText = getNewRootTreeNodeText()
newRootTreeNodeText.let { rootTreeNode.info = it }
}

private fun getNewRootTreeNodeText() : String {
val folderConfig = service<FolderConfigSettings>().getFolderConfig(project.basePath.toString())
if (folderConfig?.let {
getRootNodeText(
it.folderPath,
it.baseBranch
)
} != null) return folderConfig.let { getRootNodeText(it.folderPath, it.baseBranch) }
return "Choose branch on ${project.basePath}"
}
private fun getNewContainerTreeNodeText(
settings: SnykApplicationSettingsStateService,
containerResultsCount: Int?,
Expand Down

0 comments on commit 6c37616

Please sign in to comment.