diff --git a/CHANGELOG.md b/CHANGELOG.md index 15c4f5838..f17f1fd54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Fixed - folder-specific configs are availabe on opening projects, not only on restart of the IDE - display open source issues in Rider. Previously, as the project.assets.json is in a derived folder, it was filtered. +- correctly display and update base branch name for Net New Issues ## [2.10.0] ### Changed - save git folder config in settings diff --git a/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt b/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt index a861f1507..53742cae4 100644 --- a/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt +++ b/src/main/kotlin/io/snyk/plugin/ui/toolwindow/SnykToolWindowPanel.kt @@ -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().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?,